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

A little cross referencing problem

Subject: A little cross referencing problem
From: "Pywell, Andrew" <Andrew.Pywell@xxxxxxxxxx>
Date: Wed, 22 Aug 2001 12:13:52 +0200
little cross
Hi 

I have a little cross-referencing problem. My XML looks like this

<?xml version="1.0"?>
<messageData>
 <message dir="0" key="234" text="bla bla"/>
 <message dir="1" key="235" text="more bla bla"/>
 <message dir="0" key="236" text="extra bla bla"/>
 <message dir="1" key="237" text="bla bla bla"/>
 <message dir="0" key="238" text="hmmm bla bla"/>
 <message dir="0" key="239" text="bla bla hmmm"/>
 <message dir="0" key="240" text="bla bla and bla"/>
 <message dir="0" key="241" text="bla bla"/>
 <in key="234" status="No Error"/>
 <in key="236" status="Parsing Error"/>
 <in key="238" status="No Error"/>
 <in key="239" status="No Error"/>
 <in key="240" status="File Error"/>
 <in key="241" status="No Error"/>
 <out key="235" status="No Error"/>
 <out key="237" status="No Error"/>
</messageData>

I want to loop through every <message> and produce a line in a report that
would look like

In		No Error		bla bla
Out		No Error		more bla bla
In		Parsing Error		extra bla bla
Out		No Error		bla bla bla
In		No Error		hmmm bla bla
In		No Error		bla bla hmmm
In		File Error		bla bla and bla
In		No Error		bla bla

If dir="0" then I need to find the matching "key" in <in> and extract the
value of "status". Similarly if dir="1" the I need the "status" of the
matching <out> record

Any help gratefully accepted.

Andrew

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.