Index: org/exolab/castor/xml/UnmarshalHandler.java =================================================================== --- org/exolab/castor/xml/UnmarshalHandler.java (Revision 7055) +++ org/exolab/castor/xml/UnmarshalHandler.java (Arbeitskopie) @@ -875,7 +875,7 @@ ValidationException last = null; //-- check unresolved references - if (_resolveTable != null) { + if (_resolveTable != null && !_config.getLenientIdValidation()) { Enumeration enumeration = _resolveTable.keys(); while (enumeration.hasMoreElements()) { Object ref = enumeration.nextElement(); Index: org/exolab/castor/xml/FieldValidator.java =================================================================== --- org/exolab/castor/xml/FieldValidator.java (Revision 7055) +++ org/exolab/castor/xml/FieldValidator.java (Arbeitskopie) @@ -193,6 +193,13 @@ if (!_descriptor.isRequired() || _descriptor.isNillable()) { return; } + // deal with lenient id/idref validation accordingly, skipping exception handling + // in this case + if (_descriptor.isRequired() + && _descriptor.getSchemaType().equals("IDREF") + && context.getConfiguration().getLenientIdValidation()) { + return; + } StringBuffer buff = new StringBuffer(); buff.append("The field '" + _descriptor.getFieldName() + "' "); if (!ERROR_NAME.equals(_descriptor.getXMLName())) {