- From: Paul Kiel <paul@hr-xml.org>
- Date: Tue, 7 Sep 2004 09:24:16 -0400
- To: "'vijay'" <eranti1@aol.com>, <xmlschema-dev@w3.org>
- Message-ID: <000f01c494dd$f9a61170$6401a8c0@monkeyboy>
>it is a pretty touchy subject of which way is better Yes. I think more appropriately, it is probably which method is better "for a particular set of circumstances" and maybe not a one-size-fits-all. At any rate, on the xs:all issue, our experience has not been good with it. We found that xs:all tends to lead to more ambiguous content models. Some parsers are better than others at alerting you to these. And because we want our standards to interoperate with many parsers and with hopefully no warnings, we have discouraged its use. Another reason we discourage it, is that it does almost the same thing as xs:sequence only without the predictability. While we don't advocate using order to deliver semantic meaning, we like the idea of xs:sequence providing a more predictable content model than xs:all. Not saying xs:all is bad by nature, those are just our reasons for choosing the xs:sequence. Paul Kiel HR-XML Consortium -----Original Message----- From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org] On Behalf Of vijay Sent: Friday, September 03, 2004 1:09 PM To: xmlschema-dev@w3.org Subject: how to create extensible xml schemas Hi folks, There are several ways to create xml schemas for web services which are extensible and it is a pretty touchy subject of which way is better. I was wondering what is a good way to create extensible schemas with good structure and semantics. By extensible, i meant given a complex type, additional elements can be added into the type etc.,. without violating the schema. should we use complex type inheritance, substitution groups or xs:choice or should we use xs:any element in every structure for future extensibility. Regarding schema design best practices for extensibility, i saw atleast couple of documents which contradict each other on this issue. Is there any reference place where i can find more info ? Since xml stores data and if we are mapping say a class to an xml structure and members of class as child elements, the order of the elements is not important and what matters is data being present. If additional data is present, we can ignore that but the core data a server/client expects should be present. I was wondering if it makes sense to use a pattern of using xs:all instead of xs:sequence and having an additional xs:any element inside xs:all in addition to the known elements satisfies this requirements ? This way, having every structure to use xs:all with an extra xs:any child element with processingContents as lax will help us to create schemas which are flexible and backward compatible. Any opinions on using xs:all versus xs:sequence ? regards vijay
Received on Tuesday, 7 September 2004 13:24:14 UTC