After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 64043 - Problems with disable-output-escaping
Problems with disable-output-escaping
Status: VERIFIED NOTABUG
Product: libxslt
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2001-11-08 08:57 UTC by Gero Meißner
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Gero Meißner 2001-11-08 08:57:23 UTC
When using the xsl:text instruction by setting the attribute 'disable-
output-escaping' to 'yes' the resulting document doesn't contain the 
characters < or &. They are always written as &lt; or &amp;.

The instruction...:
<xsl:text disable-output-escaping="yes">javascript:zoom('./zoom.html?
file=abc.jpg&amp;width=300&amp;400');</xsl:text>

...should result in:
javascript:zoom('./zoom.html?file=abc.jpg&width=300&400');

But I couldn't get it when transforming a document with xsltproc.

Can you tell me please how to solve the problem?
Comment 1 Daniel Veillard 2001-11-08 14:01:11 UTC
Can't reproduce the problem:

orchis:~/tmp -> cat tst.xsl 
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xsl:version="1.0">
<xsl:output method="html"/>

  <xsl:template match="/">
  <p>
  <xsl:text
disable-output-escaping="yes">javascript:zoom('./zoom.html?file=abc.jpg&amp;width=300&amp;400');</xsl:text>
  </p>
  </xsl:template>
</xsl:stylesheet>
orchis:~/tmp -> xsltproc tst.xsl tst.xsl 
<p>javascript:zoom('./zoom.html?file=abc.jpg&width=300&400');</p>
orchis:~/tmp -> 

  Works with methos="xml" too ...
Make sure you use a recent version. And to report all the information
when you think you found a bug, including version info, input
document and stylesheet. Instructions at:

   http://xmlsoft.org/XSLT/bugs.html

Daniel

Comment 2 Gero Meißner 2001-11-12 15:20:09 UTC
It really works when using xsl:text to generate text-content for an 
element. But even the latest versions of libxslt and libxml do not 
handle the attribute 'disable-output-escaping' when using xsl:text to 
generate the value for an attribute.

The following example shows the problem (attribute 'href' for 
element 'a':

  <a>
    <xsl:attribute name="href">
      <xsl:text disable-output-escaping="yes">javascript:zoom
('./zoom.html?
file=abc.jpg&amp;width=300&amp;400');</xsl:text>
</xsl:attribute>
    :
  </a>
Comment 3 Daniel Veillard 2001-11-12 16:06:00 UTC
Not a bug !!!
http://www.w3.org/TR/xslt#disable-output-escaping
-----------
It is an error for output escaping to be disabled for a text node that
is used for something other than a text node in the result tree. Thus,
it is an error to disable output escaping for an xsl:value-of or
xsl:text element that is used to generate the string-value of a
comment, processing instruction or attribute node;
-----------
  Sorry you're trying to do something which should not be supported !

Daniel
Comment 4 Daniel Veillard 2001-11-26 13:59:46 UTC
I think this can safely be closed,

Daniel