|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Comparing node for identity using union
I don't know what's happenend in here, but i was using the union
operator for comparing nodes, following M. Kay sugestion some weeks
ago. It was working OK then, but now it simple stop working. I don't
believe in witches, but as the Spaniards says "que las hay, hay"...
What i was doing was something like this:
<xsl:param name="pos" select="0"/>
<xsl:variable name="snode" select="(//Menu)[$pos]"/>
(...)
<xsl:when test="(count(parent::Menu|$snode)=1)">
<xsl:text>1</xsl:text>
</xsl:when>
aplyed to something like
<Menus>
<Menu>
<Menu_K>X00043</Menu_K>
<Titulo>Processos</Titulo>
<Menu>
<Menu_K>X00047</Menu_K>
<Titulo>Caracterizagco</Titulo>
</Menu>
</Menu>
<Menu>
<Menu_K>X00047</Menu_K>
<Titulo>Caracterizagco</Titulo>
</Menu>
<Menu>
<Menu_K>X00110</Menu_K>
<Titulo>Setting's</Titulo>
<Menu>
<Menu_K>X00110</Menu_K>
<Titulo>Setting's</Titulo>
</Menu>
</Menu>
</Menus>
In this example when the context node is /Menus/Menu/Menu and $pos=1 i
want the value 1, otherwise something else.
When $pos = 0 i never want that condition true, and everithing was
working OK. But now i only changed the tag names and it's not working
anymore. I run to the debuger i see that
(count(parent::Menu|$snode)=1) is allways true, even when $snode no
node, and even when there is no parent::Menu .
For example, when in /Menus/Menu/Menu and (//Menu)[0] that condition is true.
I'm completly lost in here, its late and i don't know what to think...
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








