brothercake
11-29-2002, 03:27 PM
Here's an excerpt from the DTD
<!DOCTYPE kar_trends [
<!ELEMENT kar_trends (subject)*>
<!ELEMENT subject (about,study)>
<!ELEMENT about (#PCDATA)>
<!ELEMENT study (#PCDATA)>
<!ENTITY coi "Captains of Industry">
<!ATTLIST study year CDATA #REQUIRED>
<!ATTLIST study season CDATA #REQUIRED>
]>
And here's a sample of the XML
<kar_trends>
<subject>
<about>3com</about>
<study year="1998" season="w">&coi;</study>
</subject>
</kar_trends>
But when I validate it I get any error message, that the STUDY element has invalid content. Huh??
<!DOCTYPE kar_trends [
<!ELEMENT kar_trends (subject)*>
<!ELEMENT subject (about,study)>
<!ELEMENT about (#PCDATA)>
<!ELEMENT study (#PCDATA)>
<!ENTITY coi "Captains of Industry">
<!ATTLIST study year CDATA #REQUIRED>
<!ATTLIST study season CDATA #REQUIRED>
]>
And here's a sample of the XML
<kar_trends>
<subject>
<about>3com</about>
<study year="1998" season="w">&coi;</study>
</subject>
</kar_trends>
But when I validate it I get any error message, that the STUDY element has invalid content. Huh??