Activity - xQueryStatement

Activity Type: XML

Description

Run an XQuery query on an XMLDB data resource. The query can be run upon an individual XMLDB resource contained within a collection in the XMLDB data resource or over an entire collection of XMLDB resources. Please note that XMLDB resources are XML documents which are stored within XMLDB collections (not to be confused with an XMLDB data resource itself or data service resources).

Example

<xQueryStatement 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"/>
</xQueryStatement>

Specification

Element xQueryStatement:

Input and Output Types

Data Resource Accessor

This activity requires a data resource accessor that implements the following interface: uk.org.ogsadai.dataresource.XMLDBCollectionProvider

Required Libraries

The use of this activity requires the following jar to be loaded on the server:

XML Schema

OGSA-DAI/schema/ogsadai/xsd/activities/xquery_statement.xsd

Class

uk.org.ogsadai.activity.xmldb.XQueryStatementActivity

Client Toolkit Class

uk.org.ogsadai.client.toolkit.activity.xmldb.XQuery