GNOME Bugzilla – Bug 587663
Incorrect Attribute-Value Normalization
Last modified: 2009-09-01 07:41:12 UTC
Please describe the problem: Section 3.3.3 Attribute-Value Normalization (http://www.w3.org/TR/2008/REC-xml-20081126/#AVNormalize) gives three examples. With xmllint the second example cannot be reproduced. Steps to reproduce: Execute "xmllint --format --noent test.xml" with test.xml as follows: <?xml version="1.0"?> <!DOCTYPE x [ <!ENTITY d "
"> <!ENTITY a "
"> <!ENTITY da "
"> ]> <x x="&d;&d;A&a; &a;B&da;"/> Actual results: <?xml version="1.0"?> <!DOCTYPE x [ <!ENTITY d "
"> <!ENTITY a "
"> <!ENTITY da "
"> ]> <x x=" A B "/> Expected results: <?xml version="1.0"?> <!DOCTYPE x [ <!ENTITY d "
"> <!ENTITY a "
"> <!ENTITY da "
"> ]> <x x=" A B "/> Does this happen every time? Yes. Other information:
Sorry, no. You misread the spec what you expect should only be the output for an attribute of type NMTOKENS, which is not the case in your document ! Try again and read the 3rd column of the example :-) Daniel
I disagree. The third column (CDATA case) in the second example in the spec says #x20 #x20 A #x20 #x20 #x20 B #x20 #x20, which translates to " A B " (mind the number of spaces), not " A B ".
Okay, agreed, it's a special recursive treatment for the entities replacement text. Fixed in git, thanks ! Daniel
Works for me (2.7.3 patched with http://git.gnome.org/cgit/libxml2/patch/?id=283d50279d2defbcedc940a4261758afa0fe752b). Thanks
Okay :-)