This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The content of the <restriction> element in <complexType>::<simpleContent> is defined as follows: 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*) There are 2 assert elements (one belongs in the facets and the other belongs to the complex type). However, the way the grammar is defined, there is no way to differentiate between the 2 asserts. I would propose we either remove the assert in the facets or change its name to something like assertFacet.
I agree with Sandy. Apart from his comments, I have following observation ... In the grammar fragment, which Sandy posted, there is following fragment: (minExclusive | minInclusive | maxExclusive | maxInclusive | totalDigits | fractionDigits | maxScale | minScale | length | minLength | maxLength | enumeration | whiteSpace | pattern | assert | {any with namespace: ##other})* This is of form, (a | b | c ... | x)* , where a, b, etc. are facets. This grammar format gives me a feeling, that *only 1 facet* (because of the pipe sign) can be present in <xs:restriction element. And the facet which is present, can appear 0-n times. But in reality, I think we can have multiple facet definitions on a single xs:restriction definition, like following: <restriction base=".." <facet1 value="" /> <facet2 value="" /> ... more facets </restriction> Is the grammar format, (a | b | c ... | x)* correct regarding facets? My doubt comes from the fact, that the | symbol is used to select alternatives. Regards, Mukul
On 2008-10-10, the working group adopted a proposal to address this issue by changing the facet element name from "assert" to "assertion". (This is mostly a datatypes change.) The proposal adopted can be found here (member-only): http://www.w3.org/XML/Group/2004/06/xmlschema-2/datatypes.b5906.html There were a couple amendments to the above proposal: - An additional <assert> is replaced with <assertion> - Added "assert" to the Schema and DTD for schemas where it was missing