Please check, may be this is new bug.
When DTD contains param. entities with System Ids
references to other part of DTD, parser prepares whole
DTD. As result DTDValidator object after parsing will contains
number of the same entities/elements. 
Example:
 
araticle.xml
 
<?xml version="1.0"?>
<!DOCTYPE article SYSTEM "article.dtd">
<article>
</article>
araticle.dtd
 
<?xml version="1.0" encoding="UTF-8"?>
<!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin1//EN//HTML" "HTMLlat1.ent">
%HTMLlat1;
<!ENTITY % HTMLsymbol PUBLIC   "-//W3C//ENTITIES Symbols//EN//HTML" "HTMLsymbol.ent">
%HTMLsymbol;
<!-- Root element: article -->
<!ELEMENT article ANY>
 
HTMLlat1.ent
 
<!ENTITY nbsp "&#160;">
<!ENTITY iexcl "&#161;">
HTMLsymbol.ent
 
<!ENTITY sigma    "&#963;">
<!ENTITY tau      "&#964;">
 
After parsing DTDValidator object contains:
elements: article - 3
 
entities:
            sigma   - 2
            tau    - 2
            nbsp - 2
            iexcl - 2
            all built-in XML entities - 3
 
Boris Tarasyuk
I4I
 
 
 

 
   
 
 
Boris Tarasyuk
 

Reply via email to