[Home] [By Thread] [By Date] [Recent Entries]

  • From: Ari Krupnik <ari@c...>
  • To: xml-dev@l...
  • Date: Wed, 13 Sep 2006 15:40:41 -0700

Hi Richard, it's good to be back.

richard@i... (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]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member