On Wed, Jun 04, 2003 at 03:00:29PM +1000, dIon Gillard wrote:
> Incze Lajos wrote:
>
> > On Wed, Jun 04, 2003 at 07:23:24AM +1000, [EMAIL PROTECTED] wrote:
> >
> >>I'm a schema newbie, and I've done a lot of the changes to the xsd file,
> >>hence it's fairly basic.
> >
> >
> > Me, too. I've never wrote a line of an XSD schema. The bare minimum
> > what can be done (if a schema-guru can't point to a more elegant solution)
> > to define two complex types under project: one with <extends> and one without
> > it. The later one is the same as the current one (without extends), the
> > 1st one is the same but with all required elements made optional. Then
> > the project element can contain the one or the other complex type.
>
> Got an example of this 'one or the other' syntax?
>
Really, really never wrote a schema line. But wrote some DTDs and know,
that in the DTD model you can write (A|B). Now, I checked the XSD spec,
and _believe_ that the syntax would be stg. like this:
<xs:element name="project">
<xs:complexType>
<xs:choice>
<xs:group ref="masterPOM" />
<xs:group ref="childPOM" />
</xs:choice>
</xs:complexType>
</xs:element>
<xs:group name="masterPOM">
... <!-- current pom model without "extends" tag and with
required elements forced -->
</xs:group>
<xs:group name="childPOM">
... <!-- current pom model with "extends" tag required and with
other master POM elements made optional -->
</xs:group>
incze (wild guessing the XSD intricacies)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]