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

Re: Transforming multiple XML files into one file

Subject: Re: Transforming multiple XML files into one file
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 21 Jun 2006 10:27:44 +0100
combine multiple xml
> David,
> can you show me an example XSLT of how you would combine multiple XML  
>  files using a target element within each file? Say the <document>  
> element?

not sure what you mean but if you have  a file
<files>
 <z>one.xml</z>
 <z>two.xml</z>
 <z>three.xml</z>
</files>

and go

<xsl:variable name="files" select="document(document('files.xml')/files/z)"/>

then $files is a node set of three document nodes representing one.xml
two.xml and three.xml and you can apply
templates to all three at once with
<xsl:apply-templates select="$files"/>
or extract elements from all three documents with
xsl:for-each select="$files/some/path/to/here"

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. 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.