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 725317 - libxslt ignores xml:space attribute in variable definition
libxslt ignores xml:space attribute in variable definition
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
1.1.x
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-27 13:42 UTC by Tomasz Boczkowski
Modified: 2014-02-27 16:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample xml/xsl file (488 bytes, text/xml)
2014-02-27 13:43 UTC, Tomasz Boczkowski
Details

Description Tomasz Boczkowski 2014-02-27 13:42:02 UTC
Libxslt >= 1.1.28 replaces spaces only variable definition by an empty string.

That means:
<xsl:variable xml:space="preserve">    </xsl:variable>defines an empty-string variable, regardless od xml:space attribute, while it should define a variable consisting of 5 spaces text node.

This behaviour was NOT reproduced with libxslt 1.1.27

I have attached an example file whitespace.xml to illustrate this issue.
Expected result:
5

Result with libxslt 1.1.28
0
Comment 1 Tomasz Boczkowski 2014-02-27 13:43:36 UTC
Created attachment 270472 [details]
Sample xml/xsl file
Comment 2 Nick Wellnhofer 2014-02-27 16:36:04 UTC
Works in current Git master. Probably fixed by this commit:

https://git.gnome.org/browse/libxslt/commit/?id=7cb08dacadf7e1cf88ee2f45815251b61bffcde6

(This bug was actually introduced by a change in libxml2.)