protected CmsXmlContentErrorHandler validateValue(
        CmsObject cms,
        I_CmsXmlContentValue value,
        String valueStr,
        CmsXmlContentErrorHandler errorHandler,
        boolean isWarning) {

        if (isWarning) {
            // default schema validation only applies to errors
            return errorHandler;
        }

        String message = null;
        if (value instanceof I_CmsXmlValidateWithMessage) {
            CmsMessageContainer messageContainer = ((I_CmsXmlValidateWithMessage)value).validateWithMessage(valueStr);
            if (null != messageContainer) {
                message = messageContainer.key(OpenCms.getWorkplaceManager().getWorkplaceLocale(cms));
            }
        } else {
            if (!value.validateValue(valueStr)) {
                // value is not valid, add an error to the handler
                message = getValidationMessage(cms, value, value.getTypeName(), valueStr, true, false);
            }
        }
        if (null != message) {
            errorHandler.addError(value, message);
        }

        return errorHandler;
    }
protected CmsXmlContentErrorHandler validateValue ( CmsObject cms , I_CmsXmlContentValue value , String valueStr , CmsXmlContentErrorHandler errorHandler , boolean isWarning ) { if ( isWarning ) { return errorHandler ; } String message = null ; if ( value instanceof I_CmsXmlValidateWithMessage ) { CmsMessageContainer messageContainer = ( ( I_CmsXmlValidateWithMessage ) value ) . validateWithMessage ( valueStr ) ; if ( null != messageContainer ) { message = messageContainer . key ( OpenCms . getWorkplaceManager ( ) . getWorkplaceLocale ( cms ) ) ; } } else { if ( ! value . validateValue ( valueStr ) ) { message = getValidationMessage ( cms , value , value . getTypeName ( ) , valueStr , true , false ) ; } } if ( null != message ) { errorHandler . addError ( value , message ) ; } return errorHandler ; }
Checks the default XML schema validation rules.<p>

These rules should only be tested if this is not a test for warnings.<p>

@param cms the current users OpenCms context
@param value the value to validate
@param valueStr the string value of the given value
@param errorHandler the error handler to use in case errors or warnings are detected
@param isWarning if true, this validation should be stored as a warning, otherwise as an error

@return the updated error handler