[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Remember to RELAX

  • From: "Arnold, Curt" <Curt.Arnold@h...>
  • To: "'xml-dev@x...'" <xml-dev@x...>
  • Date: Tue, 01 Aug 2000 15:44:38 -0600

complextype ref
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.


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.