xsl-list
[Top] [All Lists]

RE: Node Position & Relationship!

2005-02-11 07:54:48

I wrote:

To test if a node has siblings:

  <xsl:if test="preceding-sibling::tree or following-sibling::tree">

Or:

  <xsl:if test="../tree">

Of course the second one will always be true if the current node is a
<tree> node... 

It would need to be modified to:

 <xsl:if test="../tree[generate-id(.) != generate-id(current())]">

to ensure the the current <tree> node doesn't get included in the
selection.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--