Activity - xPathStatement
Activity Type: XML
Description
Run an XPath query on an XMLDB data resource. The query can be run
upon an individual resource (in an XMLDB a resource is an XML
document) within a collection or over an entire collection of
resources.
Example
<xPathStatement name="statement">
<collection>musicians/folksingers</collection>
<resourceId>someResource</resourceId>
<namespace prefix="c">http://folksingers/contact-details</namespace>
<expression>/c:entry/c:address</expression>
<resourceSetStream name="statementOutput"/>
</xPathStatement>
Specification
Element xPathStatement:
-
Attribute name - unique name for the
activity.
-
Element collection (zero or one) - contains
the name of the collection that the query will be performed
within.
-
Relative to the data resource's base collection.
-
For example, if a data resource is configured for the db/littleblackbook collection then the example
would perform the query within the db/littleblackbook/musicians/folksingers
collection.
-
If this element is omitted then the query will be performed
on the base collection for the data resource.
-
Element resourceId (zero or one):
-
Contains the name of the resource in the selected collection over
which the query will be run.
-
If omitted then the query will be run over all the resources in the
selected collection.
-
Element namespace (0 or more) - a namespace
prefix declaration.
-
Contains a namespace URL.
-
Attribute prefix - a prefix for use in the
XPath expression and corresponding to the namespace URI.
-
Element expression (required) - an XPath
expression.
-
Contains an XPath query statement.
-
resourceSetStream (required) - output
stream.
-
Attribute name - name of the activity's output
stream.
XML Schema
OGSA-DAI/schema/ogsadai/xsd/activities/xpath_statement.xsd
Implementation
OGSA-DAI/src/java/activities/uk/org/ogsadai/activity/xmldb/XPathStatementActivity.java