Here is my xml file, where I need to check the value of SOME_SW_INSTALLED, if it is IS_TRUE then the value of SOME_HW_INSTALLED should be IS_TRUE(vice-versa). I am new and do not have any knowledge of xslt.
<MEDIA_FAMILY>
<SOME_ID ReadOnly="true">1</SOME_ID>
<SOME_NAME ReadOnly="true">somecode</SOME_NAME>
<SOME_DESCRIPTION ReadOnly="true">something</SOME_DESCRIPTION>
<SOME_SW_INSTALLED ReadOnly="true">IS_TRUE</SOME_SW_INSTALLED>
<SOME_HW_INSTALLED ReadOnly="false">IS_FALSE</SOME_HW_INSTALLED>
</MEDIA_FAMILY>
Here is my xslt but some one can suggest me simpler way
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:template match="@*|node()|comment()">
<xsl:copy>
<xsl:apply-templates select="@*|node()|comment()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="/MEDIA_FAMILY/SOME_HW_INSTALLED">
<xsl:choose>
<xsl:when test= "../SOME_SW_INSTALLED = 'IS_TRUE'">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:text>IS_TRUE</xsl:text>
</xsl:copy>
</xsl:when>
<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:text>IS_FALSE</xsl:text>
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:transform>