Re: [xsl] Transforming multiple XML files using multiple stylesheets

Subject: Re: [xsl] Transforming multiple XML files using multiple stylesheets
From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx>
Date: Fri, 9 Jun 2006 17:11:57 +0100
Gowri

Sounds like you did the right thing.
You need to turn the import into a full stylesheet though, with a root xsl:stylesheet element around <xsl:template match="function_table">.
You could also try using xsl:include which acts more like a dynamic copy-and-paste.


Show you file sif you still have problems.

Joe

----- Original Message ----- From: "Gowri Ratakonda" <gratakonda@xxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Friday, June 09, 2006 5:03 PM
Subject: [xsl] Transforming multiple XML files using multiple stylesheets



I have a master.xml file with three xml files included
like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<macro>

<! -- Include FT files -->

  <ft  file="../fts/file_1.xml"/>
  <ft  file="../fts/file_2.xml"/>
  <ft  file="../fts/file_3.xml"/>

  .
  .
  .
</macro>

------------------------------------------------------

In my master.xsl stylesheet, I do this to transform
the included XML files, which works perfectly fine:

<xsl:for-each select="/macro/ft">
 <xsl:apply-templates
select="document(@file)/function_table"/>
</xsl:for-each>

<xsl:template match="function_table">
.
.
.
</xsl:template>
----------------------------------------------------------------------

Since I am planning on using the  function_table
template for other transformations, I would like to
delete it from the master.xsl and put it in a separate
stylesheet,
and include the stylesheet in the master.xsl to
transform all the three XML files.
Could somebody point me to the right function to do
this because I couldn't make it work using
<xsl:import>.
Should I use <xsl:processing-instruction>? If yes,
what is the right syntax in XSLT1.0?

Thanks,
Gowri


__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

Current Thread