Re: Whitespace around enumerated attribute values

> Note that I was talking about document conformance to err on the  
> prudent side when it comes to actual interop issues. I was silent on  
> whether processing in UAs should be changed not to trim whitespace in  
> attribute values.

Ah. Yes being stricter in what you generate than what you accept is of
course sensible. Currently though we just structure the definition (of
these attributes and everything else) with a single grammar, which would
need to be the more permissive one as a grammar is (by definition at
least) the definition of what a system should accept although of course
it can also be used to give hints to document generation tools.
There could of course be a separate strict grammar or prose text giving
a conformance requirement for authoring systems, if that's what we
decided we wanted....

I think in most schema languages specifying an attribute to take one of
an enumerated list of tokens will by default imply white space stripping
(as that is what the XML spec specifies for for any attribute type other
than CDATA and xsd specifies for every primitive type except xsd:string)
but of course the stricter version could be done by restricting
xsd:string with a regular expression pattern.


David

Received on Monday, 7 January 2008 15:44:08 UTC