cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurva zaveri <>
Subject XML Full Merge
Date Tue, 06 Jan 2004 23:10:24 GMT


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 (
that does it using and xslt. But cocoon does like to support document() function in xslt.

So how can this be done?



Apurva Zaveri



Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
View raw message