xsl-list
[Top] [All Lists]

[xsl] Sibling axis and as="element()"

2006-07-31 08:12:01
Given this XML:

<xsl:variable name="foo" as="element(foo)+">
 <foo/>
 <foo/>
 <foo/>
</xsl:variable>

and this bit of XSLT:

<xsl:for-each select="$foo">
 <xsl:value-of select="count(preceding-sibling::*)"/>
</xsl:for-each>

I get this result:

000

I seem to remember David C mentioning something about using
as="element()" means the elements are no longer siblings... but I
can't find anything about it now.

Is this the case?  Do parentless trees lose their axes?

thanks
andrew

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>