|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Multiple xsl files
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








