XAdES-EPES 扩展为 XAdES-T,QualifyingProperties 中不包含 "xmlns:xades141="http://uri.etsi.org/01903/v1.4.1#"

XAdES-EPES extended to XAdES-T, don't include "xmlns:xades141="http://uri.etsi.org/01903/v1.4.1#" in QualifyingProperties

我有一个 XAdES-EPES 签名,然后我使用 XAdES-4j 将签名扩展到 XAdES-T。问题是在原始签名中,QualifyingProperties 是:

<xades:QualifyingProperties Id="Signature-b8925056-3e5e-4a39-8e4c-7fc1286b5eb5-QualifyingProperties" Target="#Signature-b8925056-3e5e-4a39-8e4c-7fc1286b5eb5-Signature" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#">

并且在扩展签名 QualifyingProperties 中是:

<xades:QualifyingProperties Id="Signature-b8925056-3e5e-4a39-8e4c-7fc1286b5eb5-QualifyingProperties" Target="#Signature-b8925056-3e5e-4a39-8e4c-7fc1286b5eb5-Signature" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" xmlns:xades141="http://uri.etsi.org/01903/v1.4.1#">

如何在不向 QualifyingProperties 添加 xmlns:xades141="http://uri.etsi.org/01903/v1.4.1#" 的情况下扩展签名?

提前致谢!

已编辑:在找到解决方案之前,我正在做:

Element qualifyingProperties = null;
final NodeList nlist = xmlSig.getDocument().getElementsByTagName("xades:QualifyingProperties");
if (nlist.getLength() != 0) {
    qualifyingProperties = (Element) nlist.item(0);
    qualifyingProperties.removeAttribute("xmlns:xades141");
}

xades4j 当前执行 XML 序列化的方式总是添加该命名空间声明,即使没有任何元素使用它。没有办法配置它。我只想在必要时添加它,但该问题尚未解决。