- From: Hirtle, David <David.Hirtle@nrc-cnrc.gc.ca>
- Date: Fri, 28 Nov 2003 21:39:17 -0500
- To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Good day. A project I'm currently working on first involved the modularization of about a dozen DTDs, which was easily accomplished using content model parameter entities as has been done with XHTML (see [1]). I'm having difficulty translating this family of DTDs into XML Schema, however (despite the similarity between groups and parameter entities). Using XMLSPY, I originally thought I had succeeded. But, of course, I was wrong. XSV doesn't care for what I've done: the first static schema is fine, but subsequent redefining modules get the following error: "redefined group not a restriction of its original definition". From what I've read, the specification isn't absolutely clear about redefining by extension, which is where my problems lie. I am familiar with "Schema Representation Constraint: Redefinition Constraints and Semantics" and clause 6.1 where a redefined group must include a reference to itself (having read previous questions on the subject such as [2]), as in the following example: <xs:redefine schemaLocation="schema.xsd"> <xs:group name="foo"> <xs:choice> <xs:group ref="foo"/> <xs:element name="bar"/> </xs:choice> </xs:group> </xs:redefine> But following some examples (and actual implementations) I've seen in the Modularization of XHTML in XML Schema Working Draft [3], this isn't strictly necessary. For example, they do the following: <xs:redefine schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-struct-1.xsd"> <xs:group name="head.content"> <xs:sequence> <xs:group ref="HeadOpts.mix" minOccurs="0" maxOccurs="unbounded"/> <xs:choice> <xs:sequence> <xs:element ref="title"/> <xs:group ref="HeadOpts.mix" minOccurs="0" maxOccurs="unbounded"/> <xs:element ref="base" minOccurs="0"/> </xs:sequence> <xs:sequence> <xs:element ref="base"/> <xs:group ref="HeadOpts.mix" minOccurs="0" maxOccurs="unbounded"/> <xs:element ref="title"/> </xs:sequence> </xs:choice> <xs:group ref="HeadOpts.mix" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:group> </xs:redefine> where the group is orginally as follows: <xs:group name="head.content"> <xs:sequence> <xs:group ref="HeadOpts.mix" minOccurs="0" maxOccurs="unbounded"/> <xs:element ref="title"/> <xs:group ref="HeadOpts.mix" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:group> Is this permissible? I realize it's a working draft, but I can only assume they know what they're doing. Given that XSV is still in beta, could it be a little too strict? (If it's helpful, I can provide links to my schemas.) Thanks. David Hirtle [1] http://www.w3.org/TR/xhtml-modularization/ [2] http://lists.w3.org/Archives/Public/xmlschema-dev/2001Nov/0138.html [3] http://www.w3.org/TR/xhtml-m12n-schema/
Received on Friday, 28 November 2003 21:42:05 UTC