Hi,
I have the following question:
XML snippet:
<root>
<template1>
<elem1>10</elem1>
<elem2>20</elem2>
<elem3>
<subelem1>65</subelem1>
<subelem2>65</subelem2>
</elem3>
</template1>
<template1>
<elem1>10</elem1>
<elem2>20</elem2>
<elem3>
<subelem1>45</subelem1>
<subelem2>15</subelem2>
</elem3>
<elem4>100</elem4>
</template1>
</root>
I want to check that elem4 must be present under template1 only if the value of subelem1 is < 60.If this condition fails then a error message has to be displayed.
I did the template match as follows:
<xsl:template match="/root/template1/elem3/subelem[. >60 ]/> but how to check the existense of elem4?
Please reply me how to achieve this in XSLT?
Thanks.
I have the following question:
XML snippet:
<root>
<template1>
<elem1>10</elem1>
<elem2>20</elem2>
<elem3>
<subelem1>65</subelem1>
<subelem2>65</subelem2>
</elem3>
</template1>
<template1>
<elem1>10</elem1>
<elem2>20</elem2>
<elem3>
<subelem1>45</subelem1>
<subelem2>15</subelem2>
</elem3>
<elem4>100</elem4>
</template1>
</root>
I want to check that elem4 must be present under template1 only if the value of subelem1 is < 60.If this condition fails then a error message has to be displayed.
I did the template match as follows:
<xsl:template match="/root/template1/elem3/subelem[. >60 ]/> but how to check the existense of elem4?
Please reply me how to achieve this in XSLT?
Thanks.