W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2004

Range extension with redefine

From: Hirtle, David <David.Hirtle@nrc-cnrc.gc.ca>
Date: Thu, 29 Apr 2004 17:57:39 -0400
Message-ID: <10C94843061E094A98C02EB77CFC32870A1E2E58@nrcmrdex1d.imsb.nrc.ca>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Cc: "Hirtle, David" <David.Hirtle@nrc-cnrc.gc.ca>
A simple question: How does one "extend" a particle's occurrence range with
<redefine>?  I am familiar with the specification's discussion of valid
restrictions (http://www.w3.org/TR/xmlschema-1/#cd-model-restriction), but
there seems to be no way to do the opposite of _extending_ an occurrence
range.

For example:

one.xsd
-------
<xs:group name="some_group">
	<xs:sequence>
		<xs:element ref="a"/>
	</xs:sequence>
</xs:group>


two.xsd
-------
<xs:redefine schemaLocation="one.xsd">
	<xs:group name="some_group">
		<xs:sequence>
			<xs:element ref="a" minOccurs="0"
maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:group>
</xs:redefine>

The above is clearly not permitted (extending groups requires a
self-reference with minOccurs = maxOccurs = 1), but shouldn't it be
possible?  I find myself needing to do just this sort of thing, and, despite
a good deal of effort, I've been unsuccessful.  Now I'm just frustrated.

Am I missing something?  Is there a workaround to accomplish this?

Thanks for any help you can provide.

David
Received on Thursday, 29 April 2004 18:06:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:11 UTC