// 6 The element information item must be valid with respect to each of the {identity-constraint definitions} as per Identity-constraint Satisfied (3.11.4).
// call matchers and de-activate context
int oldCount = fMatcherStack.getMatcherCount();
for (int i = oldCount - 1; i >= 0; i--) {
XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
if (fCurrentElemDecl == null) {
matcher.endElement(element, fCurrentType, false, fValidatedInfo.actualValue, fValidatedInfo.actualValueType, fValidatedInfo.itemValueTypes);
}
else {
matcher.endElement(
element,
fCurrentType,
fCurrentElemDecl.getNillable(),
fDefaultValue == null
? fValidatedInfo.actualValue
: fCurrentElemDecl.fDefault.actualValue,
fDefaultValue == null
? fValidatedInfo.actualValueType
: fCurrentElemDecl.fDefault.actualValueType,
fDefaultValue == null
? fValidatedInfo.itemValueTypes
: fCurrentElemDecl.fDefault.itemValueTypes);
}
}
if (fMatcherStack.size() > 0) {
fMatcherStack.popContext();
}
int newCount = fMatcherStack.getMatcherCount();
// handle everything *but* keyref's.
for (int i = oldCount - 1; i >= newCount; i--) {
XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
if (matcher instanceof Selector.Matcher) {
Selector.Matcher selMatcher = (Selector.Matcher) matcher;
IdentityConstraint id;
if ((id = selMatcher.getIdentityConstraint()) != null
&& id.getCategory() != IdentityConstraint.IC_KEYREF) {
fValueStoreCache.transplant(id, selMatcher.getInitialDepth());
}
}
}
// now handle keyref's/...
for (int i = oldCount - 1; i >= newCount; i--) {
XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
if (matcher instanceof Selector.Matcher) {
Selector.Matcher selMatcher = (Selector.Matcher) matcher;
IdentityConstraint id;
if ((id = selMatcher.getIdentityConstraint()) != null
&& id.getCategory() == IdentityConstraint.IC_KEYREF) {