The following code throws an error : Reference to undeclared namespace prefix:test
<?xml version="1.0"?>
<!DOCTYPE test:firstname [
<!ELEMENT test:firstname (#PCDATA) >
<!ATTLIST test:firstname xmlns:test CDATA "namespace">
]>
<test:firstname>Content</test:firstname>
-----------------------------------------------------------------------------
The following code throws this error:
"Text is not allowed in this context according to DTD/Schema.Expecting:CDATA"
<?xml version="1.0"?>
<!DOCTYPE firstname [
<!ELEMENT firstname (CDATA) >
]>
<firstname><![CDATA[hithere>]]></firstname>
Could anyone let me know why this code is throwing the error?And what should be the change which has to be done in both the cases..