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
posted 14 years ago
The value of an attribute of type ID cannot begin with a number.