Hello ,
I have a XML file as below.
XML file
---------
<rootelem>
<TAG>
<A>dfdf</A>
<B>gfgfgg</B>
<C>ytyty</C>
<D>ghghgh</D>
<E>ghghgh</E>
</TAG>
<TAG>
<C>ytyty</C>
<D>ghghgh</D>
<E>ghghgh</E>
</TAG>
<TAG>
<B>ghgh</B>
<C>ytyty</C>
<D>ghghgh</D>
<E>ghghgh</E>
</TAG>
<TAG>
<C>ytyty</C>
<D>ghghgh</D>
<E>ghghgh</E>
</TAG>
<!..TAG can repeat any no of times -->
</rootelem>
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>
..etc
(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?
Regards,
Mukul
__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list