<div>Hello, </div>
<div> </div>
<div>I'm trying to validate the belowd XML enveloping/envoped signature at <a href="http://www.aleksey.com/xmlsec/xmldsig-verifier.html">http://www.aleksey.com/xmlsec/xmldsig-verifier.html</a> but I'm getting an xpointer-related error</div>

<div>The error received is :</div>
<div><pre>func=xmlSecXPathDataExecute:file=xpath.c:line=273:obj=unknown:subj=xmlXPtrEval:error=5:libxml2 library function failed:expr=xpointer(id('RemesaMensajeLigeroFirmaGlobal'))
func=xmlSecXPathDataListExecute:file=xpath.c:line=356:obj=unknown:subj=xmlSecXPathDataExecute:error=1:xmlsec library function failed: 
func=xmlSecTransformXPathExecute:file=xpath.c:line=466:obj=xpointer:subj=xmlSecXPathDataExecute:error=1:xmlsec library function failed: 
func=xmlSecTransformDefaultPushXml:file=transforms.c:line=2371:obj=xpointer:subj=xmlSecTransformExecute:error=1:xmlsec library function failed: 
func=xmlSecTransformCtxXmlExecute:file=transforms.c:line=1207:obj=unknown:subj=xmlSecTransformPushXml:error=1:xmlsec library function failed:transform=xpointer
func=xmlSecTransformCtxExecute:file=transforms.c:line=1267:obj=unknown:subj=xmlSecTransformCtxXmlExecute:error=1:xmlsec library function failed: 
func=xmlSecDSigReferenceCtxProcessNode:file=xmldsig.c:line=1568:obj=unknown:subj=xmlSecTransformCtxExecute:error=1:xmlsec library function failed: 
func=xmlSecDSigCtxProcessSignedInfoNode:file=xmldsig.c:line=804:obj=unknown:subj=xmlSecDSigReferenceCtxProcessNode:error=1:xmlsec library function failed:node=Reference
func=xmlSecDSigCtxProcessSignatureNode:file=xmldsig.c:line=547:obj=unknown:subj=xmlSecDSigCtxProcessSignedInfoNode:error=1:xmlsec library function failed: 
func=xmlSecDSigCtxVerify:file=xmldsig.c:line=366:obj=unknown:subj=xmlSecDSigCtxSigantureProcessNode:error=1:xmlsec library function failed: 
Error: signature verification failed
</pre><pre><div>the XML:</div><div> </div><div> ?xml version="1.0" encoding="UTF-8" ?> <br><ape:RemesaMensajeLigeroFirmaGlobal xmlns:ape="urn:correos:ape:1.0" xmlns:ds="<a href="http://www.w3.org/2000/09/xmldsig">http://www.w3.org/2000/09/xmldsig</a>#" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>" Id="RemesaMensajeLigeroFirmaGlobal" ape:idRef="20100429132756490000"><br>
<ape:Mensaje ape:idUnico="0959000001180" tipo="NOTIFICACION"><br><ape:Emisor>Q2826000H</ape:Emisor> <br><ape:Buzon>05113189J</ape:Buzon> <br><ape:Notificado obligado="true">05113189J</ape:Notificado> <br>
<ape:Autorizado nif="A78999273" /> <br><ape:ActoNotificado>AEATPI20040504GECOEX</ape:ActoNotificado> <br><ape:Asunto>MODIF.IMPORTE CREDITOS Nº020923300221Y</ape:Asunto> <br><ape:Contenido><br>
<ape:HuellaDigital algoritmo="SHA-1">9335d792cef1a2de3a61e6728188c3bc43a431fa</ape:HuellaDigital> <br></ape:Contenido><br></ape:Mensaje><br><Signature xmlns="<a href="http://www.w3.org/2000/09/xmldsig">http://www.w3.org/2000/09/xmldsig</a>#" Id="Firma"><br>
<SignedInfo><br><CanonicalizationMethod Algorithm="<a href="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments">http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments</a>" /> <br><SignatureMethod Algorithm="<a href="http://www.w3.org/2000/09/xmldsig#rsa-sha1">http://www.w3.org/2000/09/xmldsig#rsa-sha1</a>" /> <br>
<Reference URI="#RemesaMensajeLigeroFirmaGlobal"><br><Transforms><br><Transform Algorithm="<a href="http://www.w3.org/2000/09/xmldsig#enveloped-signature">http://www.w3.org/2000/09/xmldsig#enveloped-signature</a>" /> <br>
</Transforms><br><DigestMethod Algorithm="<a href="http://www.w3.org/2000/09/xmldsig#sha1">http://www.w3.org/2000/09/xmldsig#sha1</a>" /> <br><DigestValue>kOK2dhpXe/Qywad8hvAiFQiondo=</DigestValue> <br>
</Reference><br><Reference URI="#CertificadoFirmante"><br><DigestMethod Algorithm="<a href="http://www.w3.org/2000/09/xmldsig#sha1">http://www.w3.org/2000/09/xmldsig#sha1</a>" /> <br>
<DigestValue>/Q5DR3ceJgc+1NK2LI3MP3YTrtM=</DigestValue> <br></Reference><br><Reference URI="#SignedProperties"><br><DigestMethod Algorithm="<a href="http://www.w3.org/2000/09/xmldsig#sha1">http://www.w3.org/2000/09/xmldsig#sha1</a>" /> <br>
<DigestValue>EgQYPNGKuwTnzsjVS/AVgUYSEd4=</DigestValue> <br></Reference><br></SignedInfo><br><SignatureValue>AGsgkJ+UC73pekxf/13B6UI4otHKQV5PNXMEkxVb0grhdm9ozffnFok0988AB/I/6AbE0MNhrTbU H5FIt12mGo8uwt2KGo0YJnJfDlNH9+I3MB1flskQMcYOnJg2T/haWTB5u3FjdM22Q7UZsrJ2ri5C y2NNao6c5RJlJU3WVUk=</SignatureValue> <br>
<KeyInfo Id="CertificadoFirmante"><br><X509Data><br><X509Certificate>MIIFHjCCBIegAwIBAgIEPLueRTANBgkqhkiG9w0BAQUFADA2MQswCQYDVQQGEwJFUzENMAsGA1UE ChMERk5NVDEYMBYGA1UECxMPRk5NVCBDbGFzZSAyIENBMB4XDTEwMDQxMjE4MDcyOFoXDTEzMDQx MjE4MDcyOFowgYAxCzAJBgNVBAYTAkVTMQ0wCwYDVQQKEwRGTk1UMRgwFgYDVQQLEw9GTk1UIENs YXNlIDIgQ0ExEjAQBgNVBAsTCTUwMDA1MzA3NTE0MDIGA1UEAxQrTk9NQlJFIEVTUEHxT0wgRVNQ QfFPTCBKVUFOIC0gTklGIDk5OTk5OTk5UjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAtodl IWnO/HEJig91PQBPy7F9WI/X6q4EeCipS+ZnMzlhiOzY8V5bUOCxr+JlULtOVlwhAMw/CLImyMfx vCV1ECkXOCFkgUFssTBl9MqU9zSvZnIrZ1pkApsVpTWcQAhBt8m6mEiLKkwojPKosv64f7PWVtFz 8EdRQLhLwUvXoisCAwEAAaOCAuw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RzwRa5K0PGMt0MtEyKacwdqy6bKMP28hz2qCwRTGeBhG9+rnwjkiZlXSMBnIb3x8Gb VKX9Mehr4xPpHI4wIp0cNiG01ZILqAGk1GKCTbE/4FnZZzTMKSnFtBp3ZzpXkzTiwrrf615G7JwG O6vu</X509Certificate> <br>
</X509Data><br></KeyInfo><br><Object><br><etsi:QualifyingProperties xmlns:etsi="<a href="http://uri.etsi.org/01903/v1.2.2">http://uri.etsi.org/01903/v1.2.2</a>#" Target="#Firma" xmlns:ds="<a href="http://www.w3.org/2000/09/xmldsig">http://www.w3.org/2000/09/xmldsig</a>#"><br>
<etsi:SignedProperties Id="SignedProperties"><br><etsi:SignedSignatureProperties><br><etsi:SigningTime>2010-04-29T13:27:58+01:00</etsi:SigningTime> <br><etsi:SignaturePolicyIdentifier><br>
<etsi:SignaturePolicyId><br><etsi:SigPolicyId><br><etsi:Identifier><a href="http://www.aeat.es/firma/SignaturePolicyV1.pdf">http://www.aeat.es/firma/SignaturePolicyV1.pdf</a></etsi:Identifier> <br>
</etsi:SigPolicyId><br><etsi:SigPolicyHash><br><ds:DigestMethod Algorithm="<a href="http://www.w3.org/2000/09/xmldsig#sha1">http://www.w3.org/2000/09/xmldsig#sha1</a>" /> <br><ds:DigestValue>Dmi29y1d6Np/ARK0xKGu/CyA4ZU=</ds:DigestValue> <br>
</etsi:SigPolicyHash><br></etsi:SignaturePolicyId><br></etsi:SignaturePolicyIdentifier><br></etsi:SignedSignatureProperties><br><etsi:SignedDataObjectProperties><br><etsi:DataObjectFormat ObjectReference="#RemesaMensajeLigeroFirmaGlobal"><br>
<etsi:Description>descripcion</etsi:Description> <br><etsi:MimeType>mime</etsi:MimeType> <br><etsi:Encoding>ulyimo</etsi:Encoding> <br></etsi:DataObjectFormat><br></etsi:SignedDataObjectProperties><br>
</etsi:SignedProperties><br></etsi:QualifyingProperties><br></Object><br></Signature><br></ape:RemesaMensajeLigeroFirmaGlobal></div></pre></div>
<div>What we understand from the error message is that there's a problem when resolving the first URI Reference. Is it mandatory that the Reference element that contains the enveloped transformation  declared its URI attribute as "" ?</div>

<div>As fas as I know there shouldn't be any problem in including a URI value within the Reference element that contains the enveloped transform, isn't it?</div>
<div> </div>