- From: Norman Walsh <Norman.Walsh@East.Sun.COM>
- Date: 22 Nov 2000 13:28:06 -0500
- To: www-xml-schema-comments@w3.org
- CC: "W3C XML Schema IG" <w3c-xml-schema-ig@w3.org>
The current definition of redefine says: That is, type definitions must use themselves as their base type definition, and attribute group definitions and model group definitions must include exactly one reference to themselves. This restriction means that attribute and model groups can only be extended. I find this restriction severely limiting. Consider the following use case: I have a schema which defines a model group: <xsd:group name='bookcomponent.content'> <xsd:choice> <xsd:sequence> <xsd:choice minOccurs='1' maxOccurs='unbounded'> <xsd:group ref='db:divcomponent.mix'/> </xsd:choice> <xsd:choice> <xsd:element ref='db:sect1' minOccurs='0' maxOccurs='unbounded'/> <xsd:group ref='db:refentry.class' minOccurs='0' maxOccurs='unbounded'/> <xsd:element ref='db:simplesect' minOccurs='0' maxOccurs='unbounded'/> <xsd:element ref='db:section' minOccurs='0' maxOccurs='unbounded'/> </xsd:choice> </xsd:sequence> <xsd:choice> <xsd:element ref='db:sect1' minOccurs='1' maxOccurs='unbounded'/> <xsd:group ref='db:refentry.class' minOccurs='1' maxOccurs='unbounded'/> <xsd:element ref='db:simplesect' minOccurs='1' maxOccurs='unbounded'/> <xsd:element ref='db:section' minOccurs='1' maxOccurs='unbounded'/> </xsd:choice> </xsd:choice> <!-- "((%divcomponent.mix;)+, (sect1*|(%refentry.class;)*|simplesect*|section*)) | (sect1+|(%refentry.class;)+|simplesect+|section+)" --> </xsd:group> This model group is used in the content model of a whole bunch of elements. Now suppose that I want to write a derivative schema that allows only "section" elements (and not sect1 or simplesect or refentry) where currently all four are allowed. What I want to be able to do is redefine bookcomponent.content as a restriction of itself and let that do all the work for me. But I can't because my redefinition has to include exactly one reference to itself. Be seeing you, norm -- Norman.Walsh@East.Sun.COM | Every new beginning comes from some other XML Technology Center | beginning's end. Sun Microsystems, Inc. |
Received on Wednesday, 22 November 2000 13:31:53 UTC