protected void handleContent(XSTypeDefinition type, boolean nillable, Object actualValue, short valueType, ShortList itemValueType) { if (type == null || type.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE && ((XSComplexTypeDefinition) type).getContentType() != XSComplexTypeDefinition.CONTENTTYPE_SIMPLE) { // the content must be simpleType content fStore.reportError( "cvc-id.3", new Object[] { fIdentityConstraint.getName(), fStore.getElementName()}); } fMatchedString = actualValue; matched(fMatchedString, valueType, itemValueType, nillable); } // handleContent(XSElementDecl, String)
/** * This method is called when the XPath handler matches the * XPath expression. */ protected void matched(Object actualValue, short valueType, ShortList itemValueType, boolean isNil) { super.matched(actualValue, valueType, itemValueType, isNil); if(isNil && (fIdentityConstraint.getCategory() == IdentityConstraint.IC_KEY)) { String code = "KeyMatchesNillable"; fStore.reportError(code, new Object[]{fStore.getElementName(), fIdentityConstraint.getIdentityConstraintName()}); } fStore.addValue(Field.this, fMayMatch, actualValue, convertToPrimitiveKind(valueType), convertToPrimitiveKind(itemValueType)); // once we've stored the value for this field, we set the mayMatch // member to false so that in the same scope, we don't match any more // values (and throw an error instead). fMayMatch = false; } // matched(String)