/TESTS/TEST[id='1']
I then want to select detail and somethingelse
would their nested applicabilities be:
/TESTS/TEST[id='1']/detail
/TESTS/TEST/detail
or
./detail
Normally in XSLT I would do:
<xsl:for-each select="//TEST[id='1']"> <---- Repeat
<xsl:value-of select="./detail"/> <--- Bindings
<xsl:value-of select="./somethingelse"/> <---- Bindings
</xsl:for-each>
I either get the same item repeated (first in the document) or blank. It works fine if I don't have a condition in xpath so a little confused.
- Code: Select all
<TESTS>
<TEST>
<id>1</id>
<detail>something</detail>
<somethingelse>blahblah</somethingelse>
</TEST>
<TEST>
<id>1</id>
<detail>something</detail>
<somethingelse>blahblah</somethingelse>
<TEST>
<id>2</id>
<detail>something</detail>
<somethingelse>blahblah</somethingelse>
<TEST>
</TESTS>