aizu-m opened a new pull request, #140:
URL: https://github.com/apache/poi-xmlbeans/pull/140
ValidatingXMLStreamReader packs adjacent CHARACTERS/CDATA/SPACE events into
one TEXT event for the Validator and skips a COMMENT in between, but a
PROCESSING_INSTRUCTION ends the buffer. The Validator only checks the first
TEXT event of a simple-content element (`_sawText`), so with a pi inside the
value only the first chunk is validated against the type:
schema: <xs:restriction base='xs:int'><xs:maxInclusive
value='9'/></xs:restriction>
<count>5<!--c-->5</count> stream reader: cvc-maxInclusive-valid (55 >
9)
<count>5<?pi x?>5</count> stream reader: valid
<count>5<?pi x?>5</count> XmlObject.validate(): cvc-maxInclusive-valid
(55 > 9)
Any facet (length, pattern, enumeration, bounds) is applied to a prefix of
the real value and the rest is accepted unchecked. Store-side validation
(impl.store.Validate) skips COMMENT and PROCINST alike and sees the whole
value; this makes the stream wrapper do the same. Reproduced with the JDK
XMLInputFactory reader, which reports the pi as its own event. Regression test
added to ValidatingXMLStreamReaderTests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]