Altova Mailing List Archives

Re: [xsl] Concatenating multiple input documents into a single node-set

From: David Carlisle <davidc@--------->
Date: 5/12/2004 5:46:00 PM
> but I only get one node in the resulting variable
In XSLT 1 if you use an xsl:variable with content then you don't get any
nodes at all, you get a result tree fragment.
If you use xsl:copy or an xx:node-set extension this result tree
fragment will act like a node set with one node, a root node (/)
that root node may have many children, in your case it will
have children being the top level elements of each of the included

If you want to get a node set consisting of all the included documents
then you can do
<xsl:variable name="collection" select="document(//rng:include/@href)"/>

as xsl:variable with a select expression doesn't generate an rtf.

Note however that if you copy this secondd form to your output you will
get the top level elements in an arbitrary order as node sets are
unordered, unlike the first case where you get them in the order
that the rng:include elements appear, as the children of the root node
are ordered along the sibling axis.


The LaTeX Companion

This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.