I want to define an element in my schema that is allowed to wrap any other
element(s). I have been wrapping all my other elements with refs to the
"anywhere element"
like the example below. EmbeddedFile is an element that can come before,
after, (not at all) or in the middle of any of the other elements. Problem
with this approach is that I have to put refs to EmbeddedFile in the
definition of every other element in my schema.
<xsd:complexType name="VolumeType">
<xsd:sequence>
<xsd:element ref="EmbeddedFile" minOccurs="0"
maxOccurs="unbounded"/>
<xsd:element ref="MetaData" minOccurs="0"
maxOccurs="1"/>
<xsd:element ref="EmbeddedFile" minOccurs="0"
maxOccurs="unbounded"/>
<xsd:element ref="Driver" minOccurs="0"
maxOccurs="unbounded"/>
<xsd:element ref="EmbeddedFile" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="id" type="IDAttribType"
use="required"/>
<xsd:attribute name="label" type="LabelAttribType"
use="optional"/>
<xsd:attribute name="version" type="VersionAttribType"
use="optional"/>
</xsd:complexType>
I'm hoping that someone knows a better way to express this.
Thanks
David Schulze
DeLorme Mapping
Yarmouth, ME, USA
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]