Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Need opinion on DTD design

From: stefan.rickfjord@-----.---
To: NULL
Date: 8/3/2006 12:21:00 AM

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>

I'd rather not add a lot of "Reserved"-elements in the DTD, as this is
not a nice solution. My own little idea is that i'm anyway able to add
items to the DTD further on since I both have the DTD of the XML and
the source of the application using it. Is this correct?

I've looked around and found another way to do this and that is to
include the old DTD as an entity, is that the way to go?

Please excuse my newbie-question, I just want to know if my way of
thinking is correct.

Thanks a lot for reading!



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent