// complex type with complex content
// $value should be, the XPath2 "empty sequence" ... TO DO
}
XSObjectList assertList = (XSObjectList) assertions;
for (int i = 0; i < assertList.size(); i++) {
XSAssertImpl assertImpl = (XSAssertImpl) assertList.get(i);
boolean xpathContextExists = false;
if (assertImpl.getType() == XSConstants.ASSERTION) {
// not an assertion facet
xpathContextExists = true;
}
// check if this is an assertion, from the attribute
if (assertImpl.getAttrValue() != null) {
// reassign value (the attribute's value) to variable
// $value.
value = assertImpl.getAttrValue();
setValueOf$value(value, assertImpl.getTypeDefinition());
}
evaluateAssertion(element,
assertImpl,
value,
xpathContextExists);
}
}
else if (assertions instanceof Vector) {
// assertions from a simple type definition
setValueOf$value(value, null);
Vector assertList = (Vector) assertions;
for (int i = 0; i < assertList.size(); i++) {
XSAssertImpl assertImpl = (XSAssertImpl) assertList.get(i);
evaluateAssertion(element, assertImpl, value, false);
}
}
}