W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2001

Re: Choosing Between ComplexTypes

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Mon, 02 Jul 2001 19:12:07 +0200
Message-ID: <3B40AB67.B203EAA6@dyomedea.com>
To: "Sean B. Palmer" <sean@mysterylights.com>
Cc: xmlschema-dev@w3.org
"Sean B. Palmer" wrote:
> I want to be able to express a very general element type:-
>    <!ELEMENT a ( b | ( c | #PCDATA )* ) >

As you've said, I think you're stuck :(

'mixed="true"' is a property of the parent element (a in this case) that
can be either true or false (not true when c and false when b).

To the classic answer (add a schematron rule or shift to RELAX NG), we
can add the elegant workaround [1] proposed by Jeni this morning on
xml-dev using abstract datatypes.

[1] http://lists.xml.org/archives/xml-dev/200107/msg00038.html

Note that the schema still needs then a hint (expressed as an xsi:type
attribute in the instance document) to determine which case we are

Hope this helps.

> --
> Kindest Regards,
> Sean B. Palmer
> @prefix : <http://webns.net/roughterms/> .
> :Sean :hasHomepage <http://purl.org/net/sbp/> .

See you at XTech in San Diego.
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
Received on Monday, 2 July 2001 13:12:28 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:52 UTC