W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2003

schemas, leveraging their object orientedness??

From: Dean Hiller <dhiller@avaya.com>
Date: Wed, 15 Oct 2003 07:19:01 -0600
Message-ID: <3F8D4945.1080406@avaya.com>
To: xmlschema-dev@w3.org

If I have some xml implementating schema A.xsd


And then I write B.xsd which extends A.xsd and the xml looks something 
like this
<subclass xmnls="......A.xsd">

BUT, I must be missing something.  There is now a program A which only 
knows about A.xsd.  It should be able to receive the xml that adheres to 
B.xsd and just skip the unknown elements and only deal with the known 
ones(ie someElement).  The problem is there seems to be nothing to tell 
the parser that subclass extends superclass unless you know of B.xsd.

I thought the idea of extensions was object-orientedness.  The subclass 
should be able to be read by program A as the superclass.  (ie. program 
A knows about a car, and we created a Ford car, so program A can still 
see it as a car).  I am afraid that a parser will puke at this since it 
does not adhere to A.xsd.  There must be something else in the xml I am 

Also, how would I write the xsd and xml for this?  I wish the tutorial 
explained more in this area.  I would say this is by far the most 
important part of xsd's.  Extension without breaking previous programs. 
 Previous programs just ignore additional data.
Received on Wednesday, 15 October 2003 09:47:59 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:03 UTC