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

Validation implementation of XMLStreamWriter incomplete #5

Open
beckchr opened this issue Mar 13, 2011 · 3 comments
Open

Validation implementation of XMLStreamWriter incomplete #5

beckchr opened this issue Mar 13, 2011 · 3 comments

Comments

@beckchr
Copy link

beckchr commented Mar 13, 2011

Validation is not working with an XMLStreamWriter. A quick comparison with woodstox makes obvious that several calls to XMLValidator are missing in StreamWriterBase (at least in writeAttribute(...), writeStartElement(...) and _closeStartElement(...)) and subclasses (several locations).

Furthermore, the invocation of XMLValidator..validateElementEnd(...) in StreamWriterBase._validator.validateElementEnd() mixes up the prefix and nsUri arguments.

@cowtowncoder
Copy link
Member

Correct, it has not (yet) been implemented. But it probably should not be lots of work to complete this, less than work to make reader-side validation work.

@cowtowncoder cowtowncoder changed the title Validation not working for StAX writer Validation not implement for XMLStreamWriter implementation Mar 28, 2018
@cowtowncoder cowtowncoder changed the title Validation not implement for XMLStreamWriter implementation Validation not implemented for XMLStreamWriter implementation Mar 30, 2018
@cowtowncoder cowtowncoder changed the title Validation not implemented for XMLStreamWriter implementation Validation not working well for XMLStreamWriter implementation Mar 30, 2018
@cowtowncoder
Copy link
Member

Actually only now realized that there is support, just not complete, and obviously not (well) tested.
But validator instance is passed; and we can perhaps use Stax2 test suite to help validate validation too...

@cowtowncoder cowtowncoder added the active Issue being actively worked on label Mar 30, 2018
@cowtowncoder
Copy link
Member

After brief look, this is not trivial to add. Doable, certainly, but needs to dig in, compare how Woodstox it does (probably), and do it.

Also worth noting that since Aalto itself does not provide validators, nor Stax2 (although a ref impl might make sense?), users would need to write their own validator or use Woodstox-provided implementation. Tests here can do latter.

@cowtowncoder cowtowncoder removed the active Issue being actively worked on label Apr 3, 2018
@cowtowncoder cowtowncoder changed the title Validation not working well for XMLStreamWriter implementation Validation implementation of XMLStreamWriter incomplete Apr 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants