XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] processing instruction with "xml" target

Hi Richard, it's good to be back.

richard@inf.ed.ac.uk (Richard Tobin) writes:

>>Is it reasonable for a processor to treat PIs with "xml"
>>targets as a well-formedness errors?
>
> The XML spec does not explicitly answer this.  Recent versions of the
> Namespaces spec do (in the context of qualified names), and it would
> be reasonable to adopt this approach:
>
>     users SHOULD NOT use them except as defined by later specifications
>
>     processors MUST NOT treat them as fatal errors.
>
> The idea being, of course, that you should only use them if some use
> has been defined, or you're experimenting with some possible use for
> them, and that processors should not reject them because they may make
> sense to downstream processes.

Here's a misguided example that raised this question for me:

<envelope>
 <?xml foo bar?>
 <doc/>
</envelope>

I thought (and you seem to confirm) that while this is bad form,
processors shouldn't throw this out. At least two do. Are they too
draconic?

Libxml2 (xmllint)
parser error : XML declaration allowed only at the start of the
document

Firefox:
XML Parsing Error: xml declaration not at start of external entity

Ari.

-- 
Elections only count as free and trials as fair if you can lose money
betting on the outcome.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS