Discuss this help topic in SecureBlackbox Forum

XML: Change prefix of XAdES elements

If you need to change the prefix of XAdES elements or to remove it then you need to use TElXMLQualifyingProperties.XAdESPrefix property. If you need to change the prefix of XAdES elements for XAdES version 1.4.1, then you need to use TElXMLQualifyingProperties.XAdESv141Prefix property. The instance of TElXMLQualifyingProperties class could be accessed using TElXAdESSigner.QualifyingProperties property, after it has been generated (i.e. after the call of TElXAdESSigner.Generate() method).

The default value of XAdESPrefix property is "#default" value and XAdESv141Prefix property is "xadesv141".

C#:


TElXAdESSigner XAdESSigner = new TElXAdESSigner();
XAdESSigner.XAdESVersion = SBXMLAdES.Unit.XAdES_v1_3_2;
...
XAdESSigner.Generate();
...
XAdESSigner.QualifyingProperties.XAdESPrefix = "xades";
Delphi:

var
  XAdESSigner : TElXAdESSigner;
...
XAdESSigner := TElXAdESSigner.Create(nil);
XAdESSigner.XAdESVersion := XAdES_v1_3_2;
...
XAdESSigner.Generate();
...
XAdESSigner.QualifyingProperties.XAdESPrefix := 'xades';

Resulting XML:


<xades:QualifyingProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Target="#SignatureId">
...content...
</xades:QualifyingProperties>

Also see https://www.eldos.com/security/articles/7443.php

How To articles about XML signing (XMLDSig and XAdES)

Discuss this help topic in SecureBlackbox Forum