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

Connecting the Source and Destination fields

Subject: Connecting the Source and Destination fields
From: "Yaswanth" <yaswanth.mtrx@xxxxxxxxx>
Date: Mon, 20 Aug 2007 12:46:43 +0530
 Connecting the Source and Destination fields
Hi All,

I am trying to arrange the chain of event connections by mapping the Source
and Destination of each Connection.

When my XML file is something like this:

<connection destination="event.1" source="event.0"/>
<connection destination="event.2" source="event.1"/>
<connection destination="event.3" source="event.2"/>
<connection destination="event.4" source="event.3"/>

// Ordered
// Please note that The Destination Value of any node is equal to the Source
value of the next Node
           
Here I am taking the 'source' value from the first 'connection' and by keep
on appending the 'destination' value of all the 'connection's I get the
Output as:


event.0 -> event.1 -> event.2 -> event.3 -> event.4

Problem:

Now my XML input file is changed to some thing like this :

<connection destination="event.1"  source="event.0"/>                
<connection destination="event.3"  source="event.2"/>
<connection destination="event.2"  source="event.1"/>
<connection destination="event.4"  source="event.3"/>

// Unordered
// Please note that The Destination Value of any node is not always equal to
the Source value of the next Node
           
If I process this XML file in the same way I did the earlier one I will get
output as:

event.0 -> event.1 -> event.3 -> event.2 -> event.4

Here event.1s destination is event.2 only but in the Output I am having
event.3 as the destination.
event.2's destination is event.3 only but in the Output I am having event.4
as the destination.
event.3's destination is event.4 only but in the Output I am having event.2
as the destination.

I know this is happening because of the Logic I used in arranging these
things..

Can I get some push on how to arrange these things in Order?!


Regards
Yaswanth

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.