Quite often a service returns data in the form of XML. Normally you would only need a portion of that XML in order to feed it to the next service in your workflow.
XPath is a major path in W3C’s XSLT (Extensible Stylesheet Language Transformations) standard. It is used to navigate through elements and attributes in an XML document. An XPath service in Taverna provides enhanced support for creating and executing XPath expressions over XML data in order to extract specific fragments (elements or attributes) from the XML data.
Adding an XPath Service
Configuring an XPath Service
The XPath service provides an intuitive and easy-to-use way of creating XPath expressions. It does not require detailed knowledge of the XPath language – expressions can be generated by selection of relevant nodes in the tree-like view of the provided example XML data.
Example data can be an XML output that you know the service you are using to feed the XPath service will return.
To configure an XPath service:
Alternatively, you can enter the XPath expression directly in the XPath box without selecting nodes from the example XML.
You can also mix the two approaches - auto-generate the XML from the example data and then tweak the XPath expression.
Sometimes XML data contains elements with the same name but which belong to a different namespace. The XPath service lets you create abbreviation for namespaces and can select elements that belong to a certain namespace.
To configure namespace mapping: