Jane - As far as I can tell, doing it your way the simpleType declarations
are never actually used. By using the same token "title" with a lower
case first letter it looks like there is a connection between the element
and type declarations, but this is not so - the spec clearly says that
these entities are distinct (e.g. last paragraph of section 2.2 in
http://www.w3.org/TR/xmlschema-0/). The elements are all type "string" ...
Another suggestion: Where you have
...
<element name="dces">
<complexType>
<all>
<element ref="title" minOccurs="0" maxOccurs="unbounded"/>
<element ref="creator" minOccurs="0" maxOccurs="unbounded"/>
<element ref="subject" minOccurs="0" maxOccurs="unbounded"/>
<element ref="description" minOccurs="0" maxOccurs="unbounded"/>
<element ref="publisher" minOccurs="0" maxOccurs="unbounded"/>
<element ref="contributor" minOccurs="0" maxOccurs="unbounded"/>
<element ref="date" minOccurs="0" maxOccurs="unbounded"/>
<element ref="type" minOccurs="0" maxOccurs="unbounded"/>
<element ref="format" minOccurs="0" maxOccurs="unbounded"/>
<element ref="identifier" minOccurs="0" maxOccurs="unbounded"/>
<element ref="source" minOccurs="0" maxOccurs="unbounded"/>
<element ref="language" minOccurs="0" maxOccurs="unbounded"/>
<element ref="relation" minOccurs="0" maxOccurs="unbounded"/>
<element ref="coverage" minOccurs="0" maxOccurs="unbounded"/>
<element ref="rights" minOccurs="0" maxOccurs="unbounded"/>
</all>
</complexType>
</element>
...
I think this means that repeated <subject > elements (etc) have to occur as a block.
OTOH If the cardinality constraint is moved instead onto the grouping element
"choice" (OK according to http://www.w3.org/TR/xmlschema-1/#declare-contentModel)
you get a contant model that is closer to the option/repeatable/order-not-significant idea.
...
<element name="dces">
<complexType>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="title"/>
<element ref="creator"/>
<element ref="subject"/>
<element ref="description"/>
<element ref="publisher"/>
<element ref="contributor"/>
<element ref="date"/>
<element ref="type"/>
<element ref="format""/>
<element ref="identifier"/>
<element ref="source"/>
<element ref="language"/>
<element ref="relation"/>
<element ref="coverage"/>
<element ref="rights"/>
</all>
</complexType>
</element>
...
Jane Hunter wrote:
>
> Hi Simon,
>
> There are alternative ways of defining the DCMES schema. You can do it
> either way. I did it this way because I wanted to keep things as simple
> and clear as possible.
>
> jane
>
> > Jane - I don't quite understand the XSD in your note. You have
> >
> > ...
> > <element name="title" type="string"/>
> > ...
> > <simpleType name="title">
> > <restriction base="string"/>
> > </simpleType>
> > ...
> >
> > Did you mean
> >
> > ...
> > <element name="title" type="Title"/>
> > ...
> > <simpleType name="Title">
> > <restriction base="string"/>
> > </simpleType>
> > ...
> >
> > or am I misunderstanding the intention of the simpleType declaration??
> >
--
[log in to unmask] CSIRO Exploration & Mining
T:+61(8) 9284 8443 F:+61(8) 9389 1906 M:0403 302 672
http://www.ned.dem.csiro.au/research/visualisation/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|