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)
|