CXF-8966 : Validation of nillable tags fails
Change xml validation strategy to use the Woodstox validation when reading instead of having a reader and a writer to a nulloutput because this method is not able to handle the xsi:nil=true attributes.
Previous Algorithm :
- Transform the input to a DOMSource Object
- create a XMLReader from this new object and a XMLWriter to a nulloutput
- setup the wookdstock validation on the writer if possible
- Create a filtered Reader to remove external references
- Copy the filterReader to the Null Writer
- if setup fails, use XOP validation
Suggested algorithm :
- create a filtered reader from the input to remove external references
- setup the wookdstock validation on the reader if possible
- call read
- if setup fails, use XOP validation
@f2par0 thank you for attempt to fix the issue, I believe the issue is identified here https://github.com/FasterXML/woodstox/issues/179 and it seems like the issue is not within CXF or Woodstox but MSV
Yes, thanks for finding this issue. So this PR is more a workaround to avoid to call MSV writer.
Yes, thanks for finding this issue. So this PR is more a workaround to avoid to call MSV writer.
I would prefer the wait for fix to come from upstream if possible and not merge any workarounds
https://github.com/FasterXML/woodstox/issues/179 is a Woodstox issue after all - see https://github.com/FasterXML/woodstox/issues/179#issuecomment-1879372276
A fix for https://github.com/FasterXML/woodstox/issues/179 is underway: https://github.com/FasterXML/woodstox/pull/187
Why not change in general the approach to run the validation on reader-side instead of on a (dummy) writer during a additional copy process?
I like the approach of these PR here to change.....
I've tried it by myself here in a similar way.
Sorry for the delay, https://github.com/FasterXML/woodstox/pull/187 got stuck due to legal issues with the CLA. I hope those get resolved soonish.