private Element obtainReferenceElement(XMLSignatureInput resource) throws CanonicalizationException, ParserConfigurationException, IOException, SAXException, KeyResolverException {
  Element e;
  if (resource.isElement()) {
    e=(Element)resource.getSubNode();
  }
 else   if (resource.isNodeSet()) {
    log.log(java.util.logging.Level.FINE,"De-reference of KeyInfoReference returned an unsupported NodeSet");
    return null;
  }
 else {
    byte inputBytes[]=resource.getBytes();
    e=getDocFromBytes(inputBytes);
  }
  return e;
}

private Element obtainReferenceElement ( XMLSignatureInput resource ) throws CanonicalizationException , ParserConfigurationException , IOException , SAXException , KeyResolverException { Element e ; if ( resource . isElement ( ) ) { e = ( Element ) resource . getSubNode ( ) ; } else if ( resource . isNodeSet ( ) ) { log . log ( java . util . logging . Level . FINE , "De-reference of KeyInfoReference returned an unsupported NodeSet" ) ; return null ; } else { byte inputBytes [ ] = resource . getBytes ( ) ; e = getDocFromBytes ( inputBytes ) ; } return e ; }
resolve the element effectively represented by the xml signature input source .
