Hi,
I have the following question:
XML snippet:
<root>
<template1>
<elem1>1000</elem1>
<elem2>
<subelem1>65</subelem1>
</elem2>
</template1>
<template2>
<type1>
<tag1>1000</tag1>
<tag2>1</tag2>
<type1>
<rule>
<ref>1</ref>
</rule>
<rule>
<ref>1</ref>
</rule>
<rule>
<ref>1</ref>
</rule>
<rule>
<ref>1</ref>
</rule>
<rule>
<ref>1</ref>
</rule>
</template2>
</root>
In the above example,
/template2/type1/tag1 references to /template1/elem1
and /template2/rule/ref references to /template2/type1/tag2
How can we write a XSLT rule to allow only 4 <rule> tags for every <type1> only if the corresponding /template1/elem2/subelem1 is greater than 60.
In the above example it has to give error as (value of)tag1=elem1 and number of <rule> tags are 5 that have (value of)ref=tag2.
Please help me in this regard.
Thanks.
I have the following question:
XML snippet:
<root>
<template1>
<elem1>1000</elem1>
<elem2>
<subelem1>65</subelem1>
</elem2>
</template1>
<template2>
<type1>
<tag1>1000</tag1>
<tag2>1</tag2>
<type1>
<rule>
<ref>1</ref>
</rule>
<rule>
<ref>1</ref>
</rule>
<rule>
<ref>1</ref>
</rule>
<rule>
<ref>1</ref>
</rule>
<rule>
<ref>1</ref>
</rule>
</template2>
</root>
In the above example,
/template2/type1/tag1 references to /template1/elem1
and /template2/rule/ref references to /template2/type1/tag2
How can we write a XSLT rule to allow only 4 <rule> tags for every <type1> only if the corresponding /template1/elem2/subelem1 is greater than 60.
In the above example it has to give error as (value of)tag1=elem1 and number of <rule> tags are 5 that have (value of)ref=tag2.
Please help me in this regard.
Thanks.