xsl-list
[Top] [All Lists]

Re: [xsl] Transforming multiple XML files into one file

2006-06-21 02:28:19

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
________________________________________________________________________

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