|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Remember to RELAX
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








