[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Combining two node Sets into one

Subject: Combining two node Sets into one
From: "Williamson, Chris" <cwilliamson@xxxxxxxxx>
Date: Thu, 31 Mar 2005 15:27:27 -0500
xpath combine
I am not sure if this is even possible with xsl and xpath alone but I am
limited to the fact that I can not change the xml schema.  Sooo.. I am stuck
asking for some help.. On to the question..

Is there any possible way to combine two node sets into one single node set
(assign to variable?) and then add an extra childnode to the set based on
which parent node the new node came from.  

ie..

Combine these..
<Disbs>
  <DisbDetail>
    <Damount>100</Damount>
    <Ddate>01/05/05</Ddate>
  </DisbDetail>
</Disbs>

<Refunds>
  <RefDetail>
    <Ramount>50</Ramount>
    <Rdate>01/30/05</Rdate>
  </RefDetail>
</Refunds>

Into..
 
<Trans>
  <TranDetail>
    <Ttype>dis</Ttype>
    <Tamount>100</Tamount>
    <Tdate>01/05/05</Tdate>
  </TranDetail>
  <TranDetail>
    <Ttype>refund</Ttype>
    <Tamount></Tamount>
    <Tdate>01/30/05</Tdate>
  </TranDetail>
</Trans>

So that I can create a template to loop through just the trans node set
ordered by date and output the results in order of date regardless if they
are a refund or a disbs... I must conserve whether it is a disb or refund so
that I can change background colors/fonts/etc.

If this is possible through grouping/etc let me know.. I am new to this
stuff.. :)

Chris

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.