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

Need Help... can't get desired output

Subject: Need Help... can't get desired output
From: UlyLee <ulyleeka@xxxxxxxxx>
Date: Tue, 11 Oct 2005 03:52:24 -0700 (PDT)
desired output
I have this kind of XML source:

<A1>
  <A2>
    <AddLine>Name1 to Name2</AddLine>
  </A2>
  <A2>
    <AddLine>Name3 to Name4 Name5</AddLine>
  </A2>
  <A2>
    <AddLine>Name6 Name7 to Name8</AddLine>
  </A2>
  <A2>
    <AddLine>Name9 Name10 to Name11 Name 12</AddLine>
  </A2>
</A1>

I have another XML that looks like this:

<table>
<tr>
<td>Name1</td>
<td>NormalName1</td>
</tr>
<tr>
<td>Name2</td>
<td>NormalName2</td>
</tr>
<tr>
<td>Name3</td>
<td>NormalName3</td>
</tr>
<tr>
<td>Name4</td>
<td>NormalName4</td>
</tr>
<tr>
<td>Name6</td>
<td>NormalName6</td>
</tr>
<tr>
<td>Name8</td>
<td>NormalName8</td>
</tr>
</table>

My supposed output shoud be:
<A1>
  <A2>
    <AddLine>Name1 to Name2</AddLine>
   
<A3><from>NormalName1</from><to>NormalName2</to></A3>
  </A2>
  <A2>
    <AddLine>Name3 to Name4 Name5</AddLine>
   
<A3><from>NormalName3</from><to></to><excpt><from-to>Name4
</from-to> Name5</excpt></A3>
  </A2>
  <A2>
    <AddLine>Name6 Name7 to Name8</AddLine>
   
<A3><from></from><to>NormalName8</to><excpt><from-to>Name6</from-to>
Name7</excpt></A3>

  </A2>
</A1>

so far i can output the case wherein there is a single
Name in the before 'to' or after 'to', but the rest
i'm stuck. can someboy help me with this?


		
__________________________________ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/

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.