Subject: [xsl] Recursively Merging 2 XML files with XSLT From: "Daniel MacDonald" <danmec1@xxxxxxxxx> Date: Thu, 23 Nov 2006 12:05:53 +0000 |
Hi there, I'm having a problem with merging a couple of XML files. I've found a few examples of merging on-line but none that really help.
Basically I have an XML file which is written out by my Java program that looks something like this:
<alldata> <data val="xx"> <data val="yy"> <data val="ss"></data> </data> <data val="gg"></data> </alldata>
<tr><td><xsl:value-of select="@val"/></td></tr> <xsl:for-each select="*"> <xsl:call-template name="itself"></xsl:call-template> </xsl:for-each>
This all works fine, but I now need to do a side by side comparison with another XML document that has exactly the same structure, but could have different values. I'm not sure how to do this, perhaps using the same recursive code and using a sort of pointer to where you are in the 2nd XML file (see below), but I've no idea how to go about this?
<tr><td><xsl:value-of select="@val"/></td> <td><xsl:value-of select="<2nd documents @val>"/></td> </tr> <xsl:for-each select="*"> <xsl:call-template name="itself"></xsl:call-template> </xsl:for-each>
xx xy yy yy ss ss gg hh
Cheers Dan
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Placing mark-up in betwee, Jeff Sese | Thread | Re: [xsl] Recursively Merging 2 XML, David Carlisle |
Re: [xsl] Placing mark-up in betwee, Florent Georges | Date | Re: [xsl] Recursively Merging 2 XML, David Carlisle |
Month |