Hi,
just a
wild guess:
first
merge the two documents using aggregation and replacing the second root with a
different one, e.g. <addresses>. After that adjust the XSL from the
example to merge /employees/employee with
/addresses/employee.
Hope
this helps.
Bye,
Helma
-----Original Message-----
From: apurva zaveri [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 07 January 2004 00:10
To: [EMAIL PROTECTED]
Subject: XML Full Merge
How do you do a full merge in cocoon??
Full merge, occurs when you need to combine two documents with slightly different structures and data into a third document. For example, you might want to combine a document containing employee names with a similar document containing employee addresses. You need some way to link the records in the two files, probably through an ID field. The following document fragments illustrate a full merge.
Document 1:
<employees> <employee id="1" class="super"> <lastname>Smith</lastname> <firstname>Marsha</firstname> </employee> </employees>
Document 2:
<employees> <employee id="1"> <address>115 Marshal Rd., Greenville, MN 39281</address> </employee> </employees>
Merge Result:
<employees> <employee id="1" class="super"> <lastname>Smith</lastname> <firstname>Marsha</firstname> <address>115 Marshal Rd., Greenville, MN 39281</address> </employee> </employees>
I found something (http://www.fawcette.com/archives/premier/mgznarch/xml/2001/06jun01/rj0103/rj0103.asp) that does it using and xslt. But cocoon does like to support document() function in xslt.
So how can this be done?
Regards,
Apurva Zaveri
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes