Hi all,
I’ve stumbled across one problem, passing and displaying HTML markup via parameters.
Lets say I need to pass HTML string containing combo box to XSL and display it.
In JSP I set up parameters like this:
code:-------------------------------
Hashtable params = new Hashtable();
params.put("param1", value);
strCombo = “<select><option>Test Value</option></select>”;[/color red]
params.put("param2", strCombo);
--------------------------------------
in XSL I try to accept and display it:
code:---------------------------------
<?xml version="1.0" encoding="windows-1252"?>
<xsl:stylesheet version="1.0" xmlns:xsl="<xsl
utput method="html"/>
<xsl
aram name=" param1"></xsl
aram>
<xsl
aram name=" param2"></xsl
aram>
<xsl:template match="/">
<xsl:copy-of select=”$param2”/>
</xsl:template>
</xsl:stylesheet>
------------------------------------------
and instead of combo box I see literal string print out,
I know that I’m on the rght path, because when I do this:
code:-----------------------------------
<?xml version="1.0" encoding="windows-1252"?>
<xsl:stylesheet version="1.0" xmlns:xsl="<xsl
utput method="html"/>
<xsl
aram name=" param1"></xsl
aram>
<xsl
aram name=" param2"><select><option>Test Value</option></select></xsl
aram>
<xsl:template match="/">
<xsl:copy-of select=”$param2”/>
</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------
It will display combo box as it should. I’m definitely missing something, but what.
Please do not make suggestions like not passing HTML to XSL, it has to be like that, and that is that.
Thanks in advance
I’ve stumbled across one problem, passing and displaying HTML markup via parameters.
Lets say I need to pass HTML string containing combo box to XSL and display it.
In JSP I set up parameters like this:
code:-------------------------------
Hashtable params = new Hashtable();
params.put("param1", value);
strCombo = “<select><option>Test Value</option></select>”;[/color red]
params.put("param2", strCombo);
--------------------------------------
in XSL I try to accept and display it:
code:---------------------------------
<?xml version="1.0" encoding="windows-1252"?>
<xsl:stylesheet version="1.0" xmlns:xsl="<xsl
<xsl
<xsl
<xsl:template match="/">
<xsl:copy-of select=”$param2”/>
</xsl:template>
</xsl:stylesheet>
------------------------------------------
and instead of combo box I see literal string print out,
I know that I’m on the rght path, because when I do this:
code:-----------------------------------
<?xml version="1.0" encoding="windows-1252"?>
<xsl:stylesheet version="1.0" xmlns:xsl="<xsl
<xsl
<xsl
<xsl:template match="/">
<xsl:copy-of select=”$param2”/>
</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------
It will display combo box as it should. I’m definitely missing something, but what.
Please do not make suggestions like not passing HTML to XSL, it has to be like that, and that is that.
Thanks in advance