Within class xyz only, I want to examine exactly two divs and their classnames. If classname="yes" then output '1'. If classname="no" then output '0'.
<div class="xyz">
<div class="no"></div>
<div class="yes"></div>
</div>
Desired output: 0 1
<div class="xyz">
<div class="yes"></div>
<div class="yes"></div>
</div>
Desired output: 1 1
.. etc .. Finding the first is easy but how do I do it "sequentially"?
Recursive processing can be used as in the XSLT-1.0 code below:
The 3rd template processes all the nodes recursively, starting with document node. The first two templates do the desired output for @class with 'yes' and 'no'.