Subject: Re: [xsl] Issue with entities in XML document From: David Carlisle <davidc@xxxxxxxxx> Date: Sat, 4 Aug 2007 01:28:08 +0100 |
> here is the actual snippet that illustrates the problem. <xsl:value-of select="xp:getxml-as-string(/input)"/> you are using the wrong extension function in the wrong place, you apparemtly want to generate some XML elements. xsl:value-of never generates element nodes it always generates a text node. So firstly you want to use xsl:copy-of not xsl:value-of, and then you want to use an extension function that returns a tree not a string. Although it's not clear so far why you need an extension function at all. If the java function is not easily changable and returns a string then before returning to xslt you need to make the extension function pass the string through an XML parser, as it is an XML parser that goes from teh linear syntax to a tree. But generally i's better just for your extension function to return a tree directly rather than first generate a string and then parse it. David ________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Issue with entities in XM, Ramkumar Menon | Thread | RE: [xsl] Issue with entities in XM, Michael Kay |
Re: [xsl] Issue with entities in XM, Ramkumar Menon | Date | Re: [xsl] Understanding why <tag></, G. Ken Holman |
Month |