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 436771 - comment() won't produce processing instructions inside
comment() won't produce processing instructions inside
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
1.1.16
Other All
: Normal minor
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2007-05-08 03:56 UTC by Brett
Modified: 2007-06-12 14:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6



Description Brett 2007-05-08 03:56:59 UTC
Please describe the problem:
This is a small problem, but I thought I'd report it. If entities or processing instructions have been added within a comment in the XML document, when XSL does a match, it will not output that part:

Steps to reproduce:
1. Add such comments to the XML file:

<!--
blah
<?proc-inst ?>
more blah
-->

2. Process the comment in the XSLT file:
<xsl:template match="comment()">
<xsl:copy/>
</xsl:template>

3. Look on in horror at the result. Ok, maybe not horror...

Actual results:
Only the text before and after gets printed:

<!--
blah

more blah
-->

Expected results:
Everything should be printed:

<!--
blah
<?proc-inst ?>
more blah
-->


Does this happen every time?
Yes

Other information:
Comment 1 William M. Brack 2007-06-12 14:47:34 UTC
Fixed with bug #413451