GNOME Bugzilla – Bug 58539
xsltproc repeats words under circumstances
Last modified: 2009-08-15 18:40:50 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
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
should be fixed by using libxml-2.4.2 just released, thanks, Daniel