[whatwg] IDness and warnings

Henri Sivonen hsivonen at iki.fi
Mon Nov 6 08:39:16 PST 2006

On Nov 6, 2006, at 17:31, Elliotte Harold wrote:

> It would seem to me to be less work to write an appropriate RELAX  
> NG schema (probably a better idea than a DTD) to catch all these  
> issues than to write individual rules.

I don't know how to emit a warning based on the pre-RELAX-NG- 
validation IDness of attributes using RELAX NG. In fact, I am pretty  
sure it is impossible. First, there's no way to emit warnings using  
RELAX NG. (Unless all errors from a particular validation process are  
turned into warnings by a filter.) Second, RELAX NG does not care  
about pre-RELAX-NG-validation attribute types.

How could I do it?

> External entities could be checked in a separate step.

Since external entities are harmful on the Web, it is not worthwhile  
to spend time on them beyond making sure that the XML parser warns  
when it skips them. (I'd prefer to emit an error instead of a  
warning, but emitting an error should be justifiable from the XML 1.0  
spec and it isn't.)

> One assumes you'd validate against the DTD or schema you that the  
> spec specified rather than the one the document specified.

There's no point in using a DTD like that when RELAX NG is available.

Henri Sivonen
hsivonen at iki.fi

More information about the whatwg mailing list