This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Multiple xsl files
- To: "'XSL-List at lists dot mulberrytech dot com'" <XSL-List at lists dot mulberrytech dot com>
- Subject: [xsl] Multiple xsl files
- From: Pavanan Archana <Pavanan dot Archana at Mobileum dot com>
- Date: Tue, 3 Apr 2001 12:11:21 -0700
- Reply-To: xsl-list at lists dot mulberrytech dot com
hi
I am trying to create reusable style sheets
I am using the following xmlxsl files..
test.xml
-----------
<?xml version="1.0"?>
<TR300>
<ChargeListRSQ>
<Charge id="1">ABC</Charge>
<Charge id="2">DEF</Charge>
</ChargeListRSQ>
</TR300>
-------------------
reusable.xsl
----------------------
<?xml version='1.0' ?><xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match='ChargeListRSQ'>
<table border="1">
<xsl:for-each select="Charge">
<tr>
<td><xsl:value-of select="@id"/></td>
<td><xsl:value-of select="."/></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
---------------------------
main.xsl
---------------------------
<?xml version='1.0' ?><xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:include href="reusable.xsl"/>
<xsl:template match="/">
<html>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:stylesheet>
-----------------------------
output.html
---------------------------
<html>
<body>
<table border="1">
<tr>
<td>1</td>
<td>ABC</td>
</tr>
<tr>
<td>2</td>
<td>DEF</td>
</tr>
</table>
</body>
</html>
--------------------------------------------------------
this works fine...but my requirement is
to add table header to the html output using main.xsl
i don't want to make any change in reusable.xsl
Is it possible to do that ? if yes give me some ideas
thanks in advance
//pavanan
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list