- From: Ross Thompson <rthompson@contivo.com>
- Date: Mon, 1 Oct 2001 16:25:31 -0700
- To: xmlschema-dev@w3.org
I'm a little lost on how the XMLSchema spec defines the processing model. In particular, I don't understand how pattern, whitespace, and derived data types interact. Consider the following example: <simpleType name='query'> <restriction> <union <simpleType name='token'> <restriction base='string'> <whiteSpace value='collapse'/> </restriction> </simpleType> <simpleType name='prose' ref='string'/> </union> <pattern value="\c \c"/> </restriction> </simpleType> (I appologize in advance if this syntax is not 100% kosher. Please read with a gentle parser.) If I understand everything I read correctly, which is a dubious proposition, then no strings will validate against this type unless xsi:type is specified on the element in question. My reasoning is that any string will validate against 'token', which means that the normalized type for the string will have spaces collapsed, which further means that it won't match the pattern for the 'query' type. Question 1: Do I have this right? Question 2: Is there some place that describes a processing model for validation against an XML schema? I find the spec chatty and vague. Thanks, - Ross --- The art of medicine consists in amusing the patient while nature cures the disease. -- Voltaire
Received on Monday, 1 October 2001 19:26:00 UTC