[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Issue with entities in XML document

Subject: Re: Issue with entities in XML document
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sat, 4 Aug 2007 01:28:08 +0100
Re:  Issue with entities in XML document
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.