Hi,
I am an XML beginner ..looking to create/modify an XSL document dynamically using a
Java program..which will be applied to XML to generate HTML
In the example stylesheet which has been created manually ,I need to change the bgcolor and border properties of the 2 table tags. I dont know how to reference the appropriate table(Node).I know that XSL document can be created by any XML API ..but i find that too cumbersome. Is there any short cut(programmatically of course) by which i can modify the properties of the table nodes?I googled, but with little luck.
Can anyone please guide me the right solution.
Thanks a lot
/********************XSL document ****************************/
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl

utput method="html"/>
<xsl:template match="/">
<TITLE>MY REPORT</TITLE>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="query">
<br></br>
<b>DESCRIPTION OF THE TABLE IS AS FOLLOWS</b>
<br></br>
<table bgcolor="yellow" border="1">
<tr>
<th>COLNAME</th>
<th>DATATYPE</th>
</tr>
<xsl:for-each select="definition/element">
<tr>
<td><xsl:apply-templates/></td>
<td><xsl:value-of select="@type"/></td>
</tr>
</xsl:for-each>
</table>
<br> <b> Table Information</b></br>
<table bgcolor="cyan" border="1">
<tr>
<xsl:for-each select="definition/element">
<td><xsl:apply-templates/></td>
</xsl:for-each>
</tr>
<xsl:for-each select="data/row">
<tr>
<xsl:for-each select="*">
<td><xsl:apply-templates/></td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
/********************End of XSL document ****************************/