Hi Mukul,

There is a problem with the grammar for <restrintion> of <simpleContent>. 
The way it is defined there is no way to differentiate between the 2 
assert elements (the one in the facets and the one that follows the 
wildcards since everything in between is optional). We have raised the 
issue to the W3C working group.

You can have multiple facet definitions. However, with the exception of 
pattern and enumeration (will wait for a clarification on assert), you can 
only have one definition for a given facet (i.e. no multiple 'minLength' 
facets definitions in the same restriction element).


Khaled





Michael Glavassevich/Toronto/[EMAIL PROTECTED] 
07/29/2008 10:08 AM
Please respond to
[email protected]


To
[email protected]
cc

Subject
Re: Clarification needed regarding facets






Hi Mukul,

The intention is that there can be multiple assertions [1] specified. I 
haven't checked the grammar in the spec itself. It may contain errors 
which should be pointed out to the XML Schema WG.

Thanks.

[1] http://www.w3.org/TR/xmlschema11-2/#xr-assertions

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

"Mukul Gandhi" <[EMAIL PROTECTED]> wrote on 07/29/2008 09:22:07 AM:

> Hi all,
>   In the XML Schema structures spec, at 
http://www.w3.org/TR/xmlschema11-1/ .
> 
> Please read the following section,
> 3.4.2.2 Mapping Rules for Complex Types with Simple Content
> 
> and this definition [1]:
> 
> <restriction
>   base = QName
>   id = ID
>   {any attributes with non-schema namespace . . .}>
>   Content: (annotation?, (simpleType?, (minExclusive | minInclusive |
> maxExclusive | maxInclusive | totalDigits | fractionDigits | maxScale
> | minScale | length | minLength | maxLength | enumeration | whiteSpace
> | pattern | assert | {any with namespace: ##other})*)?, ((attribute |
> attributeGroup)*, anyAttribute?), assert*)
> </restriction>
> 
> Here, this part is I believe is a facet definition (can we call these
> facets here?), applying to this type:
> 
> (minExclusive | minInclusive | maxExclusive | maxInclusive |
> totalDigits | fractionDigits | maxScale | minScale | length |
> minLength | maxLength | enumeration | whiteSpace | pattern | assert |
> {any with namespace: ##other})*
> 
> This grammar gives me a feeling, that *only 1 facet* can be present in
> Schema (with 0-n instances of this single facet).
> 
> But in reality, I think we can have multiple facet definitions on a
> single xs:restriction definition, like following [2]:
> 
> <restriction base=".."
>   <facet1 value="" />
>   <facet2 value="" />
>   <assert test="" />
> </restriction>
> 
> My questions are,
> 1) Is the Schema grammar [1] correct, and what is the interpretation
> regarding the number and ordering of facet definitions?
> 2) Is my statement [2] correct? If yes, then the code I submitted for
> assertions patch has a bug. I have assumed, that we can have only 1
> facet (with 0-n in numbers).
> 
> Could you please clarify this, so I can resolve the likely bug in my 
code.
> 
> 
> -- 
> Regards,
> Mukul Gandhi
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to