Eric Dalquist opened SPR-7620 and commented
StaxEventContentHandler doesn't set the configured SAX Locator on the XMLEventFactory until consumeEvent is called. consumeEvent is called after the event is created which means when client code sets a Locator it does not take effect until after the next event that is written to the XMLEventWriter.
I propose modifying setDocumentLocator so that it calls setLocation on the XMLEventFactory immediately.
Affects: 3.0.4
Attachments:
Referenced from: commits 1f29640