[xsl] Problem writing a XSLT stylesheet

Subject: [xsl] Problem writing a XSLT stylesheet
From: Mukul <mukulw3@xxxxxxxxx>
Date: Mon, 17 Feb 2003 22:05:23 -0800 (PST)
Hello ,

I have a XML file as below.

XML file
<!..TAG can repeat any no of times -->

There are certain tags missing in <TAG>. The missing
tags <A> and <B> are repetitive information. Therefore
the first <TAG> tag will have data and will not be
present in tags after that unless there is a change in
these tag's value. 

The <A> tag can have 3 possible values
value1, value2, value3

Based on this value, the label for <E> that needs to
be output will change --
if <A> is value1, output E's label as Label1
if <A> is value2, output E's label as Label2
if <A> is value3, output E's label as Label3

I want the output to appear as

Label1  <value-of E>
Label3  <value-of E>
Label2  <value-of E>
(the Labels will be different depending on the value
of <A>)

I am trying to do this in XSLT but am facing problem
in doing so. I tried using a variable for E's Label
and assigning it Label value depending on <A> but this
was not possible as A is sent in XML tag for the first
time and thereafter it is not present in XML file
until a new A is to be displayed. 

Can anybody please help?


Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

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

Current Thread