// 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) {
ValueStoreBase values =
fValueStoreCache.getValueStoreFor(id, selMatcher.getInitialDepth());
if (values != null) // nothing to do if nothing matched!
values.endDocumentFragment();
}