Supported --------- Note: any combination of these is possible - selecting root element: / - selecting all elements: // - selecting all enclosed elements: * - selecting attributes: @ - selecting elements using attributes as keys: [@x] - selecting element using attribute and its value as key: [@x='y'] - selecting descendents: descendent:: , descendent-or-self:: - selecting ancestors: ancestor:: , ancestor or self:: - selecting siblings: following-sibling:: , preceding-sibling:: - selecting following and preceding elements: following:: , preceding:: Probable support ---------------- - using the 'and' operator ('|' in xpath) to combine rules - selecting first element: [1] - selecting last element: [last()] - selecting elements that don't have attributes [not(@*)] Not needed ------------ - selecting elements with x number of children elements: count() - selecting element using an attribute value and ignoring leading spaces in the value: normalise-space() - selecting elements according to length of element name - selecting elements in a certain position in a document (using mathematical expressions). - A watcher wishes to get the tuple that has a element with value "IM". The watcher has to either explicitly list all the elements that can appear in a tuple that it wants to receive, or alternatively, it tells the PA to deliver the tuple that has element IM with all the other elements that appear in that tuple. Its like using a key for selecting a whole tuple. The latter can be achieved using the following expression: //*[rpid:class="IM"]/descendant-or-self::* This actually selects the whole tuple only. if the watcher wants to select the tuple and the root element , you would do something like: //*[rpid:class="IM"]/descendant-or-self::* | //*[rpids:label="im"]/ancestor::* - The following is an example of how you can ask a PA to include all tuples that are not of IM: //*[rpid:class="IM"]/following::* | //*[rpid:class="IM"]/preceding::* - A watcher asks the PA to deliver a tuple that has a status of "closed", but it only wants the elements that are not //*[basic="closed"]/following-sibling::* | //*[basic="closed"]/preceding-sibling::* | //*[basic="closed"]/ancestor::tuple vnd and prs URI schemes http://www.ietf.org/internet-drafts/draft-king-vnd-urlscheme-03.txt