[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: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 03 Jul 2006 17:08:54 -0400
multiple xml in one file
Chad,

Since David's probably getting some well-earned sleep (or maybe not, with the mini-David to take care of) --

At 03:31 PM 7/3/2006, you wrote:
David,
How does the XSLT know the exact location of the files that you are
listing. Do they need to be located in the same directory?

This depends on how you call document(). The function takes a second argument, identifying a node relative to which the URL is dereferenced. So


document('file.xml',/)

finds file.xml next to the XML entity in which the root node of the source document is found.

This defaults to work relative to the stylesheet.

The values of the nodes you give to document($nodes) can contain relative URLs if you like:

<list>
<file>file1.xml</file>
<file>../dir2/file2.xml</file>
<file>http://w3.org/find/me/here.xml</file>
</list>

calling document(file,.) from the context of the list element will find documents relative to the location of the list element, "." (or rather, of the XML entity in which the list element appears). So file1.xml should be next to this source document, file2.xml will be in the dir2 directory over one in the same file system, and the third document will be on the W3C web site....

I hope that helps,
Wendell

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.