Given this XML:
<xsl:variable name="foo" as="element(foo)+">
<foo/>
<foo/>
<foo/>
</xsl:variable>
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.
It's not a question of being "no longer" siblings. You've simply created
three element nodes. You haven't attached them to any parent, therefore they
are not siblings, and never were. If you want to make them siblings, use
<xsl:variable name="foo" as="document-node()">
<xsl:document>
<foo/><foo/><foo/>
</xsl:document>
</xsl:variable>
or use the old syntax, which you can regard as an abbreviation for the
above:
<xsl:variable name="foo">
<foo/><foo/><foo/>
</xsl:variable>
Michael Kay
http://www.saxonica.com/
--~------------------------------------------------------------------
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>
--~--