checking value in XSL and substituing value



I am trying to tansform one xml into another using an xsl , how do I check for a particular value in the input xml and when that value occurs have an set value in the new xml


for example


input xml:



<Test>
<ones>
<one>Y</one>
<one>N</one>
</ones>
</Test>


When Y occurs , I want to set the value in the output xml to true


output xml:



<output>
<transforms>
<transform>true</transform>
<transform>N</transform>
</transforms>
<output>


the xsl snippet is currently



<xsl:element name="tansform" >
<xsl:value-of select="Test/ones/one"/> <!-- need to add logic here-->
</xsl:element>

No comments:

Post a Comment