【问题标题】:add xpath transformation to root document将 xpath 转换添加到根文档
【发布时间】:2012-09-11 13:31:16
【问题描述】:

在 xades4j 中,如果有多个信封签名,我的签名文档最后会包含更多 Signature 元素,但我需要告诉每个对签名文档的引用 (URI=" ") 他不能引用代表其他签名的其他 Signature 元素,我需要添加这个转换

<ds:Reference URI="">
    <ds:Transforms>
        <ds:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2">
            <dsig-xpath:XPath Filter="subtract">/descendant::ds:Signature</dsig-xpath:XPath>   
        </ds:Transform>
    </ds:Transforms> 
....

告诉它必须不考虑 ds:Signature 元素进行签名生成。 xades4j 如何允许使用这种转换?

谢谢

米歇尔

【问题讨论】:

    标签: xpath xmlsec xades4j


    【解决方案1】:

    您可以在定义DataObjectReference 时添加转换。查看wiki pageXPath2FilterTransform class documentation 上的示例。

    【讨论】:

      猜你喜欢
      • 2021-10-08
      • 2013-09-17
      • 2019-08-02
      • 1970-01-01
      • 2022-01-22
      • 2013-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多