E
Eddy C
Hi,
I'm trying to get the value of another node using the position of
another node or the name of the tag.
Such that the current node is one of the contacts child nodes sec or
prim
and doing
<xsl:value-of select="//cust[seq = position()]/name"/>
Should return jon for the prim tag and peter for the sec tag, but
fails as position() appears to resolve to the position of cust not the
contacts node
alternatively I would like to do something like
<xsl:value-of select="//cust[seq = [name()='prim' then 0 else
1]]/name"/>
<custs>
<cust>
<seq>0</seq>
<name>jon</seq>
</cust>
<cust>
<seq>1</seq>
<name>peter</seq>
</cust>
<contacts>
<prim>
<message>hello</message>
</prim>
<sec>
<message>hello</message>
</sec>
</contacts>
</custs>
I'm trying to get the value of another node using the position of
another node or the name of the tag.
Such that the current node is one of the contacts child nodes sec or
prim
and doing
<xsl:value-of select="//cust[seq = position()]/name"/>
Should return jon for the prim tag and peter for the sec tag, but
fails as position() appears to resolve to the position of cust not the
contacts node
alternatively I would like to do something like
<xsl:value-of select="//cust[seq = [name()='prim' then 0 else
1]]/name"/>
<custs>
<cust>
<seq>0</seq>
<name>jon</seq>
</cust>
<cust>
<seq>1</seq>
<name>peter</seq>
</cust>
<contacts>
<prim>
<message>hello</message>
</prim>
<sec>
<message>hello</message>
</sec>
</contacts>
</custs>