• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What's wrong with it?

 
Himal Chuli
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi folks,
i couldn't figure out what's wrong with the following:
<?xml version="1.0"?>
<!DOCTYPE film [

<!ENTITY COM "Comedy">
<!ENTITY SF "Science Fiction">

<!ELEMENT film (title+,genre,year)>
<!ELEMENT title (#PCDATA)>
<!ATTLIST title
xml:lang NMTOKEN "EN"
id ID #IMPLIED>
<!ELEMENT genre (#PCDATA)>
<!ELEMENT year (#PCDATA)>
]>
<film>
<title id="1">Tootsie</title>
<genre>&COM;</genre>
<year>1982</year>
<title id="2">Jurassic Park</title>
<genre>&SF;</genre>
<year>1993</year>
</film>
when i tried validating, the following error is reported:
Source: <title id="2">Jurassic Park</title>
A name was started with an invalid character.
what's wrong with it?
Also, what's the idea of doing xml:lang in the above example? could any one explain it?
thanks.
himal
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The value of an attribute of type ID cannot begin with a number.
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2.12 Language Identification
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic