[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Merging arbitrary XML files


Subject: RE: [xsl] Merging arbitrary XML files
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sun, 29 May 2005 21:42:01 +0100

> For example, for the following two files:
> 
> -----------
> <doc>
> 	<foo/>
> 	<bar/>
> </doc>
> -----------
> 
> -----------
> <doc>
> 	<foo href="content" />
> 	<bar/>
> 	<joe/>
> </doc>
> -----------
> 
> Would the result be:
> -----------
> <doc>
> 	<foo href="content" />
> 	<bar/>
> 	<bar/>
> 	<joe/>
> </doc>
> -----------

I've no idea what the result would be. If you specify the problem, then we
can help you solve it. If you can't specify the problem, then you at least
need to indicate what constraints you want to place on the solution.
Otherwise I can just tell you that the way to merge two documents is:

<merged>
 <xsl:copy-of select="document('a.xml')"/>
 <xsl:copy-of select="document('b.xml')"/>
</merged>

and who's to say I'm wrong?

Michael Kay
http://www.saxonica.com/


Current Thread
Keywords