You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by John Yu <jy...@nuforia.com> on 2000/01/26 23:54:04 UTC

Character Reference not working in PCDATA

We just switched from IBM xml4j to Apache Xerces, and found that
character references and general entities not working in PCDATA,
while it's working in attributes.

Here is the xml file we used. The blue part will give us the right text,
but the purple part is shrinked to "function Function2(){ good":
<?xml version="1.0"?>
<!DOCTYPE FunctionDef SYSTEM "function.dtd" >
<FunctionDef id='Function2 &lt;good>&quot;' description='Function'>
function Function2(){ good &#60; }
<VersionInfo version="1" modified="N" srcLibrary="tlv1024"
srcArchive="tlv1024" createdBy="jyu" createdDate="NOV-02-1999 14:32"
modifiedBy="jyu" modifiedDate="JAN-25-2000 12:06" status="draft"/>
</FunctionDef>

the dtd file we used is called function.dtd and it has the following:
<!ELEMENT FunctionDef        (#PCDATA | VersionInfo)*>
<!ATTLIST FunctionDef
    id               ID      #IMPLIED
    description      CDATA   #IMPLIED
>

Is this a known bug, or do you have already got patches for that?

Thanks a lot for your time and help,
John

 
--
john yu
java developer
 
nuforia inc.                           >  houston
v  713.354.1573
f  713.354.1600
http://www.nuforia.com <http://www.nuforia.com/> 
 

Re: Character Reference not working in PCDATA

Posted by Andy Clark <an...@apache.org>.
> John Yu wrote:
>
> We just switched from IBM xml4j to Apache Xerces, and found that
> character references and general entities not working in PCDATA,
> while it's working in attributes.

What version of Xerces did you download? If it's 1.0.0, please
update to 1.0.1 and see if your problem goes away.

-- 
Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org