At 2010-09-27 17:27 +0200, Fabien Tillier wrote:
I was wondering how an XSL Stylesheet can be done to treat all nodes in
an XML file if a template doesn't fit.
I mean, if an xml is like
<Row>
<A>A value</A>
<B>B value</B>
<C>C value</C>
</Row>
If I get one template for treating <A> nodes (match = "A"), and one for
<B> nodes, I would like to have some kind of fall back template for the
C nodes which don't have a specific one.
Is this possible ?
Certainly ... the XPath for an element of any name is "*".
The XPath for a node of any time is "node()".
So, for what you want:
<xsl:template match="*">
... any element not matched elsewhere ...
</xsl:template>
I hope this helps.
. . . . . . . . . . . . Ken
--
XSLT/XQuery training: after http://XMLPrague.cz 2011-03-28/04-01
Vote for your XML training: http://www.CraneSoftwrights.com/s/i/
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/
G. Ken Holman mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers: http://www.CraneSoftwrights.com/legal
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--