[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Concatenating multiple input documents into a sing

Subject: Re: Concatenating multiple input documents into a single node-set
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 12 May 2004 16:45:53 +0100
xslt multiple input documents
> 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
documents.

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.

David


-- 
The LaTeX Companion
  http://www.awprofessional.com/bookstore/product.asp?isbn=0201362996
  http://www.amazon.co.uk/exec/obidos/tg/detail/-/0201362996/202-7257897-0619804


________________________________________________________________________
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:
http://www.star.net.uk
________________________________________________________________________

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.