xsl-list
[Top] [All Lists]

Re: [xsl] Issue with entities in XML document

2007-08-03 17:28:26

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. 
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--