[Versa] More on literal queries
Uche Ogbuji
uche.ogbuji at fourthought.com
Fri Sep 9 11:17:25 MDT 2005
On Mon, 2005-09-05 at 12:21 -0600, Michael Olson wrote:
> >
> > I think I follow about 50% of all this (again back to my comments about
> > RDF having turned itself into an inscrutable mess).
> >
> > My position comes from the simplest point of view. I would be bloody
> > surprised if the result of an XPath query "3.0" was the empty node set
> > just because I didn't happen to have that literal value anywhere in my
> > XML.
> >
> > I daresay any user would be surprised to see the same weirdness in
> > Versa.
> >
>
> What is the purpose of the query "3.0"? Is it just to fire up the old
> parser to make sure it work? Because you would not get any meaningful
> information from the RDF model from that query.
Same as the purpose of the XPath query "3.0", or in SQL (an expr is as
valid as a selectExpr). It's the simple principle of composition in
query languages. Old as the hills, and it works.
> So, we should either not support it, unless like in the case of XPath
> it becomes easier to support it then not support it, or we should have
> it be a meaningful query. To me, it is a meaningful query and nice
> short hand over
>
> filter(all(),type(rdfs:Literal),eq("3.0"))
Having "3.0" return "3.0" is perfectly meaningful. "meaning" has
nothing to do with whether or not it touches the problem space for the
subquery in question.
Versa 1.0 supported "3.0" and was perfectly fine for all that. Versa
2.0 should, as well.
If you want shorthand, we can find shorthand, but let's not play baroque
games with subexpression semantics just to save keystrokes.
>
>
> > I will comment on one thing you say:
> >
> >> If however, we wish to support a higher level of semantics in the
> >> Versa
> >> language, then I see no other path then to use the rdf semantics as a
> >> guide. If we don't, then how do we expect others to implement Versa
> >> as
> >> a RDF query language if the language itself is not designed to work
> >> with a RDF model?
> >
> > One thing I do know about the battle to turn RDF into CGng is that RDF
> > was *not* changed to assert a closed world assumption. Whether or not
> > someone chooses closed or open world assumptions is up to them.
> >
> > As such, there is nothing in the RDF semantics that says that "if
> > one particular graph does not have an instance of a resource, that
> > resource does not exist". If there were, it would not work for the
> > Web.
> >
> > In short, I don't believe there is anything in RDF semantics that
> > mandates the closed world context you're advocating.
> >
>
> I guess I don't follow you. Nothing I've said is closed world in my
> mind. I've never stated that if the resource does not exists in our
> model then it exists no where. What I did state is that if you query
> the model for that resource and it does not exists in that model, then
> the results should be an empty set.
My comment was on specifically what I quoted. You're changing the
subject in the above. You originally, in effect, stated that the Versa
1.0 approach "is not designed to work with a RDF model?", which is
patently false. I could only assume that you were taking on a very
blinkered view of what an RDF model is.
> Are you saying that the results should always contain the resource
> because we must assume that it exists some where? I hope not because
> that would be silly.
Again, you're assuming I'm taking your view of how Versa models the
problem space, but I'm pointing out that I fundamentally reject your
view of it. I'm not even saying the results should "contain" any
resource at all (whatever that would mean). I'm saying it should have a
resource *name*, which is precisely what we asked for. I've never had
the urge to say, as Topic Maps people do, that "the map is not the
territory", but boy do you tempt me.
--
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://fourthought.com
http://copia.ogbuji.net http://4Suite.org
Use CSS to display XML, part 2 - http://www-128.ibm.com/developerworks/edu/x-dw-x-xmlcss2-i.html
XML Output with 4Suite & Amara - http://www.xml.com/pub/a/2005/04/20/py-xml.html
Use XSLT to prepare XML for import into OpenOffice Calc - http://www.ibm.com/developerworks/xml/library/x-oocalc/
Schema standardization for top-down semantic transparency - http://www-128.ibm.com/developerworks/xml/library/x-think31.html
More information about the Versa
mailing list