Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: how to create extensible xml schemas

From: "Paul Kiel" <paul@------.--->
To: "'vijay'" <eranti1@---.--->, <xmlschema-dev@--.--->
Date: 9/7/2004 5:24:00 AM
>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@w... [mailto:xmlschema-dev-request@w...] =
On
Behalf Of vijay
Sent: Friday, September 03, 2004 1:09 PM
To: xmlschema-dev@w...
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




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent