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 591449 - xsl:output method=text doesn't work with saxon:output
xsl:output method=text doesn't work with saxon:output
Status: RESOLVED OBSOLETE
Product: libxslt
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2009-08-11 14:00 UTC by Jerzy Jalocha N
Modified: 2021-07-05 10:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jerzy Jalocha N 2009-08-11 14:00:26 UTC
Summary:
====================
When <xsl:output method="text"> is used with <saxon:output file="filename"> it doesn't output text, but XML.


Overview Description:
====================

With "normal" output (not using saxon:output), method=text produces text output, as expected. The same example fails to produce text output, when saxon:output is used:
 * An XML declaration is produced.
 * special characters are escaped.

The example below uses one stylesheet to produce both, the expected and the unexpected result at the same time.


Steps to Reproduce:
====================

The following stylesheet (test.xsl):

<xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:saxon="http://icl.com/saxon"
      extension-element-prefixes="saxon">
   <xsl:output method="text" indent="no" />
   <xsl:template match="code">
      <saxon:output file="unexpected.xml">
         <xsl:apply-templates />
      </saxon:output>
      <xsl:apply-templates /> <!-- expected output -->
   </xsl:template>
</xsl:stylesheet>

With the following source document  (source.xml):

<?xml version='1.0' encoding='UTF-8'?>
<code><![CDATA[
Some <free> &text.
]]></code>

Process with xsltproc to create both expected, and unexpected results:

$ xsltproc --output expected.xml test.xsl source.xml


Actual Results (unexpected.xml):
====================

<?xml version="1.0"?>

Some &lt;free&gt; &amp;text.


Expected Results (expected.xml): 
====================

Some <free> &text.


Where did you find the bug?
====================
vanilla xsltproc that ships with Ubuntu 9.04 Jaunty Jackalope:

$ xsltproc --version
Using libxml 20632, libxslt 10124 and libexslt 813
xsltproc was compiled against libxml 20632, libxslt 10124 and libexslt 813
libxslt 10124 was compiled against libxml 20632
libexslt 813 was compiled against libxml 20632
Comment 1 GNOME Infrastructure Team 2021-07-05 10:59:26 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/libxslt/-/issues/

Thank you for your understanding and your help.