Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


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

From: Chad Chelius <cchelius@--------------->
To:
Date: 7/5/2006 2:06:00 PM
O.K. guys, I have an XML file that looks like this:



<files>
    <file>file1.xml</file>
    <file>file2.xml</file>
    <file>file3.xml</file>
</files>

and an XSLT that looks like this:



<xsl:template match="movie">

    <xsl:copy-of select="document(document('list.xml')/files/file)/ 
story"/>

    </xsl:template>




In the past I have been applying an XSLT to an existing XML file  
using Oxygen. So I'd open up the file that I want to transform and  
then the XSLT would apply the transformation to that document and  
give me the resulting output. In this situation, there isn't an XML  
file to start with. Should I just open a blank XML file and do a  
transformation on it? Forgive my ignorance here.








On Jul 3, 2006, at 6:57 PM, Michael Kay wrote:



If the argument to the document() function is a string containing a  
relative

URI, then it is interpreted relative to the base URI of the stylesheet

element in which the document() call appears.



So in layman's terms, if you say document('thing.xml') then you are
referring to a file in the same directory as the stylesheet.


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