Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


transform multiple input document

From: "Wisut Hatanong" <wizzup@-------.--->
To: NULL
Date: 10/4/2005 6:13:00 PM
Dear Experts, Please tell me how can I do the xslt on multiple input file to 
one output file.these are the data files.

data.xml
<?xml version="1.0" ?>
<datas>
  <data>1</data>
  <data>2</data>
  <data>3</data>
</datas>

data2.xml
<?xml version="1.0" ?>
<datas>
  <data>7</data>
  <data>8</data>
  <data>9</data>
</datas>

data3.xml
<?xml version="1.0" ?>
<datas>
  <data>4</data>
  <data>5</data>
  <data>6</data>
</datas>

and this is the transform i want to apply to each file
data.xslt
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
version="1.0">
  <xsl:output method="xml"/>
  <xsl:template match="/">
    <items>
      <xsl:apply-templates select="datas" />
    </items>
  </xsl:template>
  <xsl:template match="data">
    <item>
      <xsl:value-of select="."/>
    </item>
  </xsl:template>
</xsl:stylesheet>

however if i have the list of data files like this
list.xml
<?xml version="1.0" ?>
<files>
  <file>data.xml</file>
  <file>data2.xml</file>
  <file>data3.xml</file>
</files>

how can i do transform each data file and make all output summarized in one 
output file like this (please noted that i need to do sorting)output.xml
<?xml version="1.0" encoding="utf-8" ?>
<items>
  <item>1</item>
  <item>2</item>
  <item>3</item>
  <item>4</item>
  <item>5</item>
  <item>6</item>
  <item>7</item>
  <item>8</item>
  <item>9</item>
</items>Thank for your help. 




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