As this is a general XSLT question and not Xalan-specific, I would recommend that you have a look at the Mulberry list archives. Also, please see:
http://www.dpawson.co.uk/xsl/sect2/merge.html Finally, please do not send non-text messages to the list. Gary -----Original Message----- From: Phil Rice [mailto:[EMAIL PROTECTED] Sent: Sunday, April 14, 2002 3:27 AM To: Xalan J Users Club Subject: How do I merge two XML feeds, and is this question off topic? I have two XML streams with different information about the same entities. I would like to be able to merge them to produce an XML output stream with all the information from the two streams. Example: Input stream one: <entity id = 1> <a>some data</a> <b>some shared data</b> </entity> Input stream two: <entity id = 1> <b>some shared data</b> <c>some more data</c> </entity> Desired output stream: <entity id = 1> <a>some data</a> <b>some shared data</b> <c>some more data</c> </entity> I can see how to do this with tools such as JAXP, but I am struggling with how to start in XSLT. The only solution I have at the moment is very complex using a java class to return the element, and that java class uses Xalan to return the entity with the correct data from the second stream. This is a little inefficient, and I am having problems working out how to eliminate the duplicate elements such as <b> in the above example. I have already searched the archives for this mailing list, and devoured the Wrox press book on XSLT, and am no wiser. If there is anyone out there that can help I would be grateful. Phil Rice
