[ 
https://issues.apache.org/jira/browse/XERCESC-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13046521#comment-13046521
 ] 

Leif Halvard Silli commented on XERCESC-1967:
---------------------------------------------

Of course it says so about the file - other places in the spec. However, that 
specific section *do* speak about files that are served over HTTP. The thinking 
goes like this: as you say, it is likely that the file has a correct 
declaration. And therefore it should be adherted to over HTTP too. But as you 
say, this is a spec issue - not decided in this bug. However, attention to the 
problem and, eventually, disagreement with the spec, does matter.  The 
transcoding issue is the justification for text/xml. But it is not the 
justification - in RFC3023 (perhaps it is, in the HTTP rfc?) - for 
application/xml.

I agree that parse should refuse, yes, per the specs as they stand. I am not 
sure that parsers should behave that way, though. So, you must make a judgement 
yourself about whether to fix it.

Libxml2 adheres to RFC3023. However, for files on the computer, then libxml2 
does not adhere to XML 1.0. See  bug: 
https://bugzilla.gnome.org/show_bug.cgi?id=652185  The Libxml2 bug also 
includes an attachment which you should test. Fact is that Xerces has the same 
bug as Libxml. Link to attachment: 
https://bugzilla.gnome.org/attachment.cgi?id=189543

> Xerces ignores (deletes, swallow, ignores) the UTF-8 BOM and also ignores the 
> charset parameter of the HTTP content-type: header
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: XERCESC-1967
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1967
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Non-Validating Parser
>    Affects Versions: 3.1.1
>         Environment: Mac OS X Snow Leopard (Intel).  
> (http://mirrorservice.nomedia.no/apache.org//xerces/c/3/binaries/xerces-c-3.1.1-x86-macosx-gcc-4.0.tar.gz)
> And also tested the XMLmind XML editor on same platorm.
>            Reporter: Leif Halvard Silli
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> [1] http://www.w3.org/mid/[email protected]
> [2] http://www.w3.org/mid/[email protected]
> It is a XML 1.0 spec vioation. well-formed violation.
> Test cases without XML declaration: http://malform.no/testing/html5/bom/
> Test cases *with* XML declartion to be added later.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to