xsl-list
[Top] [All Lists]

RE: Merging arbitrary XML files

2005-05-29 13:42:01
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/
 



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>