You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2003/04/09 09:50:41 UTC
DO NOT REPLY [Bug 18842] New: -
multiple layers of entities
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18842>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18842
multiple layers of entities
Summary: multiple layers of entities
Product: Xerces-C++
Version: 2.2.0
Platform: PC
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: Other
Component: DOM
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: stefan.roiser@cern.ch
Parsing of documents with multiple layers of entities result in a wrong
DOM-tree. E.g. when parsing the following "MyDoc.xml" and its dependent
documents with XERCES 2.2.0
MyDoc.xml:
----------
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE mydoc [
<!ELEMENT mydoc (elem1, elem2)>
<!ELEMENT elem1 (onlyonce)>
<!ELEMENT elem2 (onlyonce)>
<!ELEMENT onlyonce EMPTY>
<!ENTITY Elem1 SYSTEM "Elem1.xml" >
<!ENTITY Elem2 SYSTEM "Elem2.xml" >
<!ENTITY OnlyOnce SYSTEM "OnlyOnce.xml" >
]>
<mydoc>
&Elem1;
&Elem2;
</mydoc>
Elem1.xml:
----------
<elem1>
&OnlyOnce;
</elem1>
Elem2.xml:
----------
<elem2>
&OnlyOnce;
</elem2>
OnlyOnce.xml:
-------------
<onlyonce/>
the resulting DOM-tree will look like:
[...]
<mydoc>
<elem1>
<onlyonce/>
</elem1>
<elem2>
<onlyonce/>
<onlyonce/>
</elem2>
</mydoc>
In <elem2> the element <onlyonce> appears twice while it should be there
only once. An <elem3> would appear 3 times and so on ....
I looked up the XML-specifications of the W3C and could not find a hint
that multiple layers of entities are forbidden by the language.
Additionally Xerces-C 1.6.0 parsed the document correctly. So I consider
this to be a bug of the new parser.
Cheers
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org