W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

Re: More surprises (ID, ENTITY, NOTATION, ...)

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 22 Oct 2001 11:25:48 +0100
To: Eric van der Vlist <vdv@dyomedea.com>
Cc: xmlschema-dev@w3.org
Message-ID: <f5bk7xokm37.fsf@cogsci.ed.ac.uk>
Eric van der Vlist <vdv@dyomedea.com> writes:

> Many types (see below ID, ENTITY and NOTATION but there are more in the rec)
> are defined with whitespace="collapse" which would have made me think that
> leading and trailing whitespaces should be accepted and trimmed but their
> description clearly says that their lexical space should meet a production
> (NCName) which does not accept these whitespaces.

All lexical constraints, including the 'pattern' facet of NCName,
apply to the (schema) *normalized value* of elements/attributes, which 
is the _result_ of whitespace processing.  So it all works out just
fine.

See [1] for details.

> Do we really want to forbid this ?
> 
> <book>
>   <id xsi:type="xs:ID">
>     book1
>   </id>
> </book>

No, and it's not forbidden, it's just fine, just as

<foo id="
       book1      
"/>

would be OK in XML 1.0 with id declared an ID, precisely because the
constraints on lexical form come _after_ whitespace normalisation.

ht

[1] http://www.w3.org/TR/xmlschema-1/#section-White-Space-Normalization-during-Validation
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
Received on Monday, 22 October 2001 06:25:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:24 GMT