Is it possible to use JavaScript with XML and XSL?
I tried the following but it does not work.. anything missing?
test.xml file:
--------------
<?xml version="1.0" encoding="ISO88 59-1" ?>
<?xml-stylesheet type="text/xsl" href="test.xsl" ?>
<REPORT>
<FOOTER>
<FIELD id="errors">
<KEY>Error Code</KEY>
<VALUE>200014 5</VALUE>
</FIELD>
<FIELD id="configurati on">
<KEY>DEBUG</KEY>
<VALUE>TRUE</VALUE>
</FIELD>
</FOOTER>
</REPORT>
test.xsl file:
--------------
<?xml version='1.0'?>
<xsl:styleshe et version='1.0'
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<HTML>
<BODY bgcolor="palego ldenrod">
<SCRIPT LANGUAGE="javas cript">
<!--
function seeFooter_oncli ck()
{
footer1.style.d isplay = "none"
}
//-->
</SCRIPT>
<INPUT id="seeFooter" type="checkbox" LANGUAGE="javas cript"
onclick="seeFoo ter_onclick()"> FOOTER</INPUT>
<TABLE id="footer1" bgcolor="#d1d2d 2" border="1" width="100%">
<xsl:for-each select="REPORT/FOOTER/FIELD">
<TR>
<TD width="40%"><xs l:value-of select="KEY"/></TD>
<TD><xsl:valu e-of select="VALUE"/></TD>
</TR>
</xsl:for-each>
</TABLE>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
The basic requirement is on the click of checkbox the <TABLE> should
disappear. But when i click the checkbox, browser generates an error.
I might also be posting this in the wrong newsgroup, so the pointer to
the right also would help
Regards
Fareeda
I tried the following but it does not work.. anything missing?
test.xml file:
--------------
<?xml version="1.0" encoding="ISO88 59-1" ?>
<?xml-stylesheet type="text/xsl" href="test.xsl" ?>
<REPORT>
<FOOTER>
<FIELD id="errors">
<KEY>Error Code</KEY>
<VALUE>200014 5</VALUE>
</FIELD>
<FIELD id="configurati on">
<KEY>DEBUG</KEY>
<VALUE>TRUE</VALUE>
</FIELD>
</FOOTER>
</REPORT>
test.xsl file:
--------------
<?xml version='1.0'?>
<xsl:styleshe et version='1.0'
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<HTML>
<BODY bgcolor="palego ldenrod">
<SCRIPT LANGUAGE="javas cript">
<!--
function seeFooter_oncli ck()
{
footer1.style.d isplay = "none"
}
//-->
</SCRIPT>
<INPUT id="seeFooter" type="checkbox" LANGUAGE="javas cript"
onclick="seeFoo ter_onclick()"> FOOTER</INPUT>
<TABLE id="footer1" bgcolor="#d1d2d 2" border="1" width="100%">
<xsl:for-each select="REPORT/FOOTER/FIELD">
<TR>
<TD width="40%"><xs l:value-of select="KEY"/></TD>
<TD><xsl:valu e-of select="VALUE"/></TD>
</TR>
</xsl:for-each>
</TABLE>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
The basic requirement is on the click of checkbox the <TABLE> should
disappear. But when i click the checkbox, browser generates an error.
I might also be posting this in the wrong newsgroup, so the pointer to
the right also would help
Regards
Fareeda
Comment