[xml/sgml-pkgs] Bug#862322: Bug#862322: [libxml2] Wrong warning/error about "colons are forbidden from PI names"

Andre Naujoks nautsch2 at gmail.com
Thu May 11 13:55:33 UTC 2017


On 05/11/17 11:40, Mattia Rizzolo wrote:
> Control: tag -1 upstream
> 
> On Thu, May 11, 2017 at 10:44:54AM +0200, Andre Naujoks wrote:
>> When parsing an XML Document, libxml2 wrongly reports an error
>> (seemingly without further consequences) about colons not being allowed
>> in Processing-Instruction names.
>>
>> This is not true. The XML Specification
>> (https://www.w3.org/TR/REC-xml/#sec-pi and
>> https://www.w3.org/TR/REC-xml/#NT-Name) explicitly allows a colon (':')
>> as part of a PITarget, which is a Name in the XML specifications terms.
>> The last Version of the XML Specification, where a colon was not allowed
>> in a processing instruction name is over 20 years old and I think can be
>> safely ignored by now: https://www.w3.org/TR/WD-xml-lang-970331#NT-Name
>>
>> Attached is a test document (test.xml), which triggers the warning, when
>> used for example with xmlstarlet like this:
>>
>> Also attached is a patch (libxml2_patch_colons_in_pinames.patch), that
>> removes the bit of code from libxml2, that triggers the message.
>>
>> I am not sure about the side effects of the removed function-call, but
>> from the comments in the code it seems it should have aborted
>> processing. It specifically states for xmlNsErr: "Handle a fatal parser
>> error, i.e. violating Well-Formedness constraints". However it does not
>> really abort, which might warrant another bug report.
> 
> Please, could you file this bug upstream?
> We don't want to include patches that are not upstream, exactly because
> there might very well be side effects otherwise not clear.
> Here is where:
> https://bugzilla.gnome.org/buglist.cgi?product=libxml2
> https://bugzilla.gnome.org/enter_bug.cgi?product=libxml2
> 

Done: https://bugzilla.gnome.org/show_bug.cgi?id=782520

Is it possible to link this bug to the upstream bug? I mean in a more
direct way than the textual link above.

Regards
  Andre



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 512 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/debian-xml-sgml-pkgs/attachments/20170511/2b1e3006/attachment.sig>


More information about the debian-xml-sgml-pkgs mailing list