[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: DTD vs Schema
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@u...] 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@h... <mailto:nidal.amer@h...> >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@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|