You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "Anderson, John" <Jo...@Barbadosoft.com> on 2002/04/02 13:48:42 UTC

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: Eric_Schwarzenbach@Classwell.com
[mailto:Eric_Schwarzenbach@Classwell.com]
Sent: 29 March 2002 21:47
To: xerces-j-user@xml.apache.org
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"

                      <John@Barbadosof         To:
"'xerces-j-user@xml.apache.org'" <xe...@xml.apache.org>       
                      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:ug7k@rz.uni-karlsruhe.de]
Sent: 24 March 2002 13:09
To: xerces-j-user@xml.apache.org
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: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


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: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org

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.

RE: Schema inheritance??

Posted by ug7k <ug...@rz.uni-karlsruhe.de>.
Hallo, John, Eric,

thanks all for your answers. Now i uses <xsd:import> to
include basic type definition and uses <xsd:extension>
to extend some others. It works, although it is not perfect
as "inherited schemas". I found that some other description
languages, such as RDF, could support such special features. 

thanks again.
zhou



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org