OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: DTD vs Schema

[ Lists Home | Date Index | Thread Index ]
  • From: "AMER, Nidal" <Nidal.AMER@hdmp.com>
  • To: "'Peter Murray-Rust'" <peter@ursus.demon.co.uk>
  • Date: Fri, 11 Sep 1998 15:19:23 +0200

In fact I am trying to implement in XML an object model I have designed
with UML in which I clearly define generalization and specialization
relationships. In instance, I am treating a generic type called
transaction from which I derive different types of transactions all of
which share a common behavior. 
The XML Data schema uses SUPERTYPE to declare inheritance, even if this
is not very useful unless the DOM model, built by the parser, could
recognize that an element inherits another one and lets the application
treat the subtype the same way as the supertype ( polymorphism ). Also,
when referenced, the subtype should be checked against applying the
validity constraints of the supertype plus its own constraints.

Unfortunately, as this seems not to be implemented, I have to build this
logic in the code.

Regards,
Nidal.

	-----Original Message-----
	From:	Peter Murray-Rust [SMTP:peter@ursus.demon.co.uk]
	Sent:	Friday, September 11, 1998 2:21 PM
	To:	AMER, Nidal
	Subject:	Re: DTD vs Schema

	At 12:44 11/09/98 +0200, you wrote:
	>Thank you all a lot for your answers. I am a step further now.
	>Just I still can't express inheritance with DTD in an elegant
way.

	No - it's not easily built in to XML. I think that we shall
develop some
	general means for doing this. It depends *what* your want to
inherit.

	I have developed this in my Chemical Markup Language,
	http://www.xml-cml.org (BTW I used to work in the pharma
industry). I have
	an array element which can be subclassed to atomArray and
bondArray (and
	all of these are mapped to Java). But there is no way of
*enforcing* the
	parallel between XML and Java here - I have to remember it when
I write the
	code.

	I think DCD and other schemas will start addressing this.

		P.

	>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	>Nidal AMER
	>Deputy R & D Director
	>Health Data Management Partners (HDMP)
	>A SmithKline-Beecham Company
	>6 Rue de Genève,
	>1140 Brussels, Belgium
	>Tel: + 32 (2) 724 00 93
	>Fax: + 32 (2) 726 91 59
	>E-mail: nidal.amer@hdmp.com <mailto:nidal.amer@hdmp.com> 
	>Visit our web site: http://www.hdmp.com <http://www.hdmp.com> 
	>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	>
	Peter Murray-Rust, Director Virtual School of Molecular
Sciences, domestic
	net connection
	VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
	http://www.venus.co.uk/vhg

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS