xsl-list
[Top] [All Lists]

[xsl] 0utput Escaping not behaving

2008-02-22 23:44:55
Hello all,

I have a problem that is possibly a bug. I'm using .NET XslTransform for
XSLT 1.0 (not my choice) to transform XHTML to XHTML.

When I create this element like this:

                <xsl:element name="a">
                        <xsl:attribute name="href">
                                <xsl:text>javascript:include('</xsl:text>
                                <xsl:value-of select="@href"/>
                                <xsl:text>?i=1','</xsl:text>
                                <xsl:value-of select="@target"/>
                                <xsl:text>');</xsl:text>
                        </xsl:attribute>
                </xsl:element>

I get this:

<a href="javascript:include('toc41837.htm?i=1','TOC');">

Notice the happy apostrophes. However, when I use a variable $href
containing a query string instead of @href. $href being similar to:

/support?p=Compare&c=Compare/help/6.2/toc41837.htm

I get this:

<a
href="javascript:include(&apos;/support?p=Compare&amp;c=Compare/help/6.2/toc
41837.htm?i=1&apos;,&apos;TOC&apos;);">

I've tried to 'disable-output-escaping' in the xsl:text elements but it
doesn't make any difference. Can anyone say what is going on?

Thanks in advance,
Richard







--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--