Next in thread → Next in month →

Re: [xml-dev] help in processing compositor's in XML Schema?

From
Thomas B. Passin <>
To
Date
2002-03-12T02:04:20Z
ID
<004401c1c96a$3963c240$0bf13044@tbp>
Thread
Re: [xml-dev] help in processing compositor's in XML Schema?
[CHIUSANO, Joseph]

> You can accomplish this with model groups. You can create one model group
to
> hold the "header" elements, and one to hold the "child" elements (both
must
> be declared globally). Within each model group, specify the "choice"
> compositor to avoid having order enforced. For example:
>
> <xsd:group name="HeaderElementGroup">
>      <xsd:all>
>           <xsd:element name="header1" type="[sometype]">
>           <xsd:element name="header2" type="[sometype]">
>           <xsd:element name="header2" type="[sometype]">
>      </xsd:all>
> </xsd:group>
>

Maybe, but it depends on the cardinality that Bill needs.  If he needs
exactly one of each but wants them to be unordered, I don't think you can do
that with XML Schema, even with "choice" model groups (because you can't
require exactly one of each).  Schematron can do it nicely, though.

Cheers,

Tom P
Next in thread → Next in month →