You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Ramesh <ra...@enode.com> on 2000/06/27 07:22:07 UTC
Yet another named doc impl related bug in Xerces 1.1.*
This used to work in Xerces 1.0.*, but broke in 1.1.1. It is still broken in
1.1.2. I have included a test case, as well as info on how to mask the
problem in certain cases.
If I change the document-class-name property of DOMParser, then parameter
entities stop working in SOME cases, but continue to work in others!
Here is a simple test case to reproduce this bug using external parameter
entities:
<!-- ======================================== -->
<?xml version = "1.0" ?>
<!DOCTYPE foo SYSTEM "my.dtd" []>
<foo>
<something/>
</foo>
<!-- ======================================== -->
where, the contents of "my.dtd" are:
<!-- ======================================== -->
<!ENTITY % myEntity 'something'>
<!ELEMENT other (#PCDATA)>
<!ELEMENT something (#PCDATA)>
<!ELEMENT foo (other?, (%myEntity;)*)>
<!-- ======================================== -->
With namespaces feature turned off, and validation turned on, I get an
error:
The content of element type "foo" must match "<other?,other*>".
Note that the error says <other?,other*>, not <other?,something*>. The error
goes away if I reverse the order in which something and other are declared
in the external DTD file!
The problem also disappears if I do not change the document-class-name
property of the DOMParser.
Ramesh