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
I've found a bug in the way white-space is handled by the BaseStreamWriter when using validation with release 5.1.0
The exception we get is the following: Exception in thread "main" com.ctc.wstx.exc.WstxValidationException: Element <Document> has non-mixed content specification; can not contain non-white space text, or any CDATA sections at [row,col {unknown-source}]: [1,49] at com.ctc.wstx.exc.WstxValidationException.create(WstxValidationException.java:50) at com.ctc.wstx.sw.BaseStreamWriter.reportProblem(BaseStreamWriter.java:1248) at com.ctc.wstx.sw.BaseStreamWriter.reportValidationProblem(BaseStreamWriter.java:1739) at com.ctc.wstx.sw.BaseStreamWriter.reportInvalidContent(BaseStreamWriter.java:1691) at com.ctc.wstx.sw.BaseStreamWriter.verifyWriteCData(BaseStreamWriter.java:1516) at com.ctc.wstx.sw.BaseStreamWriter.writeCData(BaseStreamWriter.java:331) at com.ctc.wstx.sw.BaseStreamWriter.copyEventFromReader(BaseStreamWriter.java:806) at Converter.main(Converter.java:34)
This happens because white-space events copied to the BaseStreamWriter, at BaseStreamWriter:806, are handled by writeCData() and therefore treated as a CDATA block for validation purposes.
The text was updated successfully, but these errors were encountered:
Fix#47 write white-space events as character events
cowtowncoder
changed the title
Validation error due to white-space being handled as CData by BaseStreamWriter
Validation error due to white-space being handled as CData by BaseStreamWriterAug 21, 2018
Excellent, thank you for reporting this, providing fix! Will be in next release (5.1.1 or 5.2.0, depending on if bump in minor version needed for other fixes)
Hello,
I've found a bug in the way white-space is handled by the BaseStreamWriter when using validation with release 5.1.0
The exception we get is the following:
Exception in thread "main" com.ctc.wstx.exc.WstxValidationException: Element <Document> has non-mixed content specification; can not contain non-white space text, or any CDATA sections at [row,col {unknown-source}]: [1,49] at com.ctc.wstx.exc.WstxValidationException.create(WstxValidationException.java:50) at com.ctc.wstx.sw.BaseStreamWriter.reportProblem(BaseStreamWriter.java:1248) at com.ctc.wstx.sw.BaseStreamWriter.reportValidationProblem(BaseStreamWriter.java:1739) at com.ctc.wstx.sw.BaseStreamWriter.reportInvalidContent(BaseStreamWriter.java:1691) at com.ctc.wstx.sw.BaseStreamWriter.verifyWriteCData(BaseStreamWriter.java:1516) at com.ctc.wstx.sw.BaseStreamWriter.writeCData(BaseStreamWriter.java:331) at com.ctc.wstx.sw.BaseStreamWriter.copyEventFromReader(BaseStreamWriter.java:806) at Converter.main(Converter.java:34)
This happens because white-space events copied to the BaseStreamWriter, at BaseStreamWriter:806, are handled by writeCData() and therefore treated as a CDATA block for validation purposes.
The text was updated successfully, but these errors were encountered: