Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WstxValidationException: Unknown reason (at end element </nl:nillableIntElement>) when validating a document with nillable elements #187

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ppalaga
Copy link
Contributor

@ppalaga ppalaga commented Jan 10, 2024

fix #179
fix #190

@ppalaga
Copy link
Contributor Author

ppalaga commented Jan 10, 2024

@cowtowncoder here is the first sketch of what could become a real fix. Any feedback would be appreciated.

@cowtowncoder
Copy link
Member

With a quick look that makes sense.

My one concern is that the attributes should only be tracked when information is needed (validation enabled, or duplicate check), and avoided otherwise.
This because keeping track with a Maps will add measurable overhead for common case where validation is not enabled.

@ppalaga
Copy link
Contributor Author

ppalaga commented Jan 10, 2024

Thank for the feedback, @cowtowncoder!

My one concern is that the attributes should only be tracked when information is needed (validation enabled, or duplicate check), and avoided otherwise. This because keeping track with a Maps will add measurable overhead for common case where validation is not enabled.

+1. If SimpleOutputElement is the right place to implement the attribute tracking, then I can gladly have a look to make the implementation more performant.

@ppalaga
Copy link
Contributor Author

ppalaga commented Jan 10, 2024

My one concern is that the attributes should only be tracked when information is needed (validation enabled, or duplicate check)

That's actually the case already. All calls of SimpleOutputElement.checkAttrWrite(String, String, String, String) are guarded by either BaseStreamWriter.mCheckAttrs or by BaseStreamWriter.mValidator != null.

validation wherever we test the reader validation
…verbose"' not thrown from RepairingNsStreamWriter when validating against a DTD schema
</nl:nillableIntElement>) when validating a document with nillable
elements fix FasterXML#179 fix FasterXML#190
@ppalaga ppalaga marked this pull request as ready for review January 14, 2024 01:16
@ppalaga
Copy link
Contributor Author

ppalaga commented Jan 14, 2024

Only the last commit is relevant. The rest is also available in #191 where we can discuss it separately.

@cowtowncoder could you please review?

@grigoni
Copy link

grigoni commented Nov 14, 2024

hi @cowtowncoder, I'm interested in this fix, can you please have a look? thanks a lot

@ppalaga
Copy link
Contributor Author

ppalaga commented Nov 14, 2024

@grigoni I apologize, this hangs due to legal issues with the Contributor Agreement on the side of my company.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants