Re: Use case: find all the triples which do or do not use a URI from a namespace

On Apr 16, 2004, at 12:24, ext Steve Harris wrote:

>
>
> On Fri, Apr 16, 2004 at 10:31:24 +0300, Patrick Stickler wrote:
>> On Apr 15, 2004, at 20:28, ext Pat Hayes wrote:
>>> The developer wishes to be able to detect when any such triples occur
>>> in an RDF graph, to extract them all when they do occur, and also to
>>> be able to extract all triples which do not use any name in this
>>> reserved namespace. To do this, a query which matches any triple with
>>> a property name in a set of namespaces would be a useful feature, for
>>> example in an ad-hoc notation:
>>>
>>> (?x {+<codelay:>  +<cadegra:>}?y ?z .)
>>
>> Are you refering to namespace prefixes here? How can one do this since
>> (a) there are no qnames, nor namespaces, in RDF (regardless of what
>> syntactic machinery might be employed in RDF/XML or any other
>> serialization
>> of an RDF graph) and (b) there is no reliable way to deduce any
>> namespace
>> prefix from an arbitrary URI.
>
> That's true from the query engines persepctive, but as the author of a
> query you can state that you are interested in URIs with a given 
> prefix.
> Effectivly stating that it is a namespace. From the engines p.o.v. it 
> can
> then do a substring match, RDQL it could be something like
>
> AND ?uri LIKE <http://my.domain/namepsace#%>
>
> with appologies ;)
>
> - Steve
>

Right. Like I said in a subsequent posting, this then falls under the
general use case of regular expression matching of node labels (which
is firmly outside the scope of the RDF MT, albeit justified by what
seems to be an agreed and desirable level of utility).

Still, if the goal is to model vocabularies, then hacks based on
looking into the lexical form of URIs are the wrong way to go, IMO.

Patrick


--

Patrick Stickler
Nokia, Finland
patrick.stickler@nokia.com

Received on Friday, 16 April 2004 06:12:35 UTC