W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > October 2001

Re: 2001-09-07#5 Literals (use cases/test inputs, please?)

From: Brian McBride <bwm@hplb.hpl.hp.com>
Date: Sun, 21 Oct 2001 08:49:46 +0100
Message-ID: <3BD27E1A.6060602@hplb.hpl.hp.com>
To: Dan Connolly <connolly@w3.org>
CC: Jan Grant <Jan.Grant@bristol.ac.uk>, Jeremy Carroll <jjc@hplb.hpl.hp.com>, w3c-rdfcore-wg <w3c-rdfcore-wg@w3.org>, timbl <timbl@w3.org>

Dan Connolly wrote:

> Brian McBride wrote:
>>Dan Connolly wrote:
>>>What are these use cases?
>>We had 3.  Martyn had one where xml:lang was not used.
> ??? I wonder how that's relevant...

I think it supports your point of view.

>> Jan had one where it
> Jan? Got any example files? What software are you using?
>> Eric had one where it was - though he still owes us a write up of that one.
> That's the one I keep hearing about. I phoned him about it,
> and he said they ended up using properties to represent
> language, not xml:lang.

Ahh.  I wondered about that.  I believe he reported that M&S's treatment of 
xml:lang was fine for their needs.  Did I misunderstand?


> As far as I know, none of the RDF query systems
> allows me to say "show me the english labels
> from the RDFS schema".

Would be trivial in prolog.

I just had a look at RDQL and that does not, but its hardly surprising folks 
don't implement this feature of M&S when its presence in the spec keeps getting 

Surely it can't be that hard to implement;  I did a little hacking on Jena. 
Jena's basic query mechanism uses a selector object:

    iter = model.listStatements(selector)

will return all statements selected by the selector.

There is a dumb selector which matches on the fields of statement, with null 
matching anything.

   iter = model.listStatements(new SelectorImpl(null, RDFS.label, null))

will select all the statements with an RDFS.label property.  I've added a new 
class AnyLiteral which matches any literal with a given language property.  Thus

   iter = model.listStatments(
           new SelectorImpl(

will select all statements with RDFS.label as the property and has a value which
is a literal with a language tag matching "fr".

I haven't tested it thoroughly, but it seems to work.  It does select all the 
french language labels from schema. Ya wanna the code?

This is actually quite a nice model.  Instead of using null to match 'any', 
maybe I should extend what I have done with literals and have AnyResource and 
AnyProperty classes.  They could implement regular expression matching on the 
URI, or match on namespace or whatever.   Hmmm, this trick could be used to 
implement aboutEachPrefix.

Received on Sunday, 21 October 2001 03:54:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:24:05 UTC