Hi all,
I am new to xml/xsl/xpath and I have been experimenting with the following piece of sample xml
<a>
<b>
<flag>true</flag>
</b>
<c>
<data1>hello</data1>
<data2>goodbye</data2>
</c>
<a>
I am trying to create a stylesheet to process the above xml file.
The flag element can either be true or false.
If true I only want to process the data1 element in element c.
If false I only want to process the data2 element in element c.
I am trying to use and xsl:if as follows
<xsl:if test="//b/flag=true()">
but this gives the following error:
xsl:if requires attribute:
test Any help would be greatly appreciated.
Regards,
Damian.