OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Modular schemas.

I wish I could create a modular schema, where I can override some
definitions in future versions
of the schema.
At the moment, I plan to use substitutionGroup, but I am still unsure
of the original schema
to define.

Here is for example the schema for a <optionalAttribute> element:

   <xs:element name="optionalAttribute" type="optionalAttribute_type">

  <xs:complexType name="optionalAttribute_type" mixed="true">
     <xs:group ref="optionalAttribute_elements"/>
     <xs:attributeGroup ref="optionalAttribute_attributes"/>

   <xs:attributeGroup name="optionalAttribute_attributes">

   <xs:group name="optionalAttribute_elements">

This schema is pretty much hollow. No specified attribute, no specified inner
content (except textual content, via the mixed="true")

I hope such a schema to validate this XML with no problem:

xsi:noNamespaceSchemaLocation="Issue1.xsd" >

Unfortunately, this schema is invalid : It is illegal to create an
empty "optionalAttribute_elements" group.
What is the correct way to define a group that contains nothing? or just text?

Note: Please keep in mind that this schema is engineered that way so
future versions of the schema can heavily refactor the groups, via

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS