Re: A note to implementors about entities in external instance data

On Oct 27, 2006, at 15:54, Steven Pemberton wrote:

> On Fri, 27 Oct 2006 13:30:31 +0200, Henri Sivonen <hsivonen@iki.fi>  
> wrote:
>
>> On Oct 13, 2006, at 15:32, Steven Pemberton wrote:
>>
>>> Seeing the following:
>>> 	http://www.w3.org/2002/04/xml_bugs/#bug4
>>
>> The document is clearly referring to Gecko's behavior without  
>> naming names.
>
> Not necessarily. That document was documenting common bugs in XML  
> parsers, possibly due to misreading of the spec. I have seen the  
> bugs in more than just Gecko. In fact in my cases, Gecko did it  
> right (because it did something special with the namespace).

Doing something special with entities based on namespace is not  
right. AFAIK, Gecko does no such thing. (The entity hack is keyed on  
public id.)

>> But then, it is not reasonable to rely on DTDs on the Web, so this  
>> slight misfeature in Gecko is useful in discouraging the use of DTDs.
>
> I think it is orthogonal to the use or not of DTDs. For instance,  
> in my case I wanted to process documents that included (character)  
> entities. Non-validating XML parsers are not allowed to declare  
> those as non-wellformed just because they use externally-defined  
> entities.

I agree that declaring them non-well-formed is wrong. (However, in  
the case of Gecko, it is not a bug in expat but a consequence of how  
expat is driven.) Still, the *application* is free to refuse to deal  
with documents that have unresolved entities. That might not be a  
good idea for browsers, but using entities (other than the 5  
predefined ones) on the Web is a bad idea, too.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Friday, 27 October 2006 14:47:10 UTC