[
Lists Home |
Date Index |
Thread Index
]
- To: xml-dev@lists.xml.org
- Subject: is xml schema bad wrt schema extensions?
- From: Erik Wilde <net.dret@dret.net>
- Date: Tue, 03 Sep 2002 10:39:45 +0200
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826
hi.
recently (http://lists.xml.org/archives/xml-dev/200209/msg00032.html),
paul prescod brought up the interesting issue of whether xml schema
extensibility is a bad thing because naively designed software might break.
i think this is a very interesting and important issue. paul is right
that schema's derivation methods make it possible for software to fail
when processing instances of derived schemas. so one basic question is:
is this the fault of xml schema of or sloppy software authors? and,
regardless of that, how can this be made more safe? i think so far there
has been remarkably little effort to point out how to *safely and
reasonably use* xml schema, in contrast to the large amount of effort in
rather emotional schema bashing that can be seen on xml-dev...
one point i would be very interested in is to look at this a bit more
formally. for example, what kind of xpath can i safely apply to
instances of schemas and derived schemas? only child paths? anything
else? and if i restrict extension capabilities by some of schema's
features, restricting type restriction and/or extension or type
substitution, does this change the "safe set" of xpath? i have no answer
to this question, but maybe this could lead to some framework for how to
design schemas for extensibility, and how to restrict the possibilities
for extensions to make it easier for software to deal with schema
extensions.
in a next step, one could start to think about how software authors
could be supported to not write naively designed software. writing
software which is forward compatible never has been an easy thing to do,
but maybe it could be made easier, for example by disallowing certain
xpath expressions which could break with extended instances. in a very
futuristic view of the world of xml, i could even imagine a very smart
dom module which only allows access to instances in a robust manner,
making it impossible to write code that breaks.
maybe some people will find this too complicated to be of any use, but
there are a lot of people out there trying to use xml schema in a
reasonable and robust way, and if all xml experts can come up with is
advice like "it's complicated and dangerous", then we do not provide
them a lot of help.
cheers,
erik wilde - tel:+41-1-6325132 - fax:+41-1-6321035
mailto:net.dret@dret.net - http://dret.net/
computer engineering and networks laboratory
swiss federal institute of technology (eth)
* try not. do, or do not. there is no try. *
|