Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Need opinion on DTD design [Thread Next] Re: Need opinion on DTD designTo: NULL Date: 8/13/2006 5:35:00 PM stefan.rickfjord@g... wrote: > Hi, > > I am a newbie to programming using XML and I'm currently working on a > side-project which will house some database information in a XML-file. > I am writing a DTD to specify the XML-format, mostly for the purpose of > documenting the XML database. > > My issue is that I have some fields, e.g. > <!ELEMENT Vehicle ( Car? )> > <!ELEMENT Car ( Gasoline | Diesel )> > <!ELEMENT Gasoline EMPTY> > <!ELEMENT Diesel EMPTY> > > but I want to make sure that this database is extendable. I.e. after > using the database for a while in my application I want to be able to > add stuff that I come up with later on, e.g. > <!ELEMENT Motorcycle ( Sportbike | Harley )> > <!ELEMENT Sportbike EMPTY> > <!ELEMENT Harley EMPTY> <!ENTITY % bikes SYSTEM "list.of.bikes"> ... <!ELEMENT Motorcycle EMPTY> <!ATTLIST Motorcycle type (%bikes;) #REQUIRED> where the file list.of.bikes contains something like Sportbike| Harley| Triumph| Yamaha etc. Now to keep the list up to date, you just have to edit list.of.bikes ///Peter -- XML FAQ: http://xml.silmaril.ie/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
