[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: methods of converting an xml string to xml nodes
>I'm using xalan processor. And what I need is to convert >an xml string to xml nodes so it can be read from stylesheet. Write an extension function which invokes an XML parser to convert the string to DOM nodes, return the top-level node or a DOM NodeList to Xalan, and it'll be treated as an XSLT nodeset. If your string can't be interpreted as a well-formed document, you'll have to find a parser which can handle document fragments. See http://xml.apache.org/xalan-j/extensions.html for more information about how to write and invoke Xalan extension functions. Alternatively: Write an Entity Resolver which recognizes a specific URI as a request to read from your string buffer, plug it into the Xalan/Xerces system, then use the XSLT document() function to request that URI. This is a bit more obscure but may be more efficient since you don't need to take the intermediate step of generating the DOM nodes. ______________________________________ Joe Kesselman / IBM Research XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|