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

RE: merging xml's using XSLT, merge.xslt

Subject: RE: merging xml's using XSLT, merge.xslt
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 12 Sep 2007 09:25:50 +0100
RE:  merging xml's using XSLT
You could supply the two input DOMs to the stylesheet as parameters, and
replace the calls on document() by references to the parameters.

Alternatively you could use the stylesheet unchanged, and write a
URIResolver that returns the DOM tree in response to the document request
for file1 or file2.

Michael Kay

> -----Original Message-----
> From: Senthil Nathan [mailto:rsennat@xxxxxxxxx] 
> Sent: 12 September 2007 06:49
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  merging xml's using XSLT, merge.xslt
> Hi All,
> I'm trying to merge 2 or more XML's to form a single XML 
> using "merge.xslt"
> from the foll. link, 
> http://www2.informatik.hu-berlin.de/~obecker/XSLT/#merge
> I'm doing this using libxslt. And I face a problem from the 
> XSLT front that, I need to specify the files that I'm going 
> to merge within the merge tags as,  <merge 
> xmlns="http://informatik.hu-berlin.de/merge">
>     <file1>file1.xml</file1>
>     <file2>file2.xml</file2>
>  </merge>
> Suppose if I have the DOM tree of those files in memory, how 
> should I need to use merge.xslt to merge the trees in memory??
> Actually in merge.xslt, the files specified are accessed as,  
> <xslt:call-template name="m:merge">
>     <xslt:with-param name="nodes1" 
> select="document($file1,/*)/node()" />
>     <xslt:with-param name="nodes2" 
> select="document($file2,/*)/node()" />  </xslt:call-template>
> So, is it possible to use merge.xslt for merging DOM trees of 
> file1.xml, file2.xml.
> Thanks
> Senthil

Current Thread


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.
First Name
Last Name
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.