1 / 11

XML, DTD, ENTITY

XML, DTD, ENTITY. Please see speaker notes for additional information!. <?xml version="1.0" ?> <!-- document type declaration follows --> <!DOCTYPE donors [ <!ELEMENT donors (donor+)> <!ELEMENT donor (name, address, yrfirst?, contact?, donations)> <!ATTLIST donor idno ID #REQUIRED>

kemp
Download Presentation

XML, DTD, ENTITY

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XML, DTD, ENTITY Please see speaker notes for additional information!

  2. <?xml version="1.0" ?> <!-- document type declaration follows --> <!DOCTYPE donors [ <!ELEMENT donors (donor+)> <!ELEMENT donor (name, address, yrfirst?, contact?, donations)> <!ATTLIST donor idno ID #REQUIRED> <!ELEMENT name (#PCDATA)> <!ATTLIST name title (Mr. | Mrs. | Ms. | Dr.) #IMPLIED> <!ELEMENT address (#PCDATA)> <!ELEMENT yrfirst (#PCDATA)> <!ELEMENT contact (#PCDATA)> <!ELEMENT donations (donation+)> <!ELEMENT donation (driveno, datecont, amtcont)> <!ATTLIST donation donationid ID #REQUIRED> <!ATTLIST donation givenby IDREF #REQUIRED> <!ELEMENT driveno (#PCDATA)> <!ELEMENT datecont (#PCDATA)> <!ELEMENT amtcont (#PCDATA)> ]> <donors> <donor idno="A1111"> <name title="Mr.">John Doe</name> <address> <![CDATA[ 123 Elm St Braintree, MA 02184 ]]> </address> <yrfirst>1995</yrfirst> <contact>Ann Smith</contact> Donations now contain a driveno which is part of the donation.

  3. <donations> <donation donationid="A001" givenby = "A1111"> <driveno>A123</driveno> <datecont>7/5/2000</datecont> <amtcont>1200</amtcont> </donation> <donation donationid="B001" givenby = "A1111"> <driveno>B124</driveno> <datecont>5/14/2000</datecont> <amtcont>500</amtcont> </donation> </donations> </donor> <donor idno="B2222"> <name title="Ms.">Mary Wilson</name> <address> <![CDATA[ 14 Main St Fall River, MA 02770 ]]> </address> <yrfirst>1996</yrfirst> <contact>David Costa</contact> <donations> <donation donationid="A002" givenby = "B2222"> <driveno>A123</driveno> <datecont>5/15/2000</datecont> <amtcont>500</amtcont> </donation> </donations> </donor> Driveno has been made part of donation.

  4. <donor idno="C3333"> <name title="Ms.">Nancy Taylor</name> <address> <![CDATA[ 1 Heritage Rd New Bedford, MA 02775 ]]> </address> <yrfirst>1994</yrfirst> <contact>Ann Smith</contact> <donations> <donation donationid="A003" givenby = "C3333"> <driveno>A123</driveno> <datecont>1/5/2000</datecont> <amtcont>1000</amtcont> </donation> <donation donationid="A004" givenby = "C3333"> <driveno>A123</driveno> <datecont>2/20/2000</datecont> <amtcont>600</amtcont> </donation> <donation donationid="B002" givenby = "C3333"> <driveno>B124</driveno> <datecont>1/12/2000</datecont> <amtcont>1000</amtcont> </donation> <donation donationid="C001" givenby = "C3333"> <driveno>C125</driveno> <datecont>5/5/2000</datecont> <amtcont>100</amtcont> </donation> </donations> </donor> <donor idno="D4444"> <name title="Mr.">Robert Brooks</name> <address> <![CDATA[ 45 East St Weymouth, MA 02176 ]]> </address> <yrfirst>1996</yrfirst> <contact>Roger Brown</contact> <donations> <donation donationid="A123005" givenby = "D4444"> <driveno>A123</driveno> <datecont>1/1/2000</datecont> <amtcont>500</amtcont> </donation> <donation donationid="B003" givenby = "D4444"> <driveno>B124</driveno> <datecont>5/1/2000</datecont> <amtcont>1000</amtcont> </donation> <donation donationid="C002" givenby = "D4444"> <driveno>C125</driveno> <datecont>8/1/2000</datecont> <amtcont>250</amtcont> </donation> </donations> </donor> </donors>

  5. <?xml version="1.0" ?> <!-- document type declaration follows --> <!DOCTYPE donors SYSTEM "drive.dtd" [ <!ELEMENT donors (donor+)> <!ELEMENT donor (name, address, yrfirst?, contact?, donations)> <!ATTLIST donor idno ID #REQUIRED> <!ELEMENT name (#PCDATA)> <!ATTLIST name title (Mr. | Mrs. | Ms. | Dr.) #IMPLIED> <!ELEMENT address (#PCDATA)> <!ELEMENT yrfirst (#PCDATA)> <!ELEMENT contact (#PCDATA)> <!ELEMENT donations (donation+)> <!ELEMENT donation (driveno, datecont, amtcont)> <!ATTLIST donation donationid ID #REQUIRED> <!ATTLIST donation givenby IDREF #REQUIRED> <!ELEMENT driveno (#PCDATA)> <!ELEMENT datecont (#PCDATA)> <!ELEMENT amtcont (#PCDATA)> ]> <donors> <donor idno="A1111"> <name title="Mr.">John Doe</name> <address> <![CDATA[ 123 Elm St Braintree, MA 02184 ]]> </address> <yrfirst>1995</yrfirst> <contact>Ann Smith</contact>

  6. <donations> <donation donationid="A001" givenby = "A1111"> <driveno>&A123;</driveno> <datecont>7/5/2000</datecont> <amtcont>1200</amtcont> </donation> <donation donationid="B001" givenby = "A1111"> <driveno>&B124;</driveno> <datecont>5/14/2000</datecont> <amtcont>500</amtcont> </donation> </donations> </donor>

  7. <donor idno="B2222"> <name title="Ms.">Mary Wilson</name> <address> <![CDATA[ 14 Main St Fall River, MA 02770 ]]> </address> <yrfirst>1996</yrfirst> <contact>David Costa</contact> <donations> <donation donationid="A002" givenby = "B2222"> <driveno>&A123;</driveno> <datecont>5/15/2000</datecont> <amtcont>500</amtcont> </donation> </donations> </donor> <donor idno="C3333"> <name title="Ms.">Nancy Taylor</name> <address> <![CDATA[ 1 Heritage Rd New Bedford, MA 02775 ]]> </address> <yrfirst>1994</yrfirst> <contact>Ann Smith</contact> <donations> <donation donationid="A003" givenby = "C3333"> <driveno>&A123;</driveno> <datecont>1/5/2000</datecont> <amtcont>1000</amtcont> </donation> <donation donationid="A004" givenby = "C3333"> <driveno>&A123;</driveno> <datecont>2/20/2000</datecont> <amtcont>600</amtcont> </donation> <donation donationid="B002" givenby = "C3333"> <driveno>&B124;</driveno> <datecont>1/12/2000</datecont> <amtcont>1000</amtcont> </donation> <donation donationid="C001" givenby = "C3333"> <driveno>&C125;</driveno> <datecont>5/5/2000</datecont> <amtcont>100</amtcont> </donation> </donations> </donor> <donor idno="D4444"> <name title="Mr.">Robert Brooks</name> <address> <![CDATA[ 45 East St Weymouth, MA 02176 ]]> </address> <yrfirst>1996</yrfirst> <contact>Roger Brown</contact> <donations> <donation donationid="A123005" givenby = "D4444"> <driveno>&A123;</driveno> <datecont>1/1/2000</datecont> <amtcont>500</amtcont> </donation> <donation donationid="B003" givenby = "D4444"> <driveno>&B124;</driveno> <datecont>5/1/2000</datecont> <amtcont>1000</amtcont> </donation> <donation donationid="C002" givenby = "D4444"> <driveno>&C125;</driveno> <datecont>8/1/2000</datecont> <amtcont>250</amtcont> </donation> </donations> </donor> </donors>

  8. <?xml version="1.0" ?> <!-- document type declaration follows --> <!DOCTYPE donors SYSTEM "http://www32.brinkster.com/pgrocer/DTD/drive.dtd" [ <!ELEMENT donors (donor+)> <!ELEMENT donor (name, address, yrfirst?, contact?, donations)> <!ATTLIST donor idno ID #REQUIRED> <!ELEMENT name (#PCDATA)> <!ATTLIST name title (Mr. | Mrs. | Ms. | Dr.) #IMPLIED> <!ELEMENT address (#PCDATA)> <!ELEMENT yrfirst (#PCDATA)> <!ELEMENT contact (#PCDATA)> <!ELEMENT donations (donation+)> <!ELEMENT donation (driveno, datecont, amtcont)> <!ATTLIST donation donationid ID #REQUIRED> <!ATTLIST donation givenby IDREF #REQUIRED> <!ELEMENT driveno (#PCDATA)> <!ELEMENT datecont (#PCDATA)> <!ELEMENT amtcont (#PCDATA)> ]> <donors> <donor idno="A1111"> <name title="Mr.">John Doe</name> <address> <![CDATA[ 123 Elm St Braintree, MA 02184 ]]> </address> <yrfirst>1995</yrfirst> <contact>Ann Smith</contact> <donations> <donation donationid="A001" givenby = "A1111"> <driveno>&A123;</driveno> <datecont>7/5/2000</datecont> <amtcont>1200</amtcont> </donation> <donation donationid="B001" givenby = "A1111"> <driveno>&B124;</driveno> <datecont>5/14/2000</datecont> <amtcont>500</amtcont> </donation> </donations> </donor> Http pointing to drive.dtd.

  9. <?xml version="1.0" ?> <!-- document type declaration follows --> <!DOCTYPE donors [ <!ENTITY A123 "Childrens Drive"> <!ENTITY B124 "Lunch Drive"> <!ENTITY C125 "Shelter Drive"> <!ELEMENT donors (donor+)> <!ELEMENT donor (name, address, yrfirst?, contact?, donations)> <!ATTLIST donor idno ID #REQUIRED> <!ELEMENT name (#PCDATA)> <!ATTLIST name title (Mr. | Mrs. | Ms. | Dr.) #IMPLIED> <!ELEMENT address (#PCDATA)> <!ELEMENT yrfirst (#PCDATA)> <!ELEMENT contact (#PCDATA)> <!ELEMENT donations (donation+)> <!ELEMENT donation (driveno, datecont, amtcont)> <!ATTLIST donation donationid ID #REQUIRED> <!ATTLIST donation givenby IDREF #REQUIRED> <!ELEMENT driveno (#PCDATA)> <!ELEMENT datecont (#PCDATA)> <!ELEMENT amtcont (#PCDATA)> ]>

  10. <donors> <donor idno="A1111"> <name title="Mr.">John Doe</name> <address> <![CDATA[ 123 Elm St Braintree, MA 02184 ]]> </address> <yrfirst>1995</yrfirst> <contact>Ann Smith</contact> <donations> <donation donationid="A001" givenby = "A1111"> <driveno>&A123;</driveno> <datecont>7/5/2000</datecont> <amtcont>1200</amtcont> </donation> <donation donationid="B001" givenby = "A1111"> <driveno>&B124;</driveno> <datecont>5/14/2000</datecont> <amtcont>500</amtcont> </donation> </donations> </donor>

More Related