posted 17 years ago
I have declared some entity references in my XML (may be external or internal). Say
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="sample.xsl"?>
<!DOCTYPE titlepackage [
<!ENTITY rdquo "”" >
<!ENTITY rdquor "“" >
]>
<package>
<ID id="e"/>
<title> ”Know thyself.”</title>
</package>
Here I am using the entity names in XML and there hex values are mentioned in the DOCTYPE declaration.
I want to know is there any difference between using entity names (where entity values are specified in DOCTYPE) and directly using the hex values in the XML, as in the example below
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="sample.xsl"?>
<package>
<ID id="e"/>
<title> ”Know thyself.“</title>
</package>
Is there any advantage of using one over the other?
[ March 01, 2007: Message edited by: Thomas Greene ]