United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6620632 sjsxp issue 48: DTD event is missing entity and notation information
JDK-6620632 : sjsxp issue 48: DTD event is missing entity and notation information

Details
Type:
Bug
Submit Date:
2007-10-23
Status:
Closed
Updated Date:
2012-04-25
Project Name:
JDK
Resolved Date:
2007-10-23
Component:
xml
OS:
generic
Sub-Component:
javax.xml.stream
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
1.4.0 (1.4)

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

Description
sjsxp issue 48:

DTDEvent instances constructed via event reader are missing the notation and
entity declaration information. Fortunately both are available via stream
reader; so modifying XMLEntityManager's DTDEvent construction with code similar
to this:

                    DTDEvent dtd = new DTDEvent(streamReader.getText());
                    List ents = (List)
streamReader.getProperty(PropertyManager.STAX_ENTITIES);
                    if (ents != null) {
                        dtd.setEntities(ents);
                    }
                    List notations = (List)
streamReader.getProperty(PropertyManager.STAX_NOTATIONS);
                    if (notations != null) {
                        dtd.setNotations(notations);
                    }
                    event = dtd;
                }

seems to resolve the problem (StaxTest, TestEventReader#testValidDtdEvent passes
with the fix)

                                    

Comments
EVALUATION

Fixed in jaxp on java.net. This is the same fix as that for sjsxp issue 48.
                                     
2007-10-23



Hardware and Software, Engineered to Work Together