This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

A little cross referencing problem


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]