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

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

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Tue, 23 Oct 2001 09:08:20 +0200
Message-ID: <3BD51764.6010503@dyomedea.com>
To: xmlschema-dev@w3.org

Thanks for the demonstration!

Attributes are a specific case since XML 1.0 defines its own whitespace 
processing for them...

Anyway, if I understand your explanation correctly, my mistake was my 
perception of what is the lexical space: I thought that the lexical 
space was what we got from a parser while I understand now that there is 
a processing involved.

To make sure I get it right by now, I'd like to try to explain it with 
my own words...

We can distinguish not 2 but (at least) 5 spaces:

1) The serialization space.

This is the "value" as actually written in the document after expension 
of internal and external parsed entities. Per XML 1.0, this value isn't 
significative and is submitted to the applications after a first 
whitespace processign depending on its location (attribute or element) 
and (when in an element ) to the xml:space attribute.

2) The parser space.

This is the value sent by a conform parser to the application after the 
XML 1.0 whitespace processing.

3) The lexical space.

This is the parser space after W3C XML Schema whitespace processing 
depending on the xs:whitespace facet of the datatype.

4) The value space.

This is the abstract concept behind the datatype.

5) The canonical space.

This is the ensemble of the canonical representations of the elements of 
the value space.

(The canonical value may be difficult to determine for "special" types 
such as QNames).

And the facets can be classified into 3 different categories:

1) xs:whitespace

This facet is the definition of the whitespace processing taking place 
between the parser space and the lexical space.

2) xs:pattern

This is the only facet constraining the lexical space.

3) Other facets

They are all constraining the value space.

Would you agree with this summary?



Henry S. Thompson wrote:

> Ross Thompson <rthompson@contivo.com> writes:
>>    [Definition:] pattern is a constraint on the value space of a
>>    datatype which is achieved by constraining the lexical space to
>>    literals which match a specific pattern. The value of pattern must
>>    be a regular expression.
>>So, I dispute your claim.
> Not sure how you think this affects my claim (that whether an
> attribute value or element content is among the members of a
> lexical space is determined by the post-whitespace-processing version
> thereof), but here's how it goes:
> The fundamental rule wrt datatype validity is [1], which starts
>  "A string is datatype-valid with respect to a datatype definition if: 
>     1 it matches a literal in the lexical space of the datatype. . ."
> And the connection to this from validation as a whole comes from [2],
> which says:
>  "Validation Rule: String Valid 
>      A string is locally valid with respect to a simple type
>      definition if it is schema-valid with respect to that definition
>      as defined by Datatype Valid in [XML Schemas: Datatypes]."
> and one further step back is [3] which says
>   "Validation Rule: Attribute Locally Valid 
>       For an attribute information item to be locally valid with
>       respect to an attribute declaration all of the following must be
>       true:
>          . . .
>          3 The item's *normalized value*  must be locally
>            valid with respect to that {type definition} as per String 
>            Valid (3.14.4). 
> and finally *normalized value* is defined at [4], to whit:
>   "[Definition:] The normalized value of an element or attribute
>   information item is an initial value whose white space, if any, has
>   been normalized according to the value of the whiteSpace facet of
>   the simple type definition used in its validation. . .
> Similarly for elements.
> Q.E.D.
> ht
> [1] http://www.w3.org/TR/xmlschema-2/#defn-validation-rules
> [2] http://www.w3.org/TR/xmlschema-1/#section-Simple-Type-Definition-Validation-Rules
> [3] http://www.w3.org/TR/xmlschema-1/#section-Attribute-Declaration-Validation-Rules
> [4] http://www.w3.org/TR/xmlschema-1/#key-nv

Rendez-vous  Paris pour le Forum XML.
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
Received on Tuesday, 23 October 2001 03:08:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:54 UTC