My source file looks like this:
<stuff>
<s>
<contents>
<code>503886</code>
<code>602806</code>
</contents>
...
</s>
<p>
<code>344196</code>
<export>true</export>
...
</p>
<!-- more 's' and 'p' tags -->
...
</stuff>
I need to iterate over ‘s’ and choose those – which inside ‘contents’ tag have a ‘code’ that belongs to a ‘p’ that has export=true.
I’ve been trying to solve this for the last couple of hours.
Please share some ideas.
This stylesheet:
With this input:
Output:
Note: Whenever there are cross references, use keys.
Edit: Missed iterate over
spart. Thanks, Dimitre!Edit 2: Re reading this answer I saw that it might be confusing. So, for a expression selecting the nodes, use: