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 58539 - xsltproc repeats words under circumstances
xsltproc repeats words under circumstances
Status: VERIFIED FIXED
Product: libxslt
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2001-08-04 11:45 UTC by Stephan Kulow
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stephan Kulow 2001-08-04 11:45:41 UTC
Hi!

I have no idea, what's causing this, but the following docbook example
gives a wrong output.
<?xml version="1.0" ?>
<!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
"../dtd/4.1.2/docbookx.dtd" [
  <!ENTITY BGS "<mousebutton>test</mousebutton> test">
]>

<sect2>
<title>Word repeation</title>

<para>&BGS; word1</para>
<para>&BGS; word2</para>

</sect2>

The output of html/docbook.xsl contains:
<p>test test word1</p>
<p>test test word1 word2</p>

Somehow the word1 is left in some datastructure. If I change the ENTITY
in either removing the markup from it or removing the second "test", it works.

Greetings, Stephan
Comment 1 Daniel Veillard 2001-08-13 10:45:11 UTC
Okay, problem was in libxml when entity subtitution was
enabled, in some case text following the first entity ref
was added to the entity replacement:

orchis:~/XML -> /usr/bin/xmllint --noent  58539.xml
<?xml version="1.0"?>
<!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"../dtd/4.1.2/docbookx.dtd" [
<!ENTITY BGS "<mousebutton>test</mousebutton> test">
]>
<sect2>
<title>Word repeation</title>

<para><mousebutton>test</mousebutton> test word1</para>
<para><mousebutton>test</mousebutton> test word1 word2</para>

</sect2>
orchis:~/XML -> 

this is now fixed in CVS:

orchis:~/XML -> ./xmllint --noent  58539.xml
<?xml version="1.0"?>
<!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"../dtd/4.1.2/docbookx.dtd" [
<!ENTITY BGS "<mousebutton>test</mousebutton> test">
]>
<sect2>
<title>Word repeation</title>

<para><mousebutton>test</mousebutton> test word1</para>
<para><mousebutton>test</mousebutton> test word2</para>

</sect2>
orchis:~/XML -> 

  thanks for the report !

Daniel
Comment 2 Daniel Veillard 2001-08-15 16:07:44 UTC
should be fixed by using libxml-2.4.2 just released,

 thanks,

Daniel