Page 1 of 1

Need more details on xsl:when

Posted: Fri Jun 03, 2016 6:27 am
by Nikky_zhang
I am confused by one code in xsl:when, if you can help,please do

the code is

<xsl: when test="name(/*)='bookmap'">
<xsl:value-of select="'even""/>

I can not undestand name=(/*). If here wants to seach all the node why it does not write name()? what /* for?

Thanks

Re: Need more details on xsl:when

Posted: Fri Jun 03, 2016 3:16 pm
by Radu
Hi,

The XPath /* means root-element (the root element of the XML) and name(/*) means the name of the XML root element.

Your post is not Oxygen-related so ideally in the future you could write XSLT-related questions on the public XSLT mailing lists:
http://www.mulberrytech.com/xsl/xsl-list/

Regards,
Radu