[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Pass a DOM as an XSLT parameter?
<cknell@xxxxxxxxxx> wrote in message news:B0018802841@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > I've been asked to process two XML documents with one XSLT stylesheet. One document exists in the file system and the other exists in memory as the result of a SQL Server 2000 "for XML" query. In an ideal world, I would write a stylesheet to process the file-system XML document and bring the in-memory XML document into the transformation via the document() function. Since the document() function takes as a parameter a URI, and since I can't think of a way to give a URI to the in-memory document, I'm stumped. I've thought of creating a DOM from the in-memory XML and passing the DOM as a parameter, but I'm pretty sure that won't work. Why, this is a typical operation using the MSXML4 API Read about IXSLProcessor.addParameter() method. You'll have to pass to it a node-set as a parameter. If you have the "in-memory" xml document represented as a string, you will have to pass this string to the IXMLDOMDocument.loadXML() method, then you will pass the root node of the returned tree as parameter. Look for examples in your MSXML4 SDK documentation. ===== Cheers, Dimitre Novatchev. http://fxsl.sourceforge.net/ -- the home of FXSL 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
|