Hi guys, I was just wondering if any of you could help me solve this issue. It seems rather trivial, but I just cannot seem to get it to validate.
I have my DTD:
<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE addressBook SYSTEM "http://somelocation.co.uk/xml/addressBook.dtd">
<!-- <?xml-stylesheet type="text/xsl" href="AddressBook.xsl" ?> -->
<!-- Sample XML AddressBook Application -->
<addressBook>
<entry>
<picture pic="logo.jpg" />
<title> Mr </title>
<foreName> James </foreName>
<middleName> Donald </middleName>
<familyName> Jones </familyName>
<gender> Male </gender>
<dateOfBirth> 12/04/1984 </dateOfBirth>
<sexualOrientation> Straight </sexualOrientation>
<maritalStatus> Changes based on the weather </maritalStatus>
<occupation> Unsure </occupation>
<address>
<houseNumber> 1 </houseNumber>
<houseName> </houseName>
<street> Smith Road</street>
<district> Ottery </district>
<city> Portsmouth </city>
<county> Wherever </county>
<country> England </country>
<postCode> PO20 8MT </postCode>
<category> Home Address </category>
</address>
<address>
<houseNumber> 31 </houseNumber>
<houseName> </houseName>
<street> Jim Street </street>
<district> St. Anne's </district>
<city> Bristol </city>
<county> Somerset </county>
<country> England </country>
<postCode> BR24 4LT </postCode>
<category> Term-time Address </category>
</address>
<landlineNumbers homeNo="03968 457847"/>
<mobileNumbers mobPersonalNo="07194836160"/>
<emailAddresses homeEmail="jimmy-jones@hotmail.co.uk"/>
<emailAddresses instituteEmail="jones.j.d@bristol.cf.ac.uk"/>
<otherContacts facebook="http://www.facebook.com/"/>
<otherContacts twitter="http://twitter.com/"/>
<otherContacts personalWebsite="http://jonedesigns.co.uk/"/>
</entry>
</addressBook>
It works when I view it, but the validator says Content of element type "entry" must match "(picture,title,foreName,middleName?,familyName,gender,dateOfBirth,sexualOrientation,maritalStatus,o ccupation,address*,landlineNumbers,mobileNumbers,emailAddresses,otherContacts)"
Any help would be really appreciative. I have looked at so many forums and tried all night. I figure something's in the wrong order somewhere but I can for the life of me figure out what. It looks fine to me but obviously it's not.
Bookmarks