posted 22 years ago
This is very interesting,
I changed the above code a little bit, like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE person [
<!ENTITY % nameDesc"<!ELEMENT name (#PCDATA)>">
<!ENTITY % literateAtt"YES">
<!ELEMENT person (name)>
%nameDesc;
<!ATTLIST name literate CDATA "%literateAtt;">
<!ATTLIST name title CDATA "%titleAtt;">
]>
<person>
<name>Shoba</name>
</person>
In IBM WebShpere, it does not generate any error.
But in MS IE, it generates the error:"Parameter entities cannot be used inside markup declarations in an internal subset. "
Also in "Professinal XML 2nd" Page 173, under the title "Parameter Entities" says: "parameter entities are used exclusively in DTDs and must always be parsed entities." And it even gives a fragmental example, but that example does not work when I tried it.
This is really frustrating!
Tong Chen (Seattle USA)<br />SCJP,SCWCD,SCDJWS,IBM XML,MCP.NET,MCAD.NET,MCSD.NET