xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Merging Two Nodesets .. can it be done?


Subject: [xsl] Merging Two Nodesets .. can it be done?
From: "Wasiq Shaikh" <wasiq911@xxxxxxxxxxx>
Date: Mon, 13 Aug 2007 15:48:34 -0400

Quick question .. is there a way to merge two node-sets in XSL that have similar structure?

Example Input: (generated output from XSLT)

<X>
  <Y>
     <aaa>
     <Z>
        <bbb>
        <ccc>
     </Z>
  </Y>
  <Y>
     <ddd>
     <eee>
     <Z>
        <fff>
     </Z>
  </Y>
</X>

Desired Output: (This is how I would like to get it in the same XSLT process)

<X>
  <Y>
     <Z>
        <bbb>
        <ccc>
        <fff>
     </Z>
     <aaa>
     <ddd>
     <eee>
  </Y>
</X>

Notice the Y elements are merged, as well as the Z elements.

Is there any function or algorithm out there that can do this in one shot (or at all)? Or do I have to turn this into a two step process by making the generated output an input do another XSL that does the merge?

Thanks for any insight!

W.S

_________________________________________________________________
Former Police Officer Paul Gillespies TAKE BACK THE INTERNET tips and tricks, watch the video now http://safety.sympatico.msn.ca/



Current Thread
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor