dp:get-metadata()
Fetches metadata for the current transaction.
Namespace declaration
xmlns:dp="http://www.datapower.com/extensions"
Syntax
dp:get-metadata(object)
Parameters
- object
- The
xs:stringthat identifies the requested metadata object. In the absence of this argument, the function provides a default value, which is an empty string, that requests all metadata for the current transaction.
Guidelines
This extension function supports both request and response traffic. If the current traffic is from client to server, a request, the function returns transactional metadata of the request message. If the traffic is from server to client, it fetches the transactional response message metadata.
If any of the following errors encountered, the corresponding meta-item element is not contained
in the returned node set.
- A meta-item mapping is not in the manifest.
- The header or variable is not available to read.
- The value is
NULLor empty string.
If the current protocol scheme is not supported by the metadata manifest, only the metadata items that can be customized are attempted.
The extension passes all arguments as XPath expressions.
Results
A node set, which is an XML fragment, that contains the specified metadata name-value pair, or all metadata name-value pairs.
Example
…
<xsl:variable name="metadata" select="dp:get-metadata('my-short-list')"/>
…