[Home] [By Thread] [By Date] [Recent Entries]
Hi Everybody, My DTD looks like this. <!ELEMENT PERSON (NAME, ADDRESS, CITY, PHONE)> <!ELEMENT NAME EMPTY> <!ATTLIST NAME NAME_VALUE CDATA #REQUIRED> <!ELEMENT ADDRESS (#PCDATA)> <!ELEMENT CITY EMPTY> <!ELEMENT CITY CITY_VALUE (Chicago|SFO) #IMPLIED> <!ELEMENT PHONE (#PCDATA)> The following documents are valid <?xml version="1.0"?> <PERSON> <NAME/> <ADDRESS> </ADDRESS> <CITY CITY_VALUE="SFO"/> <PHONE> </PHONE> </PERSON> <?xml version="1.0"?> <PERSON> <NAME NAME_VALUE=""/> <ADDRESS> </ADDRESS> <CITY CITY_VALUE="SFO"/> <PHONE> </PHONE> </PERSON> Question is how will the person creating the XML document know that the NAME_VALUE of the NAME element has to be filled. Since both the above documents are valid whether the attribute is used or not. Please throw more light on this. Thanks in advance. _________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1 To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|

Cart



