Version 1.1, 12th January 2004
In order to ensure that the contents of the recordData field of a record are well formed XML in their own right, the result of evaluating an XPath expression needs to be encoded in an XML form. A simple schema has been defined which can encapsulate these objects in an easy to process fashion.
The unique identifier for the XPath result schema is: info:srw/schema/1/xpath-1.0
The examples below will help to illustrate the usage of the schema, but a quick rundown of the various elements is called for first.
The following are hopefully informative examples of the use of the schema.
<result>
<nodeSet schema="info:srw/schema/1/dc-v1.1>
<node type="element" path="/dc/title">
<title>This is a title element</title>
</node>
<node type="attribute">
<attr name="id">attr1-1</attr>
</node>
<node type="text">
This is a text node.
</node>
<node type="comment">
<!-- Comment -->
</node>
<node type="processing">
<?foo type="bar"?>
</node>
</nodeSet>
</result>
<result>
<string>This is a string result</string>
</result>
<result>
<number>1</number>
</result>
<result>
<boolean>true</boolean>
</result>
|