[Versa] Issue 3
Chimezie Ogbuji
chimezie at gmail.com
Mon Aug 15 10:13:24 MDT 2005
I'll assume by #1 - #3 you are referring to (Uche's points on SPFs):
1. If the SPF is *, it is resolved into a pattern that matches anything
2. If the SPF is a primitive scalar, datatyped literal or resource, it is
resolved into a pattern that must match that string or resource exactly
3. If the SPF is a list or set, it is resolved into a pattern that must
match one of the items in the list or set exactly
4. If the SPF is a function, f, then it is a special filtering function
pattern, and the pattern is equivalent to the resulting list from
filter(<all possible values>, f). (This means that the function must
take each item to be filtered as its first parameter)
> I wonder what we need to change so much syntactically?
>
> Why can't "all() - B -> we("'foo') return statements. Then use
> "object(expression)" or "subject (expression)" to filter the results.
(Just thinking out loud) would that make traversal expessions even
more verbose?:
Consider the query from Versa by Example (to get the labels of all
rdfs:Classes):
(rdfs:Class <- rdf:type - *) - rdfs:label -> *
If traversal operators returned statements (instead of their parts)
you would have to write this as:
objects(subjects(rdfs:Class <- rdf:type - *) - rdfs:label -> *)
> As far is "SPF"s. Isn't "all()" equivalent to "*" already?
'*' is a synonym for true.
> qname("foo",union("a",b")) - map(properties(<rdfs:class>),{. -
> rdfs:subPropertyOf *}), gt("1"^^"xsd:int")
>
> So, using many new ideas
>
> "Give me, all _statements_ where the subject us the URI from the
> expanded prefix "foo" and the local name of "a" or "b".
I'm not sure how your suggesting the qname function would work, but do you mean:
qname(prefix,localNameSet ) => set(prefix:localName1,prefix:localName2,..)
That is, it builds a resource from a single prefix and a *set* of
localNames? That would also be very useful (although I'm not sure why
you are using union in that part of the example)
> The predicate
> is one of the subProperties of any property that is used on the
> resource "rdfs:Class" and the object is the integer value greater then
> one.
If we adopted the way Notation3/Turtle addresses uri's then you
wouldn't need to surround the rdfs:Class with '<' .. '>' since qnames
work the same in both Versa and Notation3/Turtle.
So, assuming we also adopted '>' as syntactic shorthand for gt (which
*might* clash with using '<' .. '>' for explicit Uris - I'm not
comfortable enough with the grammer to know if thihs would be the case
if we adopted both) the query would be?:
qname("foo",set("a",b")) - map(properties(rdfs:Class),{. -
rdfs:subPropertyOf *}) -> > "1"^^xsd:int
To return the 'statements' that match that criteria?
More information about the Versa
mailing list