Lists Home |
Date Index |
- From: "Arnold, Curt" <Curt.Arnold@hyprotech.com>
- To: "'firstname.lastname@example.org'" <email@example.com>
- Date: Tue, 01 Aug 2000 15:44:38 -0600
You can kludge the <xsd:unique> constraint to achieve some level
of cocurrence constraint (such as name and ref cannot appear at the same
time on an element), however it is so ugly and so useful that
there should be a <xsd:prohibit> when you never want a pattern to
occur (see http://lists.w3.org/Archives/Public/www-xml-schema-comments/2000JulSep/0010.html)
xsi:type doesn't seem to be a very satisfying answer to this issue.
You look at xsi:type="UK-Address" in the examples and think that
there should have been some way to imply that from a country="UK"
<xsd:complexType ref="UKAddress" when="@country='UK'"/>
<xsd:complexType ref="USAddress" when="@country='US'"/>
Of course, you want to be able to determine the type by only
looking at the attributes (or at most things along the ancestor axis).
And there is the chicken and egg syndrome of what type do you
use for @country before a type for the element is chosen (assuming
that future versions of XPath become type aware).
I did suggest something like this back in January on the Schema comments list
However, I did not reiterate this during the last call period.