Whats wrong with this transformation

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<p align=left><font face=Arial size=2>Hi, my XSLT has snippet l ike this</font>
<p align=left>  <font size=2>
<xsl:for-each select="child::node()
<xsl:choose>
<xsl:when test=". instance of text()
<xsl:copy-of select="."/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
 
<p align=left>on deploying, the app server is throwing exception as:
<p align=left> 
<p align=left> <font color="#800000 javax.xml.transform.TransformerException: Extra illegal tokens: instance, of, text, (, )</font> </font>
 
<p align=left>the problem is where i use test clause. I dont know how to fix it.
<p align=left> 
<p align=left>Please help with the correct syntax.
<p align=left> 
<p align=left>Thanks
<p align=left> 
<p align=left>Kris

View the full article
 
Back
Top