First please do not reply to other mails when starting a new thread. Your mail can get lost in the other thread and you will get no answer, otherwise it's just annoying to have few threads mixed.

Second your problem. The task itself is to be done in XSLT, but the question is, how you get the necessary data put together. You read already about document() and it's one possible solution with the downside of having problems with the caching: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10203. If only the included document is changing the cache isn't invalidate and so you will get the old result. You must know if it works for you. Other possible solutions are sitemap aggregation, cinclude or xinclude. All three only put the XML side by side so that you can transform the merged XML structure into this structure you want to have. The XSLT is up to you I would say. Instead of using document() you have to use simple XPaths in this XML structure.

Joerg

On 07.01.2004 00:10, apurva zaveri wrote:


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to