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

Occurrence Range Extensions

From: David Z. Hirtle <david.hirtle@unb.ca>
Date: Mon, 5 Jan 2004 19:01:14 -0400
To: <xmlschema-dev@w3.org>
Message-ID: <FFEHLNKGGNMDMIEFOKMFMEOOCDAA.david.hirtle@unb.ca>

Good day.

I'm trying to derive a content model consisting of 1 or more choices of two
elements, as follows:

(ind | var)+

from a content model consisting of only two such choices:

(ind | var), (ind | var)



	<xs:group name="choice">
			<xs:element ref="ind"/>
			<xs:element ref="var"/>

	<xs:group name="x.content">
			<xs:group ref="choice" minOccurs="2" maxOccurs="2"/>


	<xs:group name="x.content">
			<xs:group ref="choice" minOccurs="1" maxOccurs="unbounded"/>

(It's a little more complicated than this, hence the separate group I've
called "choice", but this is what it boils down to.)

No matter what I try, I can't seem to accomplish this.  In the end, I need
to accomplish this using a redefine, but I can't see how to approach it even
in the same file.  As far as I can tell, it can't be done with an extension
because having the group reference itself would result in an unwanted
content model, and the occurrence range isn't a valid restriction (going
from 2 to 1 or more), so it doesn't seem that it can be done that way,

I haven't been able to find any such examples online.  Perhaps I'm missing
something obvious.  It seems like this would be a common enough thing to
want to do.

Thank you very much for any assistance you can provide.

Received on Monday, 5 January 2004 18:03:54 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:04 UTC