donorstxt Founding Circle Donors David Brennan 5133 Oak Str
//donors.txt
Founding Circle Donors
===================
David Brennan
5133 Oak Street
Windermere, FL 34786
(407) 555-8981 home
(407) 555-8189 cell
dbrennan@example.net
$50,000
Method: phone
EffectiveDate: 9/1/1982
Cindy Wu
31 Alice Avenue
Windermere, FL 34786
(407) 555-7212 home
cwu@example.net
$50,000
Method: phone
EffectiveDate: 9/1/1982
Sponsorship Donors
================
David Olson
5133 Oak Street
Windermere, FL 34786
(407) 555-8981 home
(407) 555-8189 cell
dolson@example.net
$25,000
Method: personal
EffectiveDate:7/3/1985
Wilmer Stonehedge
31 Alice Avenue
Windermere, FL 34786
(407) 555-7212 cell
wstone@example.net
$25,000
Method: personal
EffectiveDate: 10/3/1994
Patron Donors
============
Lee Unwin
451 Unwin Ct.
Orlando, FL 32801
(407) 555-9082 cell
leeunwin@example.net
$18,000
Method: personal
EffectiveDate: 11/1/1998
Jane Whitney
87 Hilltop Drive
Windermere, FL 34786
(407) 555-7493 work
$15,000
Method: personal
EffectiveDate: 11/1/1998
Andrew Sanchez
891 Lindon Lane
Windermere, FL 34786
(407) 555-4313 cell
asanchez@example.com
$15,000
Method: personal
EffectiveDate: 3/4/2000
Friendship Donor
===============
Gary Windt
55 Hawking Street
Windermere, FL 34786
(407) 555-9939 home
windtg@example.com
$1000
Method: phone
Effective Date: 3/4/2000
Cynthia Browne
71 Circuit Ct.
Wheaton, KY 89321
(407) 555-3813 cell
cynthia@example.com
$1000
Method: phone
Effective Date: 3/4/2000
Howard Li
4312 East Oak Avenue
Youngston, KY 89318
(407) 555-3921 home
$1000
Method: mail
Effective Date: 3/4/2011
Uma Thu
25 Longton Lane
Windermere, FL 34786
(407) 555-8730 cell
$1000
Method: personal
Effective Date: 4/4/2012
Alan Wilkes
321 Ashburn
Jasper, KY 89831
(407) 555-1181 home
wilkes_alan@example.edu
$500
Method: mail
Effective Date: 1/4/2012
Steve Bones
900 Lawton Street
Wheaton, KY 89211
(407) 555-5434 cell
$500
Method: personal
Effective Date: 9/14/2012
Jeri White
Hawkes Lane
Windermere, FL 89211
(407) 555-8828 cell
jeri_white@example.com
$300
Method: phone
Effective Date: 12/4/2012
Tom Thomas
Rigel Avenue
Apopka, FL 32703
(407) 555-8311 home
$100
Method: phone
Effective Date: 2/4/2012
//rostertxt.xml
<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>
<!--
New Perspectives on XML
Case Problem 3
The Save Exotic Animals Trust donor roster
Author:
Date:
Filename: roster.xml
Supporting document: seatrust.dtd
-->
//seatrussttxt.dtd
<!--
New Perspectives on XML
Case Problem 3
The Save Exotic Animals Trust DTD
Author:
Date:
Filename: seatrust.dtd
Supporting file: roster.xml
-->
Thank you for your help in advance
Complete the following 1. Using your text editor, open the rostertxt.xml and seatrusttxt.dtd files from the xml02 case3 folder provided with your Data Files, insert your name and today\'s date in the comment section of each file, and then save the files as roster.xml and seatrust.dtd, respectively. 2. Add the data stored in the donors.txt file in the xml02 Case3 folder to the roster.xml file as the document content, and then add XML elements to structure the data in the roster.xml file as follows: (Note: You should ignore any validation or well-formedness errors flagged by your editor until the document is finished.) a. A root element named roster should contain several donor elements b. Each donor element should contain the following child elements, which should appear no more than once within the donor element, except as ame, address, phone (one or more), email (optional), donation, method, and effectiveDate. c. The phone element should contain an attribute namedtype that identifies the phone type home, work, or cell. This should be a required attribute for each phone element. d. The donor element should contain an attribute named level that identifies the donor level friendship, patron, sponsor, or founder. This should be a required attribute for each donor element. 3. In the seatrust.dtd file, create a DTD based on the structure you created in the roster.xml file Save and close the seatrust.dtd file. 4. Apply your DTD to the contents of the roster.xml file. Save your changes to the roster.xml file. 5. Verify that the roster.xml file is well formed and valid.Solution
seatrust.dtd
<!ELEMENT rooster (donor)>
<!ELEMENT donor (name,address,phone,email,donation,method,effectivedate)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT address (#PCDATA)>
<!ELEMENT phone (#PCDATA)>
<!ELEMENT email (#PCDATA)>
<!ELEMENT donation (#PCDATA)>
<!ELEMENT method (#PCDATA)>
<!ELEMENT effectivedate (#PCDATA)>
roosters.xml
<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>
<!--
New Perspectives on XML
Case Problem 3
The Save Exotic Animals Trust donor roster
Author:
Date:
Filename: roster.xml
Supporting document: seatrust.dtd
-->
<!DOCTYPE note SYSTEM \"seatrust.dtd\">
<rooster>
<donor level=\"founder\">
<name>David Brennan</name>
<address>5133 Oak Street
Windermere, FL 34786</address>
<phone type=\"home\">(407) 555-8981 </phone>
<phone type=\"cell\">(407) 555-8189 </phone>
<email>dbrennan@example.net</email>
<donation>$50,000</donation>
<method>phone</method>
<effectivedate>9/1/1982 </effectivedate>
</donor>
<donor level=\"founder\">
<name>Cindy Wu</name>
<address>31 Alice Avenue
Windermere, FL 34786</address>
<phone type=\"home\">(407) 555-7212 </phone>
<email>cwu@example.net</email>
<donation>$50,000</donation>
<method>phone</method>
<effectivedate>9/1/1982</effectivedate>
</donor>
<donor level=\"sponsor\">
<name>David Olson</name>
<address>5133 Oak Street
Windermere, FL 34786</address>
<phone type=\"home\">(407) 555-8981 </phone>
<phone type=\"cell\">(407) 555-8189 </phone>
<email>dolson@example.net</email>
<donation>$25,000</donation>
<method>personal</method>
<effectivedate>7/3/1985</effectivedate>
</donor>
<donor level=\"sponsor\">
<name>Wilmer Stonehedge</name>
<address>31 Alice Avenue
Windermere, FL 34786</address>
<phone type=\"cell\">(407) 555-7212 </phone>
<email>wstone@example.net</email>
<donation>$25,000</donation>
<method>personal</method>
<effectivedate>10/3/1994</effectivedate>
</donor>
<donor level=\"patron\">
<name>Lee Unwin</name>
<address>451 Unwin Ct.
Orlando, FL 32801</address>
<phone type=\"cell\">(407) 555-9082 </phone>
<email>leeunwin@example.net</email>
<donation>$18,000</donation>
<method>personal</method>
<effectivedate>11/1/1998</effectivedate>
</donor>
<donor level=\"patron\">
<name>Jane Whitney</name>
<address>87 Hilltop Drive
Windermere, FL 34786</address>
<phone type=\"work\">(407) 555-7493 </phone>
<donation>$15,000</donation>
<method>personal</method>
<effectivedate>11/1/1998</effectivedate>
</donor>
<donor level=\"patron\">
<name>Andrew Sanchez</name>
<address>891 Lindon Lane
Windermere, FL 34786</address>
<phone type=\"cell\">(407) 555-4313 </phone>
<email>asanchez@example.com</email>
<donation>$15,000</donation>
<method>personal</method>
<effectivedate>3/4/2000</effectivedate>
</donor>
<donor level=\"friendship\">
<name>Gary Windt</name>
<address>55 Hawking Street
Windermere, FL 34786</address>
<phone type=\"home\">(407) 555-9939 </phone>
<email>windtg@example.com</email>
<donation>$1000</donation>
<method>phone</method>
<effectivedate>3/4/2000</effectivedate>
</donor>
<donor level=\"friendship\">
<name>Cynthia Browne</name>
<address>71 Circuit Ct.
Wheaton, KY 89321</address>
<phone type=\"cell\">(407) 555-3813 </phone>
<email>cynthia@example.com</email>
<donation>$1000</donation>
<method>phone</method>
<effectivedate>3/4/2000</effectivedate>
</donor>
<donor level=\"friendship\">
<name>Howard Li</name>
<address>4312 East Oak Avenue
Youngston, KY 89318</address>
<phone type=\"home\">(407) 555-3921 </phone>
<donation>$1000</donation>
<method>mail</method>
<effectivedate>3/4/2011</effectivedate>
</donor>
<donor level=\"friendship\">
<name>Uma Thu</name>
<address>25 Longton Lane
Windermere, FL 34786</address>
<phone type=\"cell\">(407) 555-8730 </phone>
<donation>$1000</donation>
<method>personal</method>
<effectivedate>4/4/2012</effectivedate>
</donor>
<donor level=\"friendship\">
<name>Alan Wilkes</name>
<address>321 Ashburn
Jasper, KY 89831</address>
<phone type=\"home\">(407) 555-1181 </phone>
<email>wilkes_alan@example.edu</email>
<donation>$500</donation>
<method>mail</method>
<effectivedate>1/4/2012</effectivedate>
</donor>
<donor level=\"friendship\">
<name>Steve Bones</name>
<address>900 Lawton Street
Wheaton, KY 89211</address>
<phone type=\"cell\">(407) 555-5434 </phone>
<donation>$500</donation>
<method>personal</method>
<effectivedate>9/14/2012</effectivedate>
</donor>
<donor level=\"friendship\">
<name>Jeri White</name>
<address>Hawkes Lane
Windermere, FL 89211</address>
<phone type=\"cell\">(407) 555-8828 </phone>
<email>jeri_white@example.com</email>
<donation>$300</donation>
<method>phone</method>
<effectivedate>12/4/2012</effectivedate>
</donor>
<donor level=\"friendship\">
<name>Tom Thomas</name>
<address>Rigel Avenue
Apopka, FL 32703</address>
<phone type=\"home\">(407) 555-8311 </phone>
<donation>$100</donation>
<method>phone</method>
<effectivedate>2/4/2012</effectivedate>
</donor>
</rooster>





