Need more details on xsl:when

Here should go questions about transforming XML with XSLT and FOP.
Nikky_zhang
Posts: 17

Need more details on xsl:when

Fri Jun 03, 2016 6:27 am

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: 5752

Re: Need more details on xsl:when

Fri Jun 03, 2016 3:16 pm

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

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 0 guests