Contacts 5

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

contacts5.

xml (1/2)

<?xml version="1.0"?>
<!DOCTYPE contacts PUBLIC "-//Beginning XML//DTD Contact Example//EN"
"contacts5.dtd">
<contacts source="source-text;" version="1.0">
<contact person="Jeff_Rafter" tags="author xml poetry">
<name>
<first>Jeff</first>
<first>Craig</first>
<last>Rafter</last>
</name>
<location>
<address>Redlands, CA, USA</address>
<latitude>34.031892</latitude>
<longitude>-117.207642</longitude>
</location>
<phone kind="Home">001-909-555-1212</phone>
<knows contacts="David_Hunter Danny_Ayers"/>
<description>jeff-description;</description>
</contact>
<contact person="David_Hunter" tags="author consultant CGI">
<name>
<first>David</first>
<last>Hunter</last>
</name>
<location>
<address>address-unknown;</address>
empty-gps;
</location>
<phone kind="Work">416 555 1212</phone>
<knows contacts="Jeff_Rafter Danny_Ayers"/>
<description>david-description;</description>
</contact>
<contact person="Danny_Ayers" tags="author semantics animals">
<name>
<first>Daniel</first>
<middle>John</middle>
<last>Ayers</last>
</name>
<location>
<latitude>43.847156</latitude>
<longitude>10.50808</longitude>
<address>Mozzanella, 7 Castiglione di Garfagnana, 55033 Lucca
Italy</address>
</location>
<phone>+39-0555-11-22-33-</phone>
contacts5.xml (2/2)

<knows contacts="Jeff_Rafter David_Hunter"/>


danny-description;
</contact>
</contacts>
contacts5.dtd (1/1)

<!ELEMENT contacts (contact*)>


<!ATTLIST contacts version CDATA #FIXED "1.0">
<!ATTLIST contacts source CDATA #IMPLIED>

<!ELEMENT contact (name, location, phone, knows, description)>


<!ATTLIST contact person ID #REQUIRED>
<!ATTLIST contact tags NMTOKENS #IMPLIED>

<!ELEMENT name (first+, middle?, last)>


<!ELEMENT first (#PCDATA)>
<!ELEMENT middle (#PCDATA)>
<!ELEMENT last (#PCDATA)>

<!ELEMENT location (address | (latitude, longitude))*>


<!ELEMENT address (#PCDATA)>
<!ELEMENT latitude (#PCDATA)>
<!ELEMENT longitude (#PCDATA)>

<!ELEMENT phone (#PCDATA)>


<!ENTITY % DefaultPhoneKind '"Home"'>
<!ATTLIST phone kind (Home | Work | Cell | Fax) %DefaultPhoneKind;>

<!ELEMENT knows EMPTY>


<!ATTLIST knows contacts IDREFS #IMPLIED>

<!ELEMENT description (#PCDATA | em | strong | br)*>


<!ELEMENT em (#PCDATA)>
<!ELEMENT strong (#PCDATA)>
<!ELEMENT br EMPTY>

<!ENTITY source-text "The source of this contacts list is Beginning XML 4E">
<!ENTITY address-unknown "The address for this location is quot;Unknownquot;">
<!ENTITY empty-gps "<latitude></latitude><longitude></longitude>">

<!ENTITY jeff-description PUBLIC


"-//Beginning XML//Jeff Description//EN" "jeff.txt">

<!ENTITY david-description PUBLIC


"-//Beginning XML//David Description//EN" "david.txt">

<!ENTITY danny-description PUBLIC


"-//Beginning XML//Danny Description//EN" "danny.xml">

You might also like