Evaluate XPath expressions on a target XML document.
<xpath name='xpath' source="request.MetaDataXML" property="context.Result" context="/staff/doc" expression="name[@last='Marston']"/>
|Attribute or Element||Description||Value|
|source attribute||Required. An expression that yields a stream containing the XML on which the XPath expressions are to be performed. Typically the source attribute will name a context or request property.||A string of one or more characters.|
|property attribute||Required. The property (typically a context property) in which to place the result of the evaluation.||A string of one or more characters.|
|context attribute||Required. The document context.||A string of one or more characters.|
|expression attribute||Required. The XPath expression.||A string of one or more characters.|
|prefixmappings attribute||Optional. Specifies prefix mappings for the document. This is a comma-delimited list of prefix-to-namespace mappings. See details below.||A string of 0 to 255 characters.|
|schemaspec attribute||Optional. The schema specification.||A string of 0 to 255 characters.|
|name, disabled, xpos, ypos, xend, yend attributes||See “Common Attributes and Elements.”|
The <xslt> element allows a business process to evaluate XPath expressions on a target XML document.
When the <xpath> element executes, the source stream is processed into an XPath document and then the XPath expressions are evaluated in sequence. The BPL runtime engine automatically manages the lifetime of the documents and caches them to allowing processing to be as efficient as possible
Each prefixmappings entry is defined as a prefix, a space, and then the URI to which that prefix maps. This is especially useful if the document defines a default namespace with the
xmlns="http://somenamespaceuri"syntax, but does not supply an explicit prefix mapping. The following prefixmappings string would map the
myprefixprefix to the
http://somenamespaceuriURI. Note the space character in the string:
The BPL <xpath> element is intended to support XPath expressions which yield a scalar value, that is a single piece of text, number, date etc. It is not intended to deal with expressions that yield an XPath DOM. This means that if the expression does yield a DOM, the target property will not be updated. DOM programming is beyond the scope of BPL. If your business needs such processing, then the XPath should be performed in a code block or a call to a utility class.