![]() |
|
|
|
#1 |
|
I am trying to send html tags via a variable into an XSL stylesheet. I
would like to put all of the HTML formatting into my variable and minimize the work that needs to be done within the stylesheet. My problem is that when I try to pass HTML formatting into an <xsl:value-of> tag the < and > characters are transposed to < and >. For example: parameter inParam (set to "<b>Test</b>") <xsl:value-of select="$inParam" /> browser output: <b>Test</b> not what I wanted (BOLD "Test"). When I view source I see: <b>Test</b> Any ideas? Thanks. Edward Edward |
|
|
|
|
#2 |
|
Posts: n/a
|
Edward wrote: > I am trying to send html tags via a variable into an XSL stylesheet. I > would like to put all of the HTML formatting into my variable and > minimize the work that needs to be done within the stylesheet. > > My problem is that when I try to pass HTML formatting into an > <xsl:value-of> tag the < and > characters are transposed to < and >. > > For example: > > parameter inParam (set to "<b>Test</b>") > > <xsl:value-of select="$inParam" /> > > browser output: > > <b>Test</b> > > not what I wanted (BOLD "Test"). > > When I view source I see: > > <b>Test</b> > > Any ideas? > > Thanks. > > Edward I go the solution on another forum: <xsl:value-of select="$inParam" disable-output-escaping="yes" /> Edward |
|
|
|
#3 |
|
Posts: n/a
|
Edward wrote:
> I am trying to send html tags via a variable into an XSL stylesheet. I > would like to put all of the HTML formatting into my variable and > minimize the work that needs to be done within the stylesheet. > > My problem is that when I try to pass HTML formatting into an > <xsl:value-of> tag the < and > characters are transposed to < and >. > > For example: > > parameter inParam (set to "<b>Test</b>") > > <xsl:value-of select="$inParam" /> > > browser output: > > <b>Test</b> > > not what I wanted (BOLD "Test"). > > When I view source I see: > > <b>Test</b> > > Any ideas? See the FAQ: http://xml.silmaril.ie/authors/html/ ///Peter |
|