I have been stuck on this single attribute for both of my assignments for 3 hours and I still have a second case problem, a quiz and an entire C# program to finish by Tuesday. I am working on creating my first DTD and as far as I know, I did as the book asked and I even re-read some sections. Can someone please help clarify? Here is the message the program gives me when I try to validate the XML file:

"[Xerces-J 2.9.1] Validating "photos.xml" against "file:/C:/Users/MahvelSisters/Downloads/Data Files for Text/Data Files for Text/NP_XML3e_T02_Data/NP_XML3e_T02_Data/xml02/case1/photos.dtd" ... Ln 15 Col 24 - The attribute type is required in the declaration of attribute "photos" for element "type". 1 Error"

Here is the XML:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!--
   New Perspectives on XML
   Tutorial 2
   Case Problem 1

   Catalog of photos from the Our Lady of Bergen Historical Society

   Filename:         photos.xml
   Supporting file:  photos.dtd
-->
 
<!DOCTYPE catalog SYSTEM "photos.dtd">
<catalog type="photos">

   <photo cid="c1748" donatedBy="John Borelli">
      <name metadata="tunis cooper property museum">Tunis R. Cooper property</name>
      <description>
      <![CDATA[ 
         This photo was taken by John Borelli's great-grandfather. It is believed to have been taken around 1830.
         David Demarest originally purchased the site of the chair factory in 1663. This site was under the ownership 
         of the Demarest family until 1758.  The property is listed in the National and New Jersey Registers of Historic Places.
      ]]>
      </description>
      <date>1830 circa</date>
      <images>
         <img src="1748a.jpg" />
         <img src="1748b.jpg" />
      </images>
   </photo>

   <photo cid="c1749" donatedBy="John Borelli">
      <name metadata="tunis cooper property museum">Tunis R. Cooper property</name>
      <description>
      <![CDATA[ 
         A more recent picture of the property taken by the Borelli family.  The property is listed in the 
         National and New Jersey Registers of Historic Places.
      ]]>
      </description>
      <date>1950 circa</date>
      <images>
         <img src="1749a.jpg" />
      </images>
   </photo>

   <photo cid="c1411" donatedBy="Saint Johns Catholic Church">
      <name metadata="saint johns catholic church">Saint Johns Church</name>
      <description>
      <![CDATA[ 
         A more recent picture of the property taken by the Borelli family.  The property is listed in the 
         National and New Jersey Registers of Historic Places.
      ]]>
      </description>      
      <date>1921</date>
   </photo>

   <photo cid="c2003" donatedBy="Linda Choo">
      <name metadata="bergenfield elementary school">Bergenfield School</name>
      <description>
      <![CDATA[ 
         The No. 5 Public School, a.k.a. Bergenfield School
      ]]>
      </description>
      <date>1920 circa</date>
      <images>
         <img src="2003a.jpg" />
         <img src="2003b.jpg" />
      </images>
   </photo>

   <photo cid="c2078" donatedBy="Maria Giodelli">
      <name metadata="coopers pond water">Coopers Pond</name>
      <description>
      <![CDATA[ 
         A favorite spot where we used to go hang out as kids.  The picture shows my brothers Robert and Michael.
      ]]>
      </description>
      <date>May 4, 1941</date>
      <images>
         <img src="2078a.jpg" />
      </images>
   </photo>

   <photo cid="c2079" donatedBy="Linda Uffington">
      <name metadata="watch timekeeping pocket railway">Pocket Watch</name>
      <description>
      <![CDATA[ 
         A more recent picture of the property taken by the Borelli family.  The property is listed in the 
         National and New Jersey Registers of Historic Places.
      ]]>
      </description>
      <date>1870 circa</date>
      <images>
         <img src="2079a.jpg" />
         <img src="2079b.jpg" />
      </images>
   </photo>

   <photo cid="c3233">
      <name metadata="hotel">Bergenfield Hotel</name>
      <description>
      <![CDATA[ 
         The Knollfield Hotel was known as the Bergenfield Hotel.  The property is listed in the 
         National and New Jersey Registers of Historic Places.
      ]]>
      </description>
      <date>circa 1920</date>
   </photo>

   <photo cid="c3433">
      <name metadata="sweeney coal fuel">Sweeney Coal</name>
      <description>
      <![CDATA[ 
         Sweeny Fuel Company located near New Bridge Road and railroad tracks.
      ]]>
      </description>
      <date>1920</date>
      <images>
         <img src="3433a.jpg" />
         <img src="3433b.jpg" />
         <img src="3433c.jpg" />
      </images>
   </photo>

</catalog>
DTD file:
Code:
<!--
   New Perspectives on XML
   Tutorial 2
   Case Problem 1

   Catalog of photos from the Our Lady of Bergen Historical Society

   Filename:         photos.dtd
   Supporting File:  photos.xml
-->

<!ELEMENT catalog (photo+)>
<!ATTLIST type photos #REQUIRED>

<!ELEMENT photo (name, description, date, images?)>
<!ATTLIST cid #REQUIRED>
<!ATTLIST donatedBy #IMPLIED>

<!ELEMENT name (#PCDATA)>
<!ATTLIST metadata photo1 photo2 photo3 photo4 #REQUIRED>

<!ELEMENT description (#PCDATA)>
<!ELEMENT date (#PCDATA)>

<!ELEMENT images (img+)>
<!ELEMENT img (EMPTY)>
<!ATTLIST src CDATA #REQUIRED>
]>
And here is the second XML file with imbedded DTD that is giving me similar issues:

Code:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!--
   New Perspectives on XML
   Tutorial 2
   Case Problem 2

   MDPBA Competition Roster
   Author: Pauline L. Crawford
   Date:   09/13/2015

   Filename:         mdpba.xml 
-->
<!DOCTYPE bands
[
<!ENTITY celtic SYSTEM "celtic.jpg" NDATA celtic>
<!ENTITY badger SYSTEM "badger.jpg" NDATA celtic>
<!ELEMENT bands (band+)>
<!ELEMENT band (name, city, logo?, competition)>
<!ATTLIST band cid ID #REQUIRED>

<!ELEMENT name (#PCDATA)>
<!ATTLIST name grade (1 | 2 | 3 | 4 | 5 | juenile | novice) #REQUIRED>
<!ELEMENT city (#PCDATA)>
<!ELEMENT logo EMPTY>
<!ENTITY source #REQUIRED>
<!ELEMENT competition (event, event+)>
<!ELEMENT event (tune+)>
<!ATTLIST type (MSR | Medley)>
<!ELEMENT tune (#PCDATA)>

<!NOTATION JPG "image/jpg" SYSTEM>


<bands name="Midwest Developmental Pipe Band">
   <band cid="c0001">
      <name grade="juvenile">School of Celtic Bagpipes &amp; Drumming</name>
      <city>Delafield</city>
      <logo source="celtic" />
      <competition>
         <event type="MSR">
            <tune>Charlies Welcome</tune>
            <tune>Mrs MacPherson of Inveran</tune>
            <tune>Brown Haired Maiden</tune>
         </event>
         <event type="Medley">
            <tune>Rowd's Hornpipe</tune>
         </event>
      </competition>
   </band>
   <band cid="c0002">
      <name grade="juvenile">Badger Pipes and Drums</name>
      <city>Madison</city>
      <logo source="badger" />
      <competition>
         <event type="MSR">
            <tune>Lord Alexander Kennedy</tune>
            <tune>Bob of Fettercairn</tune>
            <tune>Brown Haired Maiden</tune>
         </event>
         <event type="Medley">
            <tune>Out of the Air</tune>
         </event>
      </competition>
   </band>
   <band cid="c0003">
      <name grade="novice">Pardeeville School of Piping and Drumming</name>
      <city>Pardeeville</city>
      <competition>
         <event type="MSR">
            <tune>Lord Alexander Kennedy</tune>
            <tune>Bob of Fettercairn</tune>
            <tune>The Little Cascade</tune>
         </event>
         <event type="Medley">
            <tune>The Radar Racketeer</tune>
         </event>
      </competition>
   </band>
   <band cid="c0004">
      <name grade="3">Zoar Scottish Pipe Band</name>
      <city>Zoar</city>
      <competition>
         <event type="MSR">
            <tune>Charlies Welcome</tune>
            <tune>Mrs MacPherson of Inveran</tune>
            <tune>Major Manson</tune>
         </event>
         <event type="Medley">
            <tune>Miss Lily</tune>
         </event>
      </competition>
   </band>
   <band cid="c0005">
      <name grade="juvenile">Stockholm Pipe Band</name>
      <city>Stockholm</city>
      <competition>
         <event type="MSR">
            <tune>Pretty Marion</tune>
            <tune>The Sheepwife</tune>
            <tune>Brown Haired Maiden</tune>
         </event>
         <event type="Medley">
            <tune>Farewell to Erin</tune>
          </event>
      </competition>
   </band>
</bands>
Any help would be genuinely appreciated...