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