|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] DTD question - 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
|
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
|

Cart








