XSD Deficiency: Incompatibility of xs:add and xs:any
(This is a re-post as my prior attempt didn't seem to come through.
Hope this doesn't result in duplication.)
Hello XML Gurus,
I am quite new to XML, and could be missing something very basic, so I
hope that you will be able to enlighten me. I am working on an
application where I had hoped to use XML as a data storage and
interchange format. In writing similar applications previously that
worked with simple tabular data, it was almost always very important
to write the application in a manner such that it would support two
fundamental rules regarding extensibility for data storage and
To help illustrate these rules, consider an application that requires
an input table which must contain columns A and B. Then the
extensibility rules that I am having a problem with in XSD can be
stated as follows:
1. The application should function correctly regardless of the order
in which required columns are supplied in the input table. This means
that tables with column ordering A,B should work equally well to a
table with column ordering B,A.
2. The application should function correctly regardless of additional
columns that may be supplied in the input table, of which the
application has no prior knowledge. This means that an application
requiring an input table with columns A and B should work equally well
with an input table that contains only columns A,B or with an input
table that contains columns X,B,Y,A,Z, and that it must be possible
for the application to be written with no prior awareness of columns
With RDBMS tables, spreadsheets, delimited files, etc. it is easy to
write an application that supports data format extensibility according
to the two preceding rules. But I can't figure out how equivalent
support for arbitrary element ordering and inclusion of non-specified
elements can be implemented with XSD.
Arbitrary element ordering is support through the use of xs:all, and
inclusion of non-specified elements is supported through the use of
xs:any. But these two XSD schema specifications appear to be mutually
exclusive, i.e. you can't apply both of them to the same group of
elements. Without the capability of using both of these
specifications together, I can't see any way to support both of the
above fundamental rules for data format extensibility in XSD, and this
requirement is extremely important for my application (and many
Can someone please enlighten me as to how the above data format
extensibility rules can both be supported for the same group of
elements in XSD?
|All times are GMT. The time now is 11:32 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.