2017-10-28 7 views
0

「dsig-xpath:XPath」ではなく「XPath」を取得するには?'XPath'ではなく 'dsig-xpath:XPath'ですか?

 <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="SigFrs"> 
<ds:SignedInfo> 
    <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> 
    <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/> 
    <s:Reference Id="signatureId" URI=""> 
    <ds:Transforms> 
     <ds:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2"> 
     <dsig-xpath:XPath xmlns:dsig-xpath="http://www.w3.org/2002/06/xmldsig-filter2" Filter="intersect">/Root/Element1</XPath> 
     <dsig-xpath:XPath xmlns:dsig-xpath="http://www.w3.org/2002/06/xmldsig-filter2" Filter="intersect">/Root/Element2</XPath> 
     </ds:Transform> 
    </ds:Transforms> 
    <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/> 
    <ds:DigestValue>6D+1WZjC....vGidMqCX5uCL1rw=</ds:DigestValue> 
    </ds:Reference> 
</ds:SignedInfo> 

このように取得する:

<ds:Transforms> 
     <ds:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2"> 
     <XPath xmlns="http://www.w3.org/2002/06/xmldsig-filter2" Filter="intersect">/Root/Element1</XPath> 
     <XPath xmlns="http://www.w3.org/2002/06/xmldsig-filter2" Filter="intersect">/Root/Element2</XPath> 
     </ds:Transform> 
    </ds:Transforms> 

これは私が輸入の.jar(xmlsec-2.1.0.jar)のように見えるかもしれませんか?

答えて

0

空の文字列にプレフィックスを割り当てます

ElementProxy.setDefaultPrefix("http://www.w3.org/2002/06/xmldsig-filter2", "") 
関連する問題