Skip to content

API XMLSec Core Templates

Aleksey Sanin edited this page Jun 22, 2026 · 5 revisions

XML Templates

API Group: xmlsec_core_templates

Functions for creating XMLDSig and XMLEnc XML template documents.

XML signature and encryption template functions.

Functions

xmlSecTmplSignatureCreate

xmlNodePtr xmlSecTmplSignatureCreate(xmlDocPtr doc, xmlSecTransformId c14nMethodId, xmlSecTransformId signMethodId, const xmlChar *id);

Source: include/xmlsec/templates.h

Creates a new dsig:Signature/ node with required children.

Creates new dsig:Signature/ node with the mandatory dsig:SignedInfo/, dsig:CanonicalizationMethod/, dsig:SignatureMethod/ and dsig:SignatureValue/ children and sub-children. The application is responsible for inserting the returned node in the XML document.

Parameters:

  • doc — the pointer to signature document or NULL; in the second case, application must later call xmlSetTreeDoc to ensure that all the children nodes have correct pointer to XML document.
  • c14nMethodId — the signature canonicalization method.
  • signMethodId — the signature method.
  • id — the node id (may be NULL).

Returns: the pointer to newly created dsig:Signature/ node or NULL if an error occurs.


xmlSecTmplSignatureCreateNsPref

xmlNodePtr xmlSecTmplSignatureCreateNsPref(xmlDocPtr doc, xmlSecTransformId c14nMethodId, xmlSecTransformId signMethodId, const xmlChar *id, const xmlChar *nsPrefix);

Source: include/xmlsec/templates.h

Creates a new dsig:Signature/ node with a custom namespace prefix.

Creates new dsig:Signature/ node with the mandatory dsig:SignedInfo/, dsig:CanonicalizationMethod/, dsig:SignatureMethod/ and dsig:SignatureValue/ children and sub-children. This method differs from xmlSecTmplSignatureCreate in that it will define the http://www.w3.org/2000/09/xmldsig# namespace with the given prefix that will be used for all of the appropriate child nodes. The application is responsible for inserting the returned node in the XML document.

Parameters:

  • doc — the pointer to signature document or NULL; in the second case, application must later call xmlSetTreeDoc to ensure that all the children nodes have correct pointer to XML document.
  • c14nMethodId — the signature canonicalization method.
  • signMethodId — the signature method.
  • id — the node id (may be NULL).
  • nsPrefix — the namespace prefix for the signature element (e.g. "dsig"), or NULL

Returns: the pointer to newly created dsig:Signature/ node or NULL if an error occurs.


xmlSecTmplSignatureEnsureKeyInfo

xmlNodePtr xmlSecTmplSignatureEnsureKeyInfo(xmlNodePtr signNode, const xmlChar *id);

Source: include/xmlsec/templates.h

Ensures a dsig:KeyInfo/ child node in the dsig:Signature/ node.

Adds (if necessary) dsig:KeyInfo/ node to the dsig:Signature/ node signNode.

Parameters:

  • signNode — the pointer to dsig:Signature/ node.
  • id — the node id (may be NULL).

Returns: the pointer to newly created dsig:KeyInfo/ node or NULL if an error occurs.


xmlSecTmplSignatureAddReference

xmlNodePtr xmlSecTmplSignatureAddReference(xmlNodePtr signNode, xmlSecTransformId digestMethodId, const xmlChar *id, const xmlChar *uri, const xmlChar *type);

Source: include/xmlsec/templates.h

Adds a dsig:Reference/ node to the dsig:SignedInfo/ child.

Adds dsig:Reference/ node with given URI (uri), Id (id) and Type (type) attributes and the required children dsig:DigestMethod/ and dsig:DigestValue/ to the dsig:SignedInfo/ child of signNode.

Parameters:

  • signNode — the pointer to dsig:Signature/ node.
  • digestMethodId — the reference digest method.
  • id — the node id (may be NULL).
  • uri — the reference node uri (may be NULL).
  • type — the reference node type (may be NULL).

Returns: the pointer to newly created dsig:Reference/ node or NULL if an error occurs.


xmlSecTmplSignatureAddObject

xmlNodePtr xmlSecTmplSignatureAddObject(xmlNodePtr signNode, const xmlChar *id, const xmlChar *mimeType, const xmlChar *encoding);

Source: include/xmlsec/templates.h

Adds a dsig:Object/ node to the dsig:Signature/ node.

Adds dsig:Object/ node to the dsig:Signature/ node signNode.

Parameters:

  • signNode — the pointer to dsig:Signature/ node.
  • id — the node id (may be NULL).
  • mimeType — the object mime type (may be NULL).
  • encoding — the object encoding (may be NULL).

Returns: the pointer to newly created dsig:Object/ node or NULL if an error occurs.


xmlSecTmplSignatureGetSignMethodNode

xmlNodePtr xmlSecTmplSignatureGetSignMethodNode(xmlNodePtr signNode);

Source: include/xmlsec/templates.h

Gets the dsig:SignatureMethod/ child of dsig:KeyInfo/ node.

Gets pointer to dsig:SignatureMethod/ child of dsig:KeyInfo/ node.

Parameters:

  • signNode — the pointer to <dsig:Signature /> node.

Returns: pointer to <dsig:SignatureMethod /> node or NULL if an error occurs.


xmlSecTmplSignatureGetC14NMethodNode

xmlNodePtr xmlSecTmplSignatureGetC14NMethodNode(xmlNodePtr signNode);

Source: include/xmlsec/templates.h

Gets the dsig:CanonicalizationMethod/ child of dsig:KeyInfo/ node.

Gets pointer to dsig:CanonicalizationMethod/ child of dsig:KeyInfo/ node.

Parameters:

  • signNode — the pointer to <dsig:Signature /> node.

Returns: pointer to <dsig:CanonicalizationMethod /> node or NULL if an error occurs.


xmlSecTmplReferenceAddTransform

xmlNodePtr xmlSecTmplReferenceAddTransform(xmlNodePtr referenceNode, xmlSecTransformId transformId);

Source: include/xmlsec/templates.h

Adds a dsig:Transform/ node to the dsig:Reference/ node.

Adds dsig:Transform/ node to the dsig:Reference/ node referenceNode.

Parameters:

  • referenceNode — the pointer to dsig:Reference/ node.
  • transformId — the transform method id.

Returns: the pointer to newly created dsig:Transform/ node or NULL if an error occurs.


xmlSecTmplObjectAddSignProperties

xmlNodePtr xmlSecTmplObjectAddSignProperties(xmlNodePtr objectNode, const xmlChar *id, const xmlChar *target);

Source: include/xmlsec/templates.h

Adds a dsig:SignatureProperties/ node to the dsig:Object/ node.

Adds dsig:SignatureProperties/ node to the dsig:Object/ node objectNode.

Parameters:

  • objectNode — the pointer to dsig:Object/ node.
  • id — the node id (may be NULL).
  • target — the Target (may be NULL).

Returns: the pointer to newly created dsig:SignatureProperties/ node or NULL if an error occurs.


xmlSecTmplObjectAddManifest

xmlNodePtr xmlSecTmplObjectAddManifest(xmlNodePtr objectNode, const xmlChar *id);

Source: include/xmlsec/templates.h

Adds a dsig:Manifest/ node to the dsig:Object/ node.

Adds dsig:Manifest/ node to the dsig:Object/ node objectNode.

Parameters:

  • objectNode — the pointer to dsig:Object/ node.
  • id — the node id (may be NULL).

Returns: the pointer to newly created dsig:Manifest/ node or NULL if an error occurs.


xmlSecTmplManifestAddReference

xmlNodePtr xmlSecTmplManifestAddReference(xmlNodePtr manifestNode, xmlSecTransformId digestMethodId, const xmlChar *id, const xmlChar *uri, const xmlChar *type);

Source: include/xmlsec/templates.h

Adds a dsig:Reference/ node to the dsig:Manifest/ node.

Adds dsig:Reference/ node with specified URI (uri), Id (id) and Type (type) attributes and the required children dsig:DigestMethod/ and dsig:DigestValue/ to the dsig:Manifest/ node manifestNode.

Parameters:

  • manifestNode — the pointer to dsig:Manifest/ node.
  • digestMethodId — the reference digest method.
  • id — the node id (may be NULL).
  • uri — the reference node uri (may be NULL).
  • type — the reference node type (may be NULL).

Returns: the pointer to newly created dsig:Reference/ node or NULL if an error occurs.


xmlSecTmplEncDataCreate

xmlNodePtr xmlSecTmplEncDataCreate(xmlDocPtr doc, xmlSecTransformId encMethodId, const xmlChar *id, const xmlChar *type, const xmlChar *mimeType, const xmlChar *encoding);

Source: include/xmlsec/templates.h

Creates a new enc:EncryptedData/ node for encryption template.

Creates new <enc:EncryptedData /> node for encryption template.

Parameters:

  • doc — the pointer to signature document or NULL; in the later case, application must later call xmlSetTreeDoc to ensure that all the children nodes have correct pointer to XML document.
  • encMethodId — the encryption method (may be NULL).
  • id — the Id attribute (optional).
  • type — the Type attribute (optional)
  • mimeType — the MimeType attribute (optional)
  • encoding — the Encoding attribute (optional)

Returns: the pointer newly created enc:EncryptedData/ node or NULL if an error occurs.


xmlSecTmplEncDataEnsureKeyInfo

xmlNodePtr xmlSecTmplEncDataEnsureKeyInfo(xmlNodePtr encNode, const xmlChar *id);

Source: include/xmlsec/templates.h

Ensures a dsig:KeyInfo/ child in the enc:EncryptedData/ node.

Adds dsig:KeyInfo/ to the enc:EncryptedData/ node encNode.

Parameters:

  • encNode — the pointer to enc:EncryptedData/ node.
  • id — the Id attrbibute (optional).

Returns: the pointer to newly created dsig:KeyInfo/ node or NULL if an error occurs.


xmlSecTmplEncDataEnsureEncProperties

xmlNodePtr xmlSecTmplEncDataEnsureEncProperties(xmlNodePtr encNode, const xmlChar *id);

Source: include/xmlsec/templates.h

Ensures a enc:EncryptionProperties/ child in the enc:EncryptedData/ node.

Adds enc:EncryptionProperties/ node to the enc:EncryptedData/ node encNode.

Parameters:

  • encNode — the pointer to enc:EncryptedData/ node.
  • id — the Id attribute (optional).

Returns: the pointer to newly created enc:EncryptionProperties/ node or NULL if an error occurs.


xmlSecTmplEncDataAddEncProperty

xmlNodePtr xmlSecTmplEncDataAddEncProperty(xmlNodePtr encNode, const xmlChar *id, const xmlChar *target);

Source: include/xmlsec/templates.h

Adds a enc:EncryptionProperty/ node to the enc:EncryptedData/ node.

Adds enc:EncryptionProperty/ node (and the parent enc:EncryptionProperties/ node if required) to the enc:EncryptedData/ node encNode.

Parameters:

  • encNode — the pointer to enc:EncryptedData/ node.
  • id — the Id attribute (optional).
  • target — the Target attribute (optional).

Returns: the pointer to newly created enc:EncryptionProperty/ node or NULL if an error occurs.


xmlSecTmplEncDataEnsureCipherValue

xmlNodePtr xmlSecTmplEncDataEnsureCipherValue(xmlNodePtr encNode);

Source: include/xmlsec/templates.h

Ensures a enc:CipherValue/ child in the enc:EncryptedData/ node.

Adds enc:CipherValue/ to the enc:EncryptedData/ node encNode.

Parameters:

  • encNode — the pointer to enc:EncryptedData/ node.

Returns: the pointer to newly created enc:CipherValue/ node or NULL if an error occurs.


xmlSecTmplEncDataEnsureCipherReference

xmlNodePtr xmlSecTmplEncDataEnsureCipherReference(xmlNodePtr encNode, const xmlChar *uri);

Source: include/xmlsec/templates.h

Ensures a enc:CipherReference/ child in the enc:EncryptedData/ node.

Adds enc:CipherReference/ node with specified URI attribute uri to the enc:EncryptedData/ node encNode.

Parameters:

  • encNode — the pointer to enc:EncryptedData/ node.
  • uri — the URI attribute (may be NULL).

Returns: the pointer to newly created enc:CipherReference/ node or NULL if an error occurs.


xmlSecTmplEncDataGetEncMethodNode

xmlNodePtr xmlSecTmplEncDataGetEncMethodNode(xmlNodePtr encNode);

Source: include/xmlsec/templates.h

Gets pointer to enc:EncryptionMethod/ node.

Parameters:

  • encNode — the pointer to <enc:EcnryptedData /> node.

Returns: pointer to <enc:EncryptionMethod /> node or NULL if an error occurs.


xmlSecTmplCipherReferenceAddTransform

xmlNodePtr xmlSecTmplCipherReferenceAddTransform(xmlNodePtr cipherReferenceNode, xmlSecTransformId transformId);

Source: include/xmlsec/templates.h

Adds a dsig:Transform/ node to the enc:CipherReference/ node.

Adds dsig:Transform/ node (and the parent dsig:Transforms/ node) with specified transform methods transform to the enc:CipherReference/ child node of the enc:EncryptedData/ node encNode.

Parameters:

  • cipherReferenceNode — the pointer to enc:CipherReference/ node.
  • transformId — the transform id.

Returns: the pointer to newly created dsig:Transform/ node or NULL if an error occurs.


xmlSecTmplReferenceListAddDataReference

xmlNodePtr xmlSecTmplReferenceListAddDataReference(xmlNodePtr encNode, const xmlChar *uri);

Source: include/xmlsec/templates.h

Adds a enc:DataReference/ node to the enc:EncryptedKey/ node.

Adds enc:DataReference/ and the parent enc:ReferenceList/ node (if needed).

Parameters:

  • encNode — the pointer to enc:EncryptedKey/ node.
  • uri — uri to reference (optional)

Returns: the pointer to newly created enc:DataReference/ node or NULL if an error occurs.


xmlSecTmplReferenceListAddKeyReference

xmlNodePtr xmlSecTmplReferenceListAddKeyReference(xmlNodePtr encNode, const xmlChar *uri);

Source: include/xmlsec/templates.h

Adds a enc:KeyReference/ node to the enc:EncryptedKey/ node.

Adds enc:KeyReference/ and the parent enc:ReferenceList/ node (if needed).

Parameters:

  • encNode — the pointer to enc:EncryptedKey/ node.
  • uri — uri to reference (optional)

Returns: the pointer to newly created enc:KeyReference/ node or NULL if an error occurs.


xmlSecTmplKeyInfoAddKeyName

xmlNodePtr xmlSecTmplKeyInfoAddKeyName(xmlNodePtr keyInfoNode, const xmlChar *name);

Source: include/xmlsec/templates.h

Adds a dsig:KeyName/ node to the dsig:KeyInfo/ node.

Adds dsig:KeyName/ node to the dsig:KeyInfo/ node keyInfoNode.

Parameters:

  • keyInfoNode — the pointer to dsig:KeyInfo/ node.
  • name — the key name (optional).

Returns: the pointer to the newly created dsig:KeyName/ node or NULL if an error occurs.


xmlSecTmplKeyInfoAddKeyValue

xmlNodePtr xmlSecTmplKeyInfoAddKeyValue(xmlNodePtr keyInfoNode);

Source: include/xmlsec/templates.h

Adds a dsig:KeyValue/ node to the dsig:KeyInfo/ node.

Adds dsig:KeyValue/ node to the dsig:KeyInfo/ node keyInfoNode.

Parameters:

  • keyInfoNode — the pointer to dsig:KeyInfo/ node.

Returns: the pointer to the newly created dsig:KeyValue/ node or NULL if an error occurs.


xmlSecTmplKeyInfoAddX509Data

xmlNodePtr xmlSecTmplKeyInfoAddX509Data(xmlNodePtr keyInfoNode);

Source: include/xmlsec/templates.h

Adds a dsig:X509Data/ node to the dsig:KeyInfo/ node.

Adds dsig:X509Data/ node to the dsig:KeyInfo/ node keyInfoNode.

Parameters:

  • keyInfoNode — the pointer to dsig:KeyInfo/ node.

Returns: the pointer to the newly created dsig:X509Data/ node or NULL if an error occurs.


xmlSecTmplKeyInfoAddRetrievalMethod

xmlNodePtr xmlSecTmplKeyInfoAddRetrievalMethod(xmlNodePtr keyInfoNode, const xmlChar *uri, const xmlChar *type);

Source: include/xmlsec/templates.h

Adds a dsig:RetrievalMethod/ node to the dsig:KeyInfo/ node.

Adds dsig:RetrievalMethod/ node to the dsig:KeyInfo/ node keyInfoNode.

Parameters:

  • keyInfoNode — the pointer to dsig:KeyInfo/ node.
  • uri — the URI attribute (optional).
  • type — the Type attribute(optional).

Returns: the pointer to the newly created dsig:RetrievalMethod/ node or NULL if an error occurs.


xmlSecTmplRetrievalMethodAddTransform

xmlNodePtr xmlSecTmplRetrievalMethodAddTransform(xmlNodePtr retrMethodNode, xmlSecTransformId transformId);

Source: include/xmlsec/templates.h

Adds a dsig:Transform/ node to the dsig:RetrievalMethod/ node.

Adds dsig:Transform/ node (and the parent dsig:Transforms/ node if required) to the dsig:RetrievalMethod/ node retrMethod.

Parameters:

  • retrMethodNode — the pointer to dsig:RetrievalMethod/ node.
  • transformId — the transform id.

Returns: the pointer to the newly created dsig:Transforms/ node or NULL if an error occurs.


xmlSecTmplKeyInfoAddEncryptedKey

xmlNodePtr xmlSecTmplKeyInfoAddEncryptedKey(xmlNodePtr keyInfoNode, xmlSecTransformId encMethodId, const xmlChar *id, const xmlChar *type, const xmlChar *recipient);

Source: include/xmlsec/templates.h

Adds a enc:EncryptedKey/ node to the dsig:KeyInfo/ node.

Adds enc:EncryptedKey/ node with given attributes to the dsig:KeyInfo/ node keyInfoNode.

Parameters:

  • keyInfoNode — the pointer to dsig:KeyInfo/ node.
  • encMethodId — the encryption method (optional).
  • id — the Id attribute (optional).
  • type — the Type attribute (optional).
  • recipient — the Recipient attribute (optional).

Returns: the pointer to the newly created enc:EncryptedKey/ node or NULL if an error occurs.


xmlSecTmplX509DataAddIssuerSerial

xmlNodePtr xmlSecTmplX509DataAddIssuerSerial(xmlNodePtr x509DataNode);

Source: include/xmlsec/templates.h

Adds a dsig:X509IssuerSerial/ node to the dsig:X509Data/ node.

Adds dsig:X509IssuerSerial/ node to the given dsig:X509Data/ node.

Parameters:

  • x509DataNode — the pointer to dsig:X509Data/ node.

Returns: the pointer to the newly created dsig:X509IssuerSerial/ node or NULL if an error occurs.


xmlSecTmplX509IssuerSerialAddIssuerName

xmlNodePtr xmlSecTmplX509IssuerSerialAddIssuerName(xmlNodePtr x509IssuerSerialNode, const xmlChar *issuerName);

Source: include/xmlsec/templates.h

Adds a dsig:X509IssuerName/ node to the dsig:X509IssuerSerial/ node.

Adds dsig:X509IssuerName/ node to the dsig:X509IssuerSerial/ node x509IssuerSerialNode.

Parameters:

  • x509IssuerSerialNode — the pointer to dsig:X509IssuerSerial/ node.
  • issuerName — the issuer name (optional).

Returns: the pointer to the newly created dsig:X509IssuerName/ node or NULL if an error occurs.


xmlSecTmplX509IssuerSerialAddSerialNumber

xmlNodePtr xmlSecTmplX509IssuerSerialAddSerialNumber(xmlNodePtr x509IssuerSerialNode, const xmlChar *serial);

Source: include/xmlsec/templates.h

Adds a dsig:X509SerialNumber/ node to the dsig:X509IssuerSerial/ node.

Adds dsig:X509SerialNumber/ node to the dsig:X509IssuerSerial/ node x509IssuerSerialNode.

Parameters:

  • x509IssuerSerialNode — the pointer to dsig:X509IssuerSerial/ node.
  • serial — the serial number (optional).

Returns: the pointer to the newly created dsig:X509SerialNumber/ node or NULL if an error occurs.


xmlSecTmplX509DataAddSubjectName

xmlNodePtr xmlSecTmplX509DataAddSubjectName(xmlNodePtr x509DataNode);

Source: include/xmlsec/templates.h

Adds a dsig:X509SubjectName/ node to the dsig:X509Data/ node.

Adds dsig:X509SubjectName/ node to the given dsig:X509Data/ node.

Parameters:

  • x509DataNode — the pointer to dsig:X509Data/ node.

Returns: the pointer to the newly created dsig:X509SubjectName/ node or NULL if an error occurs.


xmlSecTmplX509DataAddSKI

xmlNodePtr xmlSecTmplX509DataAddSKI(xmlNodePtr x509DataNode);

Source: include/xmlsec/templates.h

Adds a dsig:X509SKI/ node to the dsig:X509Data/ node.

Adds dsig:X509SKI/ node to the given dsig:X509Data/ node.

Parameters:

  • x509DataNode — the pointer to dsig:X509Data/ node.

Returns: the pointer to the newly created dsig:X509SKI/ node or NULL if an error occurs.


xmlSecTmplX509DataAddDigest

xmlNodePtr xmlSecTmplX509DataAddDigest(xmlNodePtr x509DataNode, const xmlChar *digestAlgorithm);

Source: include/xmlsec/templates.h

Adds a dsig11:X509Digest/ node to the dsig:X509Data/ node.

Adds dsig11:X509Digest/ node to the given dsig:X509Data/ node.

Parameters:

  • x509DataNode — the pointer to dsig:X509Data/ node.
  • digestAlgorithm — the digest algorithm URL.

Returns: the pointer to the newly created dsig11:X509Digest/ node or NULL if an error occurs.


xmlSecTmplX509DataAddCertificate

xmlNodePtr xmlSecTmplX509DataAddCertificate(xmlNodePtr x509DataNode);

Source: include/xmlsec/templates.h

Adds a dsig:X509Certificate/ node to the dsig:X509Data/ node.

Adds dsig:X509Certificate/ node to the given dsig:X509Data/ node.

Parameters:

  • x509DataNode — the pointer to dsig:X509Data/ node.

Returns: the pointer to the newly created dsig:X509Certificate/ node or NULL if an error occurs.


xmlSecTmplX509DataAddCRL

xmlNodePtr xmlSecTmplX509DataAddCRL(xmlNodePtr x509DataNode);

Source: include/xmlsec/templates.h

Adds a dsig:X509CRL/ node to the dsig:X509Data/ node.

Adds dsig:X509CRL/ node to the given dsig:X509Data/ node.

Parameters:

  • x509DataNode — the pointer to dsig:X509Data/ node.

Returns: the pointer to the newly created dsig:X509CRL/ node or NULL if an error occurs.


xmlSecTmplTransformAddHmacOutputLength

int xmlSecTmplTransformAddHmacOutputLength(xmlNodePtr transformNode, xmlSecSize bitsLen);

Source: include/xmlsec/templates.h

Creates a dsig:HMACOutputLength/ child for the HMAC transform node.

Creates dsig:HMACOutputLength/ child for the HMAC transform node node.

Parameters:

  • transformNode — the pointer to dsig:Transform/ node
  • bitsLen — the required length in bits

Returns: 0 on success and a negative value otherwise.


xmlSecTmplTransformAddRsaOaepParam

int xmlSecTmplTransformAddRsaOaepParam(xmlNodePtr transformNode, const xmlSecByte *buf, xmlSecSize size);

Source: include/xmlsec/templates.h

Creates a enc:OAEPParam/ child node in the node.

Creates enc:OAEPParam/ child node in the node.

Parameters:

  • transformNode — the pointer to dsig:Transform/ node.
  • buf — the OAEP param buffer.
  • size — the OAEP param buffer size.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTmplTransformAddRsaMgf

int xmlSecTmplTransformAddRsaMgf(xmlNodePtr transformNode, const xmlChar *algorithm);

Source: include/xmlsec/templates.h

Creates enc:MGF/ child node in the node.

Parameters:

  • transformNode — the pointer to dsig:Transform/ node.
  • algorithm — MGF1 algorithm href.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTmplTransformAddRsaDigest

int xmlSecTmplTransformAddRsaDigest(xmlNodePtr transformNode, const xmlChar *algorithm);

Source: include/xmlsec/templates.h

Creates a dsig:DigestMethod/ child node in the node.

Creates dsig:DigestMethod/ child node in the node.

Parameters:

  • transformNode — the pointer to dsig:Transform/ node.
  • algorithm — digest algorithm href.

Returns: 0 on success or a negative value if an error occurs.


xmlSecTmplTransformAddXsltStylesheet

int xmlSecTmplTransformAddXsltStylesheet(xmlNodePtr transformNode, const xmlChar *xslt);

Source: include/xmlsec/templates.h

Writes an XSLT transform expression to the dsig:Transform/ node.

Writes the XSLT transform expression to the node.

Parameters:

  • transformNode — the pointer to dsig:Transform/ node.
  • xslt — the XSLT transform expression.

Returns: 0 on success or a negative value otherwise.


xmlSecTmplTransformAddC14NInclNamespaces

int xmlSecTmplTransformAddC14NInclNamespaces(xmlNodePtr transformNode, const xmlChar *prefixList);

Source: include/xmlsec/templates.h

Adds inclusive namespaces to the ExcC14N transform node.

Adds "inclusive" namespaces to the ExcC14N transform node node.

Parameters:

  • transformNode — the pointer to dsig:Transform/ node.
  • prefixList — the white space delimited list of namespace prefixes, where "#default" indicates the default namespace (optional).

Returns: 0 if success or a negative value otherwise.


xmlSecTmplTransformAddXPath

int xmlSecTmplTransformAddXPath(xmlNodePtr transformNode, const xmlChar *expression, const xmlChar **nsList);

Source: include/xmlsec/templates.h

Writes XPath transform information to the dsig:Transform/ node.

Writes XPath transform information to the dsig:Transform/ node node.

Parameters:

  • transformNode — the pointer to the dsig:Transform/ node.
  • expression — the XPath expression.
  • nsList — the NULL terminated list of namespace prefix/href pairs (optional).

Returns: 0 for success or a negative value otherwise.


xmlSecTmplTransformAddXPath2

int xmlSecTmplTransformAddXPath2(xmlNodePtr transformNode, const xmlChar *type, const xmlChar *expression, const xmlChar **nsList);

Source: include/xmlsec/templates.h

Writes XPath2 transform information to the dsig:Transform/ node.

Writes XPath2 transform information to the dsig:Transform/ node node.

Parameters:

  • transformNode — the pointer to the dsig:Transform/ node.
  • type — the XPath2 transform type ("union", "intersect" or "subtract").
  • expression — the XPath expression.
  • nsList — the NULL terminated list of namespace prefix/href pairs. (optional).

Returns: 0 for success or a negative value otherwise.


xmlSecTmplTransformAddXPointer

int xmlSecTmplTransformAddXPointer(xmlNodePtr transformNode, const xmlChar *expression, const xmlChar **nsList);

Source: include/xmlsec/templates.h

Writes XPointer transform information to the dsig:Transform/ node.

Writes XPointer transform information to the dsig:Transform/ node node.

Parameters:

  • transformNode — the pointer to the dsig:Transform/ node.
  • expression — the XPath expression.
  • nsList — the NULL terminated list of namespace prefix/href pairs. (optional).

Returns: 0 for success or a negative value otherwise.


Clone this wiki locally