pjfanning opened a new pull request, #143:
URL: https://github.com/apache/poi-xmlbeans/pull/143

   Follow-up to #141.
   
   `Validator` passes a defaulted or fixed attribute to the identity constraint 
engine as its default *text*. Since #141, a QName value is built with the 
instance's in-scope namespaces. But the prefix in a schema default was declared 
in the schema, so the value either fails to resolve (prefix unbound in the 
instance: the field is left unfilled) or resolves to the wrong namespace 
(prefix rebound in the instance: false duplicates or missed keyref matches).
   
   `IdentityConstraint.defaultAttr` now takes the `SchemaLocalAttribute`. 
`FieldState` uses `getDefaultValue()`, which resolves against the schema, and 
calls it only when a field XPath matches. The ID/IDREF states keep using the 
default text, which carries no prefixes.
   
   `QNameIdentityConstraintValidateTest` now runs every case through both 
`XmlObject.validate()` and `ValidatingXMLStreamReader`, and adds:
   - an element-text field (`xs:field xpath='t:v'`), covering the `text()` path 
from #141
   - a default-namespace QName matching a prefixed one, plus an unprefixed 
QName with no default namespace staying distinct
   - defaulted QNames whose schema prefix is unbound in the instance, or bound 
to a different namespace there
   - an exact error count for the dangling keyref case
   
   Without the main change, the 4 defaulted-QName cases fail. `./gradlew test` 
passes (3242 tests).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to