XSObjectList assertList = (XSObjectList) assertions;
XSObjectList attrMemberTypes = null;
final int assertListSize = assertList.size();
for (int i = 0; i < assertListSize; 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 an attribute
if (assertImpl.getAttrName() != null) {
value = assertImpl.getAttrValue();
XSSimpleTypeDefinition attrType = (XSSimpleTypeDefinition) assertImpl.getTypeDefinition();
attrMemberTypes = attrType.getMemberTypes();
if (assertImpl.getVariety() == XSSimpleTypeDefinition.VARIETY_LIST) {
// this assertion belongs to a type, that is an item type of a "simpleType -> list".
// tokenize the list value by the longest sequence of white-spaces.
StringTokenizer values = new StringTokenizer(value, " \n\t\r");
// evaluate assertion on all of list items
while (values.hasMoreTokens()) {
String itemValue = values.nextToken();
setValueOf$valueForAListItem(attrType, itemValue);
AssertionError assertError = evaluateAssertion(element, assertImpl, itemValue,
xpathContextExists, true);
if (assertError != null) {
reportAssertionsError(assertError);
}
}
}
else if (assertImpl.getVariety() == XSSimpleTypeDefinition.VARIETY_ATOMIC) {
// evaluating assertions for "simpleType -> restriction"
setTypedValueFor$value(value, null, attrType);
AssertionError assertError = evaluateAssertion(element, assertImpl, value,
xpathContextExists, false);
if (assertError != null) {