ReoPath (or RPath if you prefer a generic sounding name) This is a language for referring to RDF information using an XPath-like syntax. Here is what I have implemented so far. Types: There are three types currently implemented: Number 25 Literal 'This is a literal' or "This is a literal" Resource {http://www.example.com/stuff#item1} There is also the empty value. There is no boolean type. Any non-empty value is true. Currently only 32-bit positive integers are supported. Indices in lists are one-based. Spaces between operators and other tokens are ignored. Static literals may be concatenated with: 'Literal1''Literal2' You can also create lists of items with syntax like (1,'text','more') Namespaces: name Name in the default namespace rv:name Name in the namespace with the rv prefix {urn:node} Fully qualified resource :{node} Resource in the default namespace rv:{node} Resource in the namespace with the rv prefix Expressions are evaluated relative to a context, which may be a single value or a list of values. Operators: name Returns the target with the name predicate name* Returns all targets with the name predicate ^name Return the name source ^name* Return all name sources . Returns the context (self) @ Returns all resources * Used to indicate an unspecified argument to a function / Return right side using left side as the context %3 Returns the third child of a container ( rdf:_3 ) #3 Returns the third element of a list /* Returns all targets of a context ^* Returns all sources of a context %* Returns all children of a context a=b Returns something if a and b are equal a<>b Returns something if a and b are not equal ab Returns a if it is greater than b (numbers only) a<=b Returns a if it is less than or equal to b (numbers only) a>=b Returns a if it is greater than or equal to b (numbers only) a&b Intersection of elements in a and b a|b Union of elements in a and b a&&b Returns a if both a and b have a value (and) a||b Returns a if it has a value or b if it has a value (or) a+b Returns a plus b (numbers or lists only) a-b Returns a minus b (numbers or lists only) a[b] Returns only elements of a for which b has a value (where) Precendence: / ^ % # /* ^* %* Highest || && & | + - = < > <= >= <> Lowest Parentheses may be used to modify precedence although they do not actually mean this. For instance a | (b + c) returns the union of a and the list containing one element which is the result of b + c. Functions: Most functions take a context expression as the first argument. It is always optional and defaults to the context node. Thus stringlength() and stringlength(.) are generally equivalent. Functions do not cause exceptions unless some implementation error occurs or too few arguments are supplied. stringlength(context) Returns the length of string context startswith(context,str) Returns context if it starts with str endswith(context,str) Returns context if it ends with str contains(context,str) Returns context if it contains str substring(context,[start],[end]) Returns a substring of context from start to end substringbefore(context,str) Returns the substring before the first occurance of str in context substringafter(context,str) Returns the substring after the first occurance of str in context arcsin(context) Returns the predicates pointing out of context arcsout(context) Returns the predicates pointing in to context sublist(context,[start],[end]) Returns a subset of context from start to end count(context) Returns the number of elements in context pos(context,item) Returns the position of item in context not(value) Returns something if value is empty, nothing if in has a value if(value,trueexpr,falseexpr) Returns trueexpr if node has a value, false otherwise repeat(context,expr,[count]) Evaluates expr repeatedly using the previous result as the context. The maximum steps to perform is specified by count. sort(context,expr) Sorts the context using a expr as the sort key chain(node1,node2,[expr],[count]) Returns the nodes to traverse to get from node1 to node2, using expr as the expression to step with. If expr is not specified, it uses any arc. The maximum steps to perform is specified by count. isnum(value) Returns value if it is a number islit(value) Returns value if it is a literal isres(value) Returns value if it is a resource Some things not yet implemented: .. Previous context node .* Top context node @rv:thing Returns all nodes of type rv:thing mult(expr1,[expr2],...) Returns each expression multiplied div(expr1,[expr2]) Returns expr1 divided by expr2 mod(expr1,[expr2]) Returns the remainder of expr1 divided by expr2 concat(str1,[str2],...) Returns the strings concatenated childcount(context) Returns the number of children in container context childpos(context,item) Returns the position of child item in container context min(context,count) Returns the minimum count items max(context,count) Returns the maximum count items uc(context) Returns the context in uppercase lc(context) Returns the context in lowercase (there are numerous other things also) Some examples: Assume the context node is the channel in an RSS 1.0 file and appropriate namespace prefixes have been set up. title Returns the title dc:creator Returns the creator items%1/title Returns the title of the first item items%*/title Returns the titles of all items items%*/description[contains('Dog')] Returns the descriptions that contain 'Dog' "Fun"^dc:subject*/dc:creator Returns the creators of all items with the subject 'Fun' items%3/(title,description) Returns the title and description of the third item sort(items%*,title) Returns the items sorted by title items%*[stringlength(description)<20] Returns the items with a description less than 20 characters