This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Joining two XML-files
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] Joining two XML-files
- From: "Jorge Bello" <jnbello at ptq dot pemex dot com>
- Date: Thu, 18 Oct 2001 08:39:15 -0500
- References: <OF1D591598.B84F987C-ON86256AD2.006B6C7F@mmm.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
I have 2 XML files obtained from an old legacy system.
(each one is a copy of a relational table).
Here is an excerpt of every one
file1.xml
<data>
<row att1='foo' att2='morefoo" ... />
<row att1='foo2' att2='morefoo2" ... />
...
</data>
file2.xml
<data>
<row fld1='foo' fld2='otherfoo" ... />
<row fld1='foo2' fld2='otherfoo2" ... />
<row fld1='foo2' fld2='anotherfoo2" ... />
...
</data>
These files are related through the commom value of an attribute.
In the previous example file1.att1 is found in file2.fld1
I need to produce a third file where get mixed some attributes
of the related "records".For example:
file3.xml
<row att1='foo' att2='morefoo" fld2='otherfoo" />
<row att1='foo2' att2='morefoo2" fld2='otherfoo2" />
<row att1='foo2' att2='morefoo2" fld2='anotherfoo2" />
...
</data>
I'm wondering what is the "best practice" to achieve this.
Any help will be appreciated.
TIA
Jorge
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list