Title: RE: Schema inheritance??

Point taken. <xsd:redefine> is the only one that comes close.

<xsd:include> and <xsd:import> "give" you all the definitions from the other schema which give you resue, rather than inheritance. Liberal use of abstract types and elements and subsitution groups in the including schema give some level of "inheritance simulation".

John

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 29 March 2002 21:47
To: [EMAIL PROTECTED]
Subject: RE: Schema inheritance??



I don't see <xsd:include> or <xsd:import> as being much like inheritance.
They are more like java "import" or C/C++ #include.
I'd say <xsd:extension>, <xsd:restriction>, and <xsd:redefine> are more
like OO inheritance. I suppose this depends on seeing <xsd:complexType> as
being the thing which is analogous to a class, not the whole schema file.
To me a schema file is more analogous to, well, a file in an OO language
where you can define multiple classes per file.

Eric




                                                                                                                             

                      "Anderson, John"                                                                                       

                      <[EMAIL PROTECTED]         To:      "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>      

                      t.com>                   cc:                                                                           

                                               Subject: RE: Schema inheritance??                                             

                      03/29/2002 04:47                                                                                       

                      AM                                                                                                     

                      Please respond                                                                                         

                      to xerces-j-user                                                                                       

                                                                                                                             

                                                                                                                             




You could use <xsd:include>, <xsd:import> or <xsd:redefine>


John
_______________________________________________________
John Anderson
CTO BarbadosoftTM
The XML Management Company
+31 (0)20 750 7582 / +31 (0)6 55 347 448 / www.barbadosoft.com








-----Original Message-----
From: ug7k [mailto:[EMAIL PROTECTED]]
Sent: 24 March 2002 13:09
To: [EMAIL PROTECTED]
Cc: Zhou Wang
Subject: Schema inheritance??





hallo,


is it possible to define "inheritance" relation between
XML-Schemas, similar to class ineritance in JAVA?
For example, when i define an XML-Schema to
describe "dog",can i specify that it inherits from the
XML-Schema for "animal"?


Thanks in advannce.


zhou







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


The information transmitted by this e-mail message is intended solely for
the use of the person to whom or entity to which it is addressed. The
message may contain information that is privileged and confidential.
Disclosure, dissemination, distribution, review, retransmission to, other
use of or taking any action in reliance upon this information by anyone
other than the intended recipient is prohibited. If you are not the
intended recipient, please do not disseminate, distribute or copy this
communication, by e-mail or otherwise. Instead, please notify us
immediately by return e-mail (including the original message with your
reply) and then delete and discard all copies of the message.


Although we have taken precautions to minimize the risk of transmitting
viruses we nevertheless advise you to carry out your own virus checks on
any attachment to this message. We accept no liability for any loss or
damage caused by viruses.








---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

The information transmitted by this e-mail message is intended solely for the use of the person to whom or entity to which it is addressed. The message may contain information that is privileged and confidential.  Disclosure, dissemination, distribution, review, retransmission to, other use of or taking any action in reliance upon this information by anyone other than the intended recipient is prohibited. If you are not the intended recipient, please do not disseminate, distribute or copy this communication, by e-mail or otherwise. Instead, please notify us immediately by return e-mail (including the original message with your reply) and then delete and discard all copies of the message.

Although we have taken precautions to minimize the risk of transmitting viruses we nevertheless advise you to carry out your own virus checks on any attachment to this message. We accept no liability for any loss or damage caused by viruses.

Reply via email to