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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: Remember to RELAX

[ Lists Home | Date Index | Thread Index ]
  • From: "Arnold, Curt" <Curt.Arnold@hyprotech.com>
  • To: "'xml-dev@xml.org'" <xml-dev@xml.org>
  • 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"
attribute.

Something like,

<xsd:element name="address">
	<xsd:complexType ref="GenericAddress"/>
	<xsd:complexType ref="UKAddress" when="@country='UK'"/>
	<xsd:complexType ref="USAddress" when="@country='US'"/>
	...
</xsd:element>

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
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2000JanMar/0032.html
However, I did not reiterate this during the last call period.





 

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

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