OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

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

[ Lists Home | Date Index | Thread Index ]

[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






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS