blob: 60d8857c0b7e4dee1df5d281184dc4940af007de [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></meta><title>EvaluateXQuery</title><link rel="stylesheet" href="../../../../../css/component-usage.css" type="text/css"></link></head><script type="text/javascript">window.onload = function(){if(self==top) { document.getElementById('nameHeader').style.display = "inherit"; } }</script><body><h1 id="nameHeader" style="display: none;">EvaluateXQuery</h1><h2>Description: </h2><p>Evaluates one or more XQueries against the content of a FlowFile. The results of those XQueries are assigned to FlowFile Attributes or are written to the content of the FlowFile itself, depending on configuration of the Processor. XQueries are entered by adding user-defined properties; the name of the property maps to the Attribute Name into which the result will be placed (if the Destination is 'flowfile-attribute'; otherwise, the property name is ignored). The value of the property must be a valid XQuery. If the XQuery returns more than one result, new attributes or FlowFiles (for Destinations of 'flowfile-attribute' or 'flowfile-content' respectively) will be created for each result (attributes will have a '.n' one-up number appended to the specified attribute name). If any provided XQuery returns a result, the FlowFile(s) will be routed to 'matched'. If no provided XQuery returns a result, the FlowFile will be routed to 'unmatched'. If the Destination is 'flowfile-attribute' and the XQueries matche nothing, no attributes will be applied to the FlowFile.</p><p><a href="additionalDetails.html">Additional Details...</a></p><h3>Tags: </h3><p>XML, evaluate, XPath, XQuery</p><h3>Properties: </h3><p>In the list below, the names of required properties appear in <strong>bold</strong>. Any other properties (not in bold) are considered optional. The table also indicates any default values.</p><table id="properties"><tr><th>Display Name</th><th>API Name</th><th>Default Value</th><th>Allowable Values</th><th>Description</th></tr><tr><td id="name"><strong>Destination</strong></td><td>Destination</td><td id="default-value">flowfile-content</td><td id="allowable-values"><ul><li>flowfile-content</li><li>flowfile-attribute</li></ul></td><td id="description">Indicates whether the results of the XQuery evaluation are written to the FlowFile content or a FlowFile attribute. If set to &lt;flowfile-content&gt;, only one XQuery may be specified and the property name is ignored. If set to &lt;flowfile-attribute&gt; and the XQuery returns more than one result, multiple attributes will be added to theFlowFile, each named with a '.n' one-up number appended to the specified attribute name</td></tr><tr><td id="name"><strong>Output: Method</strong></td><td>Output: Method</td><td id="default-value">xml</td><td id="allowable-values"><ul><li>xml</li><li>html</li><li>text</li></ul></td><td id="description">Identifies the overall method that should be used for outputting a result tree.</td></tr><tr><td id="name"><strong>Output: Omit XML Declaration</strong></td><td>Output: Omit XML Declaration</td><td id="default-value">false</td><td id="allowable-values"></td><td id="description">Specifies whether the processor should output an XML declaration when transforming a result tree.</td></tr><tr><td id="name"><strong>Output: Indent</strong></td><td>Output: Indent</td><td id="default-value">false</td><td id="allowable-values"></td><td id="description">Specifies whether the processor may add additional whitespace when outputting a result tree.</td></tr><tr><td id="name"><strong>Allow DTD</strong></td><td>Validate DTD</td><td id="default-value">false</td><td id="allowable-values"><ul><li>true</li><li>false</li></ul></td><td id="description">Allow embedded Document Type Declaration in XML. This feature should be disabled to avoid XML entity expansion vulnerabilities.</td></tr></table><h3>Dynamic Properties: </h3><p>Supports Sensitive Dynamic Properties: <strong>No</strong></p><p>Dynamic Properties allow the user to specify both the name and value of a property.<table id="dynamic-properties"><tr><th>Name</th><th>Value</th><th>Description</th></tr><tr><td id="name">A FlowFile attribute(if &lt;Destination&gt; is set to 'flowfile-attribute'</td><td id="value">An XQuery</td><td>If &lt;Destination&gt;='flowfile-attribute' then the FlowFile attribute is set to the result of the XQuery. If &lt;Destination&gt;='flowfile-content' then the FlowFile content is set to the result of the XQuery.<br/><strong>Supports Expression Language: false</strong></td></tr></table></p><h3>Relationships: </h3><table id="relationships"><tr><th>Name</th><th>Description</th></tr><tr><td>failure</td><td>FlowFiles are routed to this relationship when the XQuery cannot be evaluated against the content of the FlowFile.</td></tr><tr><td>unmatched</td><td>FlowFiles are routed to this relationship when the XQuery does not match the content of the FlowFile and the Destination is set to flowfile-content</td></tr><tr><td>matched</td><td>FlowFiles are routed to this relationship when the XQuery is successfully evaluated and the FlowFile is modified as a result</td></tr></table><h3>Reads Attributes: </h3>None specified.<h3>Writes Attributes: </h3><table id="writes-attributes"><tr><th>Name</th><th>Description</th></tr><tr><td>user-defined</td><td>This processor adds user-defined attributes if the &lt;Destination&gt; property is set to flowfile-attribute .</td></tr></table><h3>State management: </h3>This component does not store state.<h3>Restricted: </h3>This component is not restricted.<h3>Input requirement: </h3>This component requires an incoming relationship.<h3>System Resource Considerations:</h3><table id="system-resource-considerations"><tr><th>Resource</th><th>Description</th></tr><tr><td>MEMORY</td><td>Processing requires reading the entire FlowFile into memory</td></tr></table></body></html>