Need more details on xsl:when

Here should go questions about transforming XML with XSLT and FOP.
Nikky_zhang
Posts: 18
Joined: Thu Jan 21, 2016 10:28 am

Need more details on xsl:when

Post 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
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Need more details on xsl:when

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply