You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "aizu-m (via GitHub)" <gi...@apache.org> on 2026/10/19 07:14:30 UTC
[PR] join text split by a pi in ValidatingXMLStreamReader.bufferText [poi-xmlbeans]
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: dev-unsubscribe@poi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: [PR] join text split by a pi in ValidatingXMLStreamReader.bufferText [poi-xmlbeans]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning merged PR #140:
URL: https://github.com/apache/poi-xmlbeans/pull/140
--
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: dev-unsubscribe@poi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: [PR] join text split by a pi in ValidatingXMLStreamReader.bufferText [poi-xmlbeans]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #140:
URL: https://github.com/apache/poi-xmlbeans/pull/140#issuecomment-6263855664
merged with an additional test
--
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: dev-unsubscribe@poi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org