Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


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

From: Wendell Piez <wapiez@---------------->
To:
Date: 7/3/2006 9:12:00 PM
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


transparent
Print
Mail
Like It
Disclaimer
.

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 www.altova.com/list/index.html. 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.

.
.

transparent

transparent