I have a query regarding the selection of a particular tag based on a condition.
In the following XML code:
Expand|Select|Wrap|Line Numbers
- <root>
- <template1>
- <elem1>1000</elem1>
- <elem2>
- <subelem1>65</subelem1>
- </elem2>
- </template1>
- <template1>
- <elem1>2000</elem1>
- <elem2>
- <subelem1>45</subelem1>
- </elem2>
- </template1>
- <template2>
- <type1>
- <tag1>1000</tag1>
- </type1>
- <rule>
- <match>
- <id>10</id>
- </match>
- <tag1> 1000 </tag1>
- </rule>
- <rule>
- <match>
- <id>20</id>
- </match>
- <tag1>1000</tag1>
- </rule>
- </template2>
- </root>
For the above code,error has to be thrown because /root/template2/rule/match/id = 20 whose tag1=1000 and there is a template1 whose elem1=1000 and whose subelem1 is 65(which is >50)
Please let me know the XSLT piece of code how to achieve this conditional selection
Thanks,