private void validateReference(Element referentElement) throws XMLSecurityException {
  if (!XMLUtils.elementIsInSignatureSpace(referentElement,Constants._TAG_KEYINFO)) {
    Object exArgs[]={new QName(referentElement.getNamespaceURI(),referentElement.getLocalName())};
    throw new XMLSecurityException("KeyInfoReferenceResolver.InvalidReferentElement.WrongType",exArgs);
  }
  KeyInfo referent=new KeyInfo(referentElement,"");
  if (referent.containsKeyInfoReference()) {
    if (secureValidation) {
      throw new XMLSecurityException("KeyInfoReferenceResolver.InvalidReferentElement.ReferenceWithSecure");
    }
 else {
      throw new XMLSecurityException("KeyInfoReferenceResolver.InvalidReferentElement.ReferenceWithoutSecure");
    }
  }
}

private void validateReference ( Element referentElement ) throws XMLSecurityException { if ( ! XMLUtils . elementIsInSignatureSpace ( referentElement , Constants . _TAG_KEYINFO ) ) { Object exArgs [ ] = { new QName ( referentElement . getNamespaceURI ( ) , referentElement . getLocalName ( ) ) } ; throw new XMLSecurityException ( "KeyInfoReferenceResolver.InvalidReferentElement.WrongType" , exArgs ) ; } KeyInfo referent = new KeyInfo ( referentElement , "" ) ; if ( referent . containsKeyInfoReference ( ) ) { if ( secureValidation ) { throw new XMLSecurityException ( "KeyInfoReferenceResolver.InvalidReferentElement.ReferenceWithSecure" ) ; } else { throw new XMLSecurityException ( "KeyInfoReferenceResolver.InvalidReferentElement.ReferenceWithoutSecure" ) ; } } }
validate the element referred to by the keyinforeference .
