Code example for Attr

Methods: getNodeValuegetOwnerDocument

0
 
public class ResolverOwnerDocumentUserData extends ResourceResolverSpi { 
	@Override 
	public XMLSignatureInput engineResolve(Attr uri, String baseURI)
			throws ResourceResolverException { 
		byte[] x = (byte[]) uri.getOwnerDocument().getUserData(uri.getNodeValue());
		return new XMLSignatureInput(x);
	} 
 
	@Override 
	public boolean engineCanResolve(Attr uri, String baseURI) {
		if (uri == null) {
            return false; 
        } 
 
        String uriNodeValue = uri.getNodeValue();
 
        if (uriNodeValue.equals("") || (uriNodeValue.charAt(0)=='#') ||
            uriNodeValue.startsWith("http:")) {
            return false;