Hi, I have error message . Please help me.

17 Attribute value "001" of type ID must be an NCName when namespaces are enabled.

I am attaching file

<!DOCTYPE cataloge [

<!ELEMENT cataloge (DVD)* >
<!ELEMENT DVD (title?, genre?, rating?, viewerrating?, summary?, year?, director?, runtime?, studio?, actor? ) >
<!ELEMENT title (#PCDATA) >
<!ELEMENT genre (#PCDATA) >
<!ELEMENT rating (#PCDATA) >
<!ELEMENT viewerrating (#PCDATA) >
<!ELEMENT summary (#PCDATA) >
<!ELEMENT year (#PCDATA) >
<!ELEMENT directors (#PCDATA) >
<!ELEMENT runtime (#PCDATA) >
<!ELEMENT studio (#PCDATA) >
<!ELEMENT actor ( lastname, firstname)*>
<!ATTLIST actor id ID #REQUIRED >
<!ELEMENT firstname (#PCDATA) >
<!ELEMENT lastname (#PCDATA ) >

] >


<cataloge>
<DVD>
<title>Gone with the Wind</title>
<genre>Romance,Drama</genre>
<rating>G</rating>
<viewerrating>5.0</viewerrating>
<summary> Southern Belle who meets her match in Rhett Butler (Clark Gable) just as the Civil War breaks out. Living on a large cotton plantation called Tara in rural Georgia in 1861, Scarlett sees her beloved home and life as she knows it go up in flames -- but will her true love be lost too?</summary>
<year>1939</year>
<directors>Victor Fleming</directors>
<runtime>238 minits</runtime>
<studio>Selznick International</studio>
<actor id="001">
<lastname>Gable</lastname>
<firstname>Clark</firstname>
</actor>
<actor id="002">
<lastname>Leigh</lastname>
<firstname>Vivien</firstname>
</actor>
<actor id="003">
<lastname>Howard</lastname>
<firstname>Leslie</firstname>
</actor>
</DVD>
<DVD>
<title>The Dark Knight</title>
<genre>Action,Adventure</genre>
<rating>PG 13</rating>
<viewerrating>4.3</viewerrating>
<summary>the caped crusader (Christian Bale) teams with Lt. James Gordon (Gary Oldman) and District Attorney Harvey Dent (Aaron Eckhart) to continue dismantling Gotham City's criminal organizations. But a psychotic new villain known as the Joker (</summary>
<year>2008</year>
<directors>Christopher Nolan</directors>
<runtime>152 minits</runtime>
<studio>Legendary Pictures,Syncopy Films,DC Comics</studio>
<actor id="004">
<lastname>Bale</lastname>
<firstname>Christian</firstname>
</actor>
<actor id="005">
<lastname>Cain</lastname>
<firstname>Michael</firstname>
</actor>
<actor id="006">
<lastname>Ledger</lastname>
<firstname>Heath</firstname>
</actor>
</DVD>
<DVD>
<title>30 Minutes or Less</title>
<genre>Action,Comedy</genre>
<rating>R</rating>
<viewerrating>3.7</viewerrating>
<summary>Two small-town criminals planning a big-time bank heist wind up abducting pizza delivery driver Nick (Jesse Eisenberg) and forcing him to commit the robbery -- giving him a strict time limit to boot. To pull off the caper, Nick enlists the aid of a former buddy (Aziz Ansari). With the law, the crooks and the clock all breathing down their necks, the duo also try to patch up their troubled friendship in this frenetic action comedy.</summary>
<year>2011</year>
<directors>Ruben Fleischer</directors>
<runtime>83 minits</runtime>
<studio>Media Rights,Red Hour Films</studio>
<actor id="007">
<lastname>Eisenberg</lastname>
<firstname>Jesse</firstname>
</actor>
<actor id="008">
<lastname>McBride</lastname>
<firstname>Danny</firstname>
</actor>
<actor id="009">
<lastname>Ansari</lastname>
<firstname>Aziz</firstname>
</actor>
</DVD>
<DVD>
<title>Forrest Gump</title>
<genre>Romance, Drama</genre>
<rating>PG 13</rating>
<viewerrating>4.7</viewerrating>
<summary>simpleminded man who finds himself in the middle of nearly every major event of the 1960s and '70s. Along the way, he makes friends, changes lives and searches for a soul mate.</summary>
<year>1993</year>
<directors>Robert Zemeckis</directors>
<runtime>141 minits</runtime>
<studio>Paramount Pictures</studio>
<actor id="010">
<lastname>Hanks</lastname>
<firstname>Tom</firstname>
</actor>
<actor id="011">
<lastname>Sinise</lastname>
<firstname/>
</actor>
<actor id="012">
<lastname>Field</lastname>
<firstname>Sally</firstname>
</actor>
</DVD>
<DVD>
<title>Avatar</title>
<genre>Sci-Fi,Fiction</genre>
<rating>PG 13</rating>
<viewerrating>4.3</viewerrating>
<summary>Disabled Marine Jake Sully (Sam Worthington) travels to planet Pandora to become an avatar, ingratiate himself with the natives and help Americans mine lucrative unobtainium. But he finds himself in an interstellar conflict after falling for Na'vi warrior Neytiri (Zoe Saldana)</summary>
<year>2009</year>
<directors>James Cameron</directors>
<runtime>171 minits</runtime>
<studio>Lightstorm Entertainment</studio>
<actor id="013">
<lastname>Worthington</lastname>
<firstname>Sam</firstname>
</actor>
<actor id="014">
<lastname>Saldana</lastname>
<firstname>Zoe</firstname>
</actor>
<actor id="015">
<lastname>Lang</lastname>
<firstname>Stephen</firstname>
</actor>
</DVD>
</cataloge>

For the most part, ID is used primarily by programs or scripting languages that process the document. The value for ID must be a valid XML name beginning with a letter and containing alphanumeric characters or the underscore character without any whitespace.

Thanks for the reply. i fixed that part now this is new error. I appreciate your help.


5 errors have been found!

Click on to jump to the error. In the document, you can point at with your mouse to see the error message.
Errors in the XML document:
48: 8 The content of element type "DVD" must match "(title?,genre?,rating?,viewerrating?,summary?,year?,director?,runtime?,studio?,actor?)".
71: 8 The content of element type "DVD" must match "(title?,genre?,rating?,viewerrating?,summary?,year?,director?,runtime?,studio?,actor?)".
94: 8 The content of element type "DVD" must match "(title?,genre?,rating?,viewerrating?,summary?,year?,director?,runtime?,studio?,actor?)".
117: 8 The content of element type "DVD" must match "(title?,genre?,rating?,viewerrating?,summary?,year?,director?,runtime?,studio?,actor?)".
140: 8 The content of element type "DVD" must match "(title?,genre?,rating?,viewerrating?,summary?,year?,director?,runtime?,studio?,actor?)".

XML document:
1
2 <!DOCTYPE cataloge [
3
4
5
6 <!ELEMENT cataloge (DVD)* >
7 <!ELEMENT DVD (title?, genre?, rating?, viewerrating?, summary?, year?, director?, runtime?, studio?, actor? ) >
8 <!ELEMENT title (#PCDATA) >
9 <!ELEMENT genre (#PCDATA) >
10 <!ELEMENT rating (#PCDATA) >
11 <!ELEMENT viewerrating (#PCDATA) >
12 <!ELEMENT summary (#PCDATA) >
13 <!ELEMENT year (#PCDATA) >
14 <!ELEMENT directors (#PCDATA) >
15 <!ELEMENT runtime (#PCDATA) >
16 <!ELEMENT studio (#PCDATA) >
17 <!ELEMENT actor ( lastname, firstname)*>
18 <!ATTLIST actor id NMTOKEN #REQUIRED >
19 <!ELEMENT firstname (#PCDATA) >
20 <!ELEMENT lastname (#PCDATA ) >
21
22 ] >
23
24
25 <cataloge>
26 <DVD>
27 <title>Gone with the Wind</title>
28 <genre>Romance,Drama</genre>
29 <rating>G</rating>
30 <viewerrating>5.0</viewerrating>
31 <summary> Southern Belle who meets her match in Rhett Butler (Clark Gable) just as the Civil War breaks out. Living on a large cotton plantation called Tara in rural Georgia in 1861, Scarlett sees her beloved home and life as she knows it go up in flames -- but will her true love be lost too?</summary>
32 <year>1939</year>
33 <directors>Victor Fleming</directors>
34 <runtime>238 minits</runtime>
35 <studio>Selznick International</studio>
36 <actor id="001">
37 <lastname>Gable</lastname>
38 <firstname>Clark</firstname>
39 </actor>
40 <actor id="002">
41 <lastname>Leigh</lastname>
42 <firstname>Vivien</firstname>
43 </actor>
44 <actor id="003">
45 <lastname>Howard</lastname>
46 <firstname>Leslie</firstname>
47 </actor>
48 </DVD>
49 <DVD>
50 <title>The Dark Knight</title>
51 <genre>Action,Adventure</genre>
52 <rating>PG 13</rating>
53 <viewerrating>4.3</viewerrating>
54 <summary>the caped crusader (Christian Bale) teams with Lt. James Gordon (Gary Oldman) and District Attorney Harvey Dent (Aaron Eckhart) to continue dismantling Gotham City's criminal organizations. But a psychotic new villain known as the Joker (</summary>
55 <year>2008</year>
56 <directors>Christopher Nolan</directors>
57 <runtime>152 minits</runtime>
58 <studio>Legendary Pictures,Syncopy Films,DC Comics</studio>
59 <actor id="004">
60 <lastname>Bale</lastname>
61 <firstname>Christian</firstname>
62 </actor>
63 <actor id="005">
64 <lastname>Cain</lastname>
65 <firstname>Michael</firstname>
66 </actor>
67 <actor id="006">
68 <lastname>Ledger</lastname>
69 <firstname>Heath</firstname>
70 </actor>
71 </DVD>
72 <DVD>
73 <title>30 Minutes or Less</title>
74 <genre>Action,Comedy</genre>
75 <rating>R</rating>
76 <viewerrating>3.7</viewerrating>
77 <summary>Two small-town criminals planning a big-time bank heist wind up abducting pizza delivery driver Nick (Jesse Eisenberg) and forcing him to commit the robbery -- giving him a strict time limit to boot. To pull off the caper, Nick enlists the aid of a former buddy (Aziz Ansari). With the law, the crooks and the clock all breathing down their necks, the duo also try to patch up their troubled friendship in this frenetic action comedy.</summary>
78 <year>2011</year>
79 <directors>Ruben Fleischer</directors>
80 <runtime>83 minits</runtime>
81 <studio>Media Rights,Red Hour Films</studio>
82 <actor id="007">
83 <lastname>Eisenberg</lastname>
84 <firstname>Jesse</firstname>
85 </actor>
86 <actor id="008">
87 <lastname>McBride</lastname>
88 <firstname>Danny</firstname>
89 </actor>
90 <actor id="009">
91 <lastname>Ansari</lastname>
92 <firstname>Aziz</firstname>
93 </actor>
94 </DVD>
95 <DVD>
96 <title>Forrest Gump</title>
97 <genre>Romance, Drama</genre>
98 <rating>PG 13</rating>
99 <viewerrating>4.7</viewerrating>
100 <summary>simpleminded man who finds himself in the middle of nearly every major event of the 1960s and '70s. Along the way, he makes friends, changes lives and searches for a soul mate.</summary>
101 <year>1993</year>
102 <directors>Robert Zemeckis</directors>
103 <runtime>141 minits</runtime>
104 <studio>Paramount Pictures</studio>
105 <actor id="010">
106 <lastname>Hanks</lastname>
107 <firstname>Tom</firstname>
108 </actor>
109 <actor id="011">
110 <lastname>Sinise</lastname>
111 <firstname/>
112 </actor>
113 <actor id="012">
114 <lastname>Field</lastname>
115 <firstname>Sally</firstname>
116 </actor>
117 </DVD>
118 <DVD>
119 <title>Avatar</title>
120 <genre>Sci-Fi,Fiction</genre>
121 <rating>PG 13</rating>
122 <viewerrating>4.3</viewerrating>
123 <summary>Disabled Marine Jake Sully (Sam Worthington) travels to planet Pandora to become an avatar, ingratiate himself with the natives and help Americans mine lucrative unobtainium. But he finds himself in an interstellar conflict after falling for Na'vi warrior Neytiri (Zoe Saldana)</summary>
124 <year>2009</year>
125 <directors>James Cameron</directors>
126 <runtime>171 minits</runtime>
127 <studio>Lightstorm Entertainment</studio>
128 <actor id="013">
129 <lastname>Worthington</lastname>
130 <firstname>Sam</firstname>
131 </actor>
132 <actor id="014">
133 <lastname>Saldana</lastname>
134 <firstname>Zoe</firstname>
135 </actor>
136 <actor id="015">
137 <lastname>Lang</lastname>
138 <firstname>Stephen</firstname>
139 </actor>
140 </DVD>
141 </cataloge>


The following files have been uploaded so far:
XML document: edit
Click on any file name if you want to edit the file.

Thanks for all the help. When I validate in w3c I get following error.


The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

I GET THSI SEVERAL TIMES, line 40,44,56 every time <directors> is used. also another
at <actor001> thru 15 another error

<actor id="008">

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).


thanks. please help me

I also have warning.I am soory for too many posts.

Missing "charset" attribute for "text/xml" document.

The HTTP Content-Type header (text/xml) sent by your web browser (Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.1) Gecko/20100101 Firefox/6.0.1) did not contain a "charset" parameter, but the Content-Type was one of the XML text/* sub-types.

The relevant specification (RFC 3023) specifies a strong default of "us-ascii" for such documents so we will use this value regardless of any encoding you may have indicated elsewhere.

If you would like to use a different encoding, you should arrange to have your browser send this new encoding information.

I thank people who take time to answer. god bless

I figured it out. Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.