Childnodes and Element declarations

admin

Administrator
Staff member
Hi everyone,I confess that I am an XML newbie. My question involves element declarationswithin the DTD. I read on an excellent website describing XML (<!-- m --><a class="postlink" href="http://wdvl.internet.com/Authoring/Languages/XML/Tutorials/Intro/toc.html">http://wdvl.internet.com/Authoring/Lang ... o/toc.html</a><!-- m -->)that when making an element declaration that using a "," when describingthe possible childnodes that result means that the childnodes must appearin the listed order. Thus if I have <!ELEMENT CHOICE (LABEL, ASK*)> thisindicates that there may be zero or more ASK elements within a CHOICE element,but that the LABEL element must occur first. I have no problem with this.What I am wondering is that I heard that if I write <!ELEMENT CHOICE (LABELASK*)> with only a space rather than a comma separating the two child elementsit means the same as the comma except that the order is no longer important.But when I try and do this I keep getting the following error:Invalid character in content model. Line 5, Position 26<!ELEMENT CHOICE (LABEL ASK*)>---------------------^The arrow above indicating that it doesn't like the "A" character.Am I just mistaken that you can use a space to separate child elements?Any help with this is greatly appreciated. I have included the XML fileI am using:<!-- XML data file written Nov 28, 2000 by Dan Temple --><!DOCTYPE HTML_DATA[<!ELEMENT HTML_DATA ANY><!ELEMENT CHOICE (LABEL ASK*)><!ELEMENT LABEL (#PCDATA)><!ELEMENT ASK (#PCDATA)><!ENTITY lt "<"><!ENTITY gt ">"><!ENTITY amp "&"><!ENTITY apos "'"><!ENTITY quot """>]><HTML_DATA><CHOICE><LABEL>Corporate Information Sheet</LABEL><ASK>Do you want a brief summary instead of full details?</ASK></CHOICE><CHOICE><LABEL>Reg. of Directors </LABEL><ASK>Enter date</ASK><ASK>Enter Number of Directors</ASK></CHOICE></HTML_DATA>Dan
 
Back
Top