Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hit this validating a document whose element is typed by a union and carries an xsi:type naming one of the union members, against a schema with
block='extension'on that element.for (SchemaType t = xsiType; !t.equals(elementType); t = t.getBaseType()). Each one assumes the declared element type sits somewhere on that chain.isAssignableFrom, which gates all three, does not promise that. Its union branch accepts a type derived from a member type, which is clause 2.2.4 of Type Derivation OK (Simple), and a union is not on its own members' base chain.fillInTypesetsbase = nullfor BTC_ANY_TYPE, the next step is null, andequalsthrows.block='restriction'or'#all'the loop body reports cvc-elt.4.3d on the first iteration. That is why only the extension-only case falls off the end.Bounded all three walks with
t != null, so an exhausted chain ends the loop the way it already does when no blocking derivation step is found. Chains that do contain the declared type, the blocked complex extension among them, behave as before.Test covers the element-level block, the same substitution under a complex type with union simple content (that one dereferences null in the first loop instead of the third), and a blocked complex extension that must still be reported.