posted 14 years ago
This is the dtd file in its current form:
You can see it allows for project, name, device, and deviceName elements in my xml. It is like this now, because all of those are being used to populate the nodes of a tree. However, the actual xml I will be using will contain these elemnts plus a few more element that will nto be part of the tree. SO I need to edit this dtd file to allow these other elements to be part of my xml file, but just not take them into consideration.
To put it another way I my xml file will contain those fourelements it already allows for, btu there will be a few other elements as well. Right now if I try to put those elements in my xml file it tells me
The content of element type "project" must match "(name,(project|device)*)".
So I am sure I need to add some more to the dtd document, but not totally sure what. For now lets say i want to add a properties element tag. I am guessing that the second line in my dtd there will need to be changed to <!ELEMENT project (name,(project|device|properties)*)>
ANd then properties will need its own line further down in the code. But if I follow the convention that is already there, it will end up in the properties element being dispalyed in my tree, and it is not supposed to.
So is this possible with dtd, can you put in extra elements and then tell it to alow, but ignore those eleemnts?
Ill be looking into this on my own but Im posting this now in the hopes someone will head me off in the right direction in case I have trouble on my own
Thanks
True wisdom is in knowing you know nothing - Socrates