[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

DTD question - UML inheritance

Subject: DTD question - UML inheritance
From: "Terris" <terris@xxxxxxxxxx>
Date: Thu, 23 Sep 1999 14:17:46 -0700
uml inheritance
Hi,

I realize this is the XSL list, but there are obviously
a lot of people on this list who have experience
with XML.

I have a DTD design question.  I want to represent
an object model that has inheritance.  How
do you think I should best represent instances
of a subclass?  Should I use containment or
should I hide the base class name?

Containment:

<BaseClass><SubClass/></BaseClass>

Hiding the BaseClass:

<Subclass/>

In the latter case, the <Subclass> would have all
of the <BaseClass's> attributes and elements.

>From an XSLT perspective, I think it would
be more difficult to search documents in a generic fashion if
the <BaseClass> is hidden.  By "generic"
I mean that I want to write
a stylesheet that only searches for properties in
the <BaseClass> regardless of which <SubClass>
is actually instantiated.  Without <BaseClass>
being in the document, I would have to use multiple XPATHs, each
containing the name of every possible SubClass.
The patterns would break if any new subclasses were
added.  This seems like a bad thing.

Thank you,
Terris



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.