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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   DTD - Is it the right way?

[ Lists Home | Date Index | Thread Index ]
  • From: suresh@niitblvl.niit.co.in
  • To: xml-dev@ic.ac.uk
  • Date: Thu, 13 May 1999 13:28:00 +0000


I am a starter at XML. Below is a DTD I have written for Contacts. I have   
used a tool called as XML Spy. I have a few questions
1. Is this is the right way of writing a DTD?
2. The tool said that the DTD was valid, but I cant open it in IE5.

Suresh Yellamaraju

<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT Contacts (Contact)*>
<!ELEMENT Contact ((Person | Company)?,  Notes?)>
<!ELEMENT Person (FullName, Company?, Title?, Department?, Office?,   
Profession?, AssistantName?, ManagerName?, NickName?, Birthday?,   
PersonalEMail?, Mobile?, Pager?, PersonalTelNo?, PersonalAddress?)>
<!ELEMENT FullName ((FirstName, MiddleInitials?, LastName) | (LastName,   
MiddleInitials?, FirstName) | (LastName, FirstName, MiddleInitials?) |   
(FirstName, LastName, MiddleInitials?))>
<!ELEMENT Company (CompanyName, Address*, TelNo*, EMailAddress*)>
<!ELEMENT Address (AddressType, Streets?, City?, State?, PinCode?,   
Country?)>
<!ELEMENT AddressType EMPTY>
<!ATTLIST AddressType AddrType (Home| Business| Other) "Business">
<!ELEMENT Streets (Street1?,Street2?,Street3?)>
<!ELEMENT Street1 (#PCDATA)>
<!ELEMENT Street2 (#PCDATA)>
<!ELEMENT Street3 (#PCDATA)>
<!ELEMENT City (#PCDATA)>
<!ELEMENT State (#PCDATA)>
<!ELEMENT PinCode (#PCDATA)>
<!ELEMENT Country (#PCDATA)>
<!ELEMENT FirstName (#PCDATA)>
<!ELEMENT MiddleInitials (#PCDATA)>
<!ELEMENT LastName (#PCDATA)>
<!ELEMENT CompanyName (#PCDATA)>
<!ELEMENT Title (#PCDATA)>
<!ELEMENT Department (#PCDATA)>
<!ELEMENT Office (#PCDATA)>
<!ELEMENT Profession (#PCDATA)>
<!ELEMENT AssistantName ((FullName | SimpleName)?, NickName)>
<!ELEMENT ManagerName ((FullName | SimpleName)?, NickName)>
<!ELEMENT SimpleName (#PCDATA)>
<!ELEMENT NickName (#PCDATA)>
<!ELEMENT BirthDay (#PCDATA)>
<!ELEMENT Notes (#PCDATA)>
<!ELEMENT PersonalEMail (#PCDATA)>
<!ELEMENT Mobile (#PCDATA)>
<!ELEMENT Pager (#PCDATA)>
<!ELEMENT PersonalTelNo (#PCDATA)>
<!ELEMENT TelNo (#PCDATA)>
<!ELEMENT EMailAddress (#PCDATA)>
<!ELEMENT PersonalAddress (Address)>

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