aizu-m commented on PR #171:
URL: https://github.com/apache/poi-xmlbeans/pull/171#issuecomment-7059133014
Both done.
**1.** Confirmed. With the comparison fixed but the lexical check left in,
`<t:qn xmlns:t='urn:t' xmlns:z='urn:p'>z:foo</t:qn>` still failed on "can't
resolve prefix 'p'", and the spare `xmlns:p` on the old test was indeed hiding
it. The check now only guards the reparsing fallback:
```java
if (def == null && !validateSimpleType(type, fixedValue, event)) {
return null;
}
```
`getDefaultValue()` gets its own catch, because the particle path that has
no cooked value reparses `_defaultText` itself and can throw the same
`XmlValueOutOfRangeException` for a QName. The undeclared `p` case is in
`fixedQNameComparedByValueNotPrefix` now, for the element and the attribute.
**2.** Added `fixedQNameComparedAcrossXsiType`: a `t:qname` restriction of
`xs:QName` selected through `xsi:type`, so `val` is built from the derived type
while `def` keeps the field's declared `xs:QName`. It matches on value and
still reports `z:bar`, so `valueEquals` is comparing by primitive type as you
thought.
Both new cases fail on the previous commit. `./gradlew test` is green, 3334
tests.
--
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]