Re: Supporting incremental-definition of a type?
Mukul Gandhi <[email protected]> Mon, 18 Jun 2012 22:20:52 +0100
| Newsgroups | gmane.text.xml.schema.devel |
|---|---|
| Message-ID | <CABuuzNMYfohFxfNxH5d2UA9dCKZiZWMA7KYWRhCwKgM3VXRynQ@mail.gmail.com> |
Hi Mike, I wish, assertions allowed you to define a schema for XSLT as you want. But I believe, XSD assertions have other many uses than defining the schema for XSLT :) On Mon, Jun 18, 2012 at 9:53 PM, Michael Kay <[email protected]> wrote: > I think it would have been much better if we had allowed assertions to be > defined within an <xs:extension> I think, this is allowed presently by the XSD 1.1 language. Following are the relevant grammar fragments of the XSD complexType (copied from the spec), <complexContent id = ID mixed = boolean {any attributes with non-schema namespace . . .}> Content: (annotation?, (restriction | extension)) </complexContent> <extension base = QName id = ID {any attributes with non-schema namespace . . .}> Content: (annotation?, openContent?, ((group | all | choice | sequence)?, ((attribute | attributeGroup)*, anyAttribute?), assert*)) </extension> It seems, an xs:assert in complexType xs:extension has the same semantic meaning as an xs:assert within xs:restriction (i.e a orthogonal co-occurrence constraint in addition to the content model derivation constraint). -- Regards, Mukul Gandhi