<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div style="line-height: 21.3px; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);">Hello Aleksey,</div><div style="line-height: 21.3px; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><br style="line-height: 21.3px;"></div><div style="line-height: 21.3px; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);">Before anything else... Thank you so much for spend your time with my question.</div><div style="line-height: 21.3px; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);">About you answer, I couldn't understand.</div><div style="line-height: 21.3px; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><br style="line-height: 21.3px;"></div><div style="line-height: 21.3px; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);">I already sign the URI 1332 (InfRps Node ).</div><div style="line-height: 21.3px; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);">Now I need to sign URI 133 (LoteRps Node ).</div><div style="line-height: 21.3px; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><br style="line-height: 21.3px;"></div><div style="line-height: 21.3px; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);">I realize that if I try to sign the LoteRps Node without the Signature TAGS of URI 1332 (already signed), the signature process occurs without problem. But that don't solve my problem. What I need is first to sign the InfRps Node and after the LoteRps node.</div><div style="line-height: 21.3px; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><br style="line-height: 21.3px;"></div><div style="line-height: 21.3px; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);">Thank you in advance, again, any other hint.</div><div style="line-height: 21.3px; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><br style="line-height: 21.3px;"></div><div style="line-height: 21.3px; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);">Joao Henrique</div><br><div>> Subject: Re: [xmlsec] Error xpointer(id('XXXXXXX')) again<br>> To: juaumkiko@msn.com; xmlsec@aleksey.com<br>> From: aleksey@aleksey.com<br>> Date: Mon, 14 Sep 2015 13:36:33 -0700<br>> <br>> <Reference URI="#1332"><br>> <br>> <InfRps Id="1332"><br>> <br>> <!ATTLIST LoteRps Id ID #IMPLIED><br>> <br>> Aleksey<br>> <br>> On 9/14/15 12:57 PM, Joćo Henrique Souza wrote:<br>> > Hello,<br>> > I've trying to sign a XML which already has a signed node.<br>> > I've already read the Faq Section and the other emails with the same<br>> > subject, but this unfortunatelly didn't solve my problem.<br>> > <br>> > The XML (node LoteRps) which I've been trying to sign is this (I'm a<br>> > Brazilian, so the XML is in my home language):<br>> > <br>> > <!DOCTYPE test [<!ATTLIST LoteRps Id ID #IMPLIED>]><br>> > <GerarNfseEnvio xmlns="http://www.abrasf.org.br/nfse.xsd"><br>> > <LoteRps Id="133" versao="1.00"><br>> > <NumeroLote>133</NumeroLote><br>> > <Cnpj>04220031000100</Cnpj><br>> > <InscricaoMunicipal>25252525</InscricaoMunicipal><br>> > <QuantidadeRps>1</QuantidadeRps><br>> > <ListaRps><br>> > <Rps><br>> > <InfRps Id="1332"><br>> > <IdentificacaoRps><br>> > <Numero>133</Numero><br>> > <Serie>2</Serie><br>> > <Tipo>1</Tipo><br>> > </IdentificacaoRps><br>> > <DataEmissao>2015-09-11T00:00:00</DataEmissao><br>> > <NaturezaOperacao>1</NaturezaOperacao><br>> > <RegimeEspecialTributacao>2</RegimeEspecialTributacao><br>> > <OptanteSimplesNacional>2</OptanteSimplesNacional><br>> > <IncentivadorCultural>2</IncentivadorCultural><br>> > <Status>1</Status><br>> > <Servico><br>> > <Valores><br>> > <ValorServicos>35.00</ValorServicos><br>> > <IssRetido>2</IssRetido><br>> > <ValorIss>1.75</ValorIss><br>> > <BaseCalculo>35.00</BaseCalculo><br>> > <Aliquota>5.0000</Aliquota><br>> > <ValorLiquidoNfse>35.00</ValorLiquidoNfse><br>> > </Valores><br>> > <ItemListaServico>11.01</ItemListaServico><br>> > <CodigoCnae>5210</CodigoCnae><br>> > <br>> > <CodigoTributacaoMunicipio>11010011</CodigoTributacaoMunicipio><br>> > <Discriminacao>ROTATIVS</Discriminacao><br>> > <CodigoMunicipio>4314902</CodigoMunicipio><br>> > </Servico><br>> > <Prestador><br>> > <Cnpj>04220031000100</Cnpj><br>> > <InscricaoMunicipal>25252525</InscricaoMunicipal><br>> > </Prestador><br>> > <Tomador><br>> > <RazaoSocial>NAO INFORMADO</RazaoSocial><br>> > <Endereco><br>> > <Endereco>-</Endereco><br>> > <Numero>-</Numero><br>> > <Bairro>-</Bairro><br>> > <CodigoMunicipio>4314902</CodigoMunicipio><br>> > <Uf>RS</Uf><br>> > <Cep>0</Cep><br>> > </Endereco><br>> > </Tomador><br>> > </InfRps><br>> > <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"<br>> > Id="Ass_1332"><br>> > <SignedInfo><br>> > <CanonicalizationMethod<br>> > Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><br>> > <SignatureMethod<br>> > Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><br>> > <Reference URI="#1332"><br>> > <Transforms><br>> > <Transform<br>> > Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><br>> > <Transform<br>> > Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><br>> > </Transforms><br>> > <DigestMethod<br>> > Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><br>> > <DigestValue>QRTdVOZ2MdM5iTlIpHA13EHtMOQ=</DigestValue><br>> > </Reference><br>> > </SignedInfo><br>> > <br>> > <SignatureValue>K3YMZ97ZUyaH/LpQI+gUULMc+NB9a+rHoSFZL78OoKLn+fs4l1jqjMsEHXoDuXJE9xcdpaYtuXp9mdPT8u5jwU8wuHSe6am5N9b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> </ListaRps><br>> > </LoteRps><br>> > <Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="AssLote_133"><br>> > <SignedInfo><br>> > <CanonicalizationMethod<br>> > Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /><br>> > <SignatureMethod<br>> > Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><br>> > <Reference URI="#133"><br>> > <Transforms><br>> > <Transform<br>> > Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><br>> > <Transform<br>> > Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /><br>> > </Transforms><br>> > <DigestMethod<br>> > Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><br>> > <DigestValue></DigestValue><br>> > </Reference><br>> > </SignedInfo><br>> > <SignatureValue></SignatureValue><br>> > <KeyInfo><br>> > <X509Data><br>> > <X509Certificate></X509Certificate><br>> > </X509Data><br>> > </KeyInfo><br>> > </Signature><br>> > </GerarNfseEnvio><br>> > <br>> > <br>> > The error message that I receive is this:<br>> > <br>> > func=xmlSecXPathDataExecute:file=..\src\xpath.c:line=273:obj=unknown:subj=xmlXPtrEval:error=5:libxml2<br>> > library function failed:expr=xpointer(id('1332'))<br>> > func=xmlSecXPathDataListExecute:file=..\src\xpath.c:line=356:obj=unknown:subj=xmlSecXPathDataExecute:error=1:xmlsec<br>> > library function failed:<br>> > func=xmlSecTransformXPathExecute:file=..\src\xpath.c:line=466:obj=xpointer:subj=xmlSecXPathDataExecute:error=1:xmlsec<br>> > library function failed:<br>> > func=xmlSecTransformDefaultPushXml:file=..\src\transforms.c:line=2371:obj=xpointer:subj=xmlSecTransformExecute:error=1:xmlsec<br>> > library function failed:<br>> > func=xmlSecTransformCtxXmlExecute:file=..\src\transforms.c:line=1207:obj=unknown:subj=xmlSecTransformPushXml:error=1:xmlsec<br>> > library function failed:transform=xpointer<br>> > func=xmlSecTransformCtxExecute:file=..\src\transforms.c:line=1267:obj=unknown:subj=xmlSecTransformCtxXmlExecute:error=1:xmlsec<br>> > library function failed:<br>> > func=xmlSecDSigReferenceCtxProcessNode:file=..\src\xmldsig.c:line=1568:obj=unknown:subj=xmlSecTransformCtxExecute:error=1:xmlsec<br>> > library function failed:<br>> > func=xmlSecDSigCtxProcessSignedInfoNode:file=..\src\xmldsig.c:line=804:obj=unknown:subj=xmlSecDSigReferenceCtxProcessNode:error=1:xmlsec<br>> > library function failed:node=Reference<br>> > func=xmlSecDSigCtxProcessSignatureNode:file=..\src\xmldsig.c:line=547:obj=unknown:subj=xmlSecDSigCtxProcessSignedInfoNode:error=1:xmlsec<br>> > library function failed:<br>> > func=xmlSecDSigCtxSign:file=..\src\xmldsig.c:line=303:obj=unknown:subj=xmlSecDSigCtxSigantureProcessNode:error=1:xmlsec<br>> > library function failed:<br>> > Error: signature failed<br>> > <br>> > Thanks in advance for any help<br>> > <br>> > Joao Henrique<br>> > <br>> > <br>> > _______________________________________________<br>> > xmlsec mailing list<br>> > xmlsec@aleksey.com<br>> > http://www.aleksey.com/mailman/listinfo/xmlsec<br>> > <br></div> </div></body>
</html>