assertEquals("root", sr.getLocalName());
assertTokenType(CHARACTERS, sr.next());
assertTokenType(ENTITY_REFERENCE, sr.next());
assertEquals("myent", sr.getLocalName());
EntityDecl ed = sr.getCurrentEntityDecl();
assertNotNull(ed);
assertEquals("myent", ed.getName());
assertEquals("value", ed.getReplacementText());
// The pure stax way:
assertEquals("value", sr.getText());
// Finally, let's see that location info is about right?
Location loc = ed.getLocation();
assertNotNull(loc);
assertEquals(2, loc.getLineNumber());
/* Hmmh. Not 100% if this location makes sense, but... it's the
* current behaviour, so we can regression test it.