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]
