You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if I set the properties IS_SUPPORTING_EXTERNAL_ENTITIES and IS_REPLACING_ENTITY_REFERENCES to true I'm facing the following problem. The replacing of the external entity works fine, but for the first event after the reader jumbs into the entity document or back to the main document the ValidatingStreamReader.getStartLocation() method returns an invalid location (at least in my case).
First case: reader jumps into the external entity document -> systemId is from the entity document, but the character offset points to a position in the main document.
Second case: reader jumps back into the main document -> the otherway around: systemId is the main document, but offset points to the entity document.
event = START_ELEMENT
name = main
start = main.xml#53
end = main.xml#59
cur = main.xml#59
event = START_ELEMENT
name = include
start = include.xml#59
end = include.xml#9
cur = include.xml#9
event = END_ELEMENT
name = include
start = include.xml#9
end = include.xml#19
cur = include.xml#19
event = END_ELEMENT
name = main
start = main.xml#19
end = main.xml#72
cur = main.xml#72
The bad locations are:
event = START_ELEMENT
name = include
start = include.xml#59
(I would expect include.xml#0)
and
event = END_ELEMENT
name = main
start = main.xml#19
(I would expect main.xml#65)
Thanks for your help!
Best Regards,
Nico
The text was updated successfully, but these errors were encountered:
Sounds like a bug, yes. If anyone has time, the first step could be to write a (failing) unit test to reproduce the problem in its smallest form, and help verify eventual fix.
That would help figure out what exactly is happening wrt discrepancy, why source and location information are disjoint.
nkutsche
added a commit
to nkutsche/woodstox
that referenced
this issue
Dec 8, 2019
Hi,
if I set the properties
IS_SUPPORTING_EXTERNAL_ENTITIES
andIS_REPLACING_ENTITY_REFERENCES
totrue
I'm facing the following problem. The replacing of the external entity works fine, but for the first event after the reader jumbs into the entity document or back to the main document theValidatingStreamReader.getStartLocation()
method returns an invalid location (at least in my case).First case: reader jumps into the external entity document -> systemId is from the entity document, but the character offset points to a position in the main document.
Second case: reader jumps back into the main document -> the otherway around: systemId is the main document, but offset points to the entity document.
The following sample should demonstrate it:
This is the result:
The bad locations are:
(I would expect
include.xml#0
)and
(I would expect
main.xml#65
)Thanks for your help!
Best Regards,
Nico
The text was updated successfully, but these errors were encountered: