OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Query on Attribute Declaration

[ Lists Home | Date Index | Thread Index ]
  • From: Mallikarjuna Sangappa <malliks@rocketmail.com>
  • To: xml-dev@ic.ac.uk
  • Date: Fri, 2 Jul 1999 07:06:37 -0700 (PDT)


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@ic.ac.uk
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@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS