GNOME Bugzilla – Bug 736417
xmllint: "parser error : '<' in entity 'name' is not allowed in attributes values" on repeated recursive entity expansion containing <
Last modified: 2014-10-08 08:12:57 UTC
This test case <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE testfile [ <!ENTITY test "<"> ]> <root> <leaf0 attribute="&test;" /> <leaf1 attribute="&test;" /> </root> yields 8: parser error : '<' in entity 'test' is not allowed in attributes values <leaf1 attribute="&test;" /> There is no problem when removing leaf1. So the first occurrence of &test; is ok, but the second one fails. Maybe there is a problem caused by entity caching?
Interesting bug :-) and due to a weird side effect and a failure to properly parenthesize a boolean expression now fixed: thinkpad:~/XML -> xmllint attrib_ent.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE testfile [ <!ENTITY test "<"> ]> <root> <leaf0 attribute="&test;"/> <leaf1 attribute="&test;"/> </root> thinkpad:~/XML -> https://git.gnome.org/browse/libxml2/commit/?id=7cf57380b11d20b0bd4c86a493db7a0e1d0f0071 thanks for the report, a good one ! :-) Daniel