W3C home > Mailing lists > Public > public-cwm-bugs@w3.org > July 2004

a list should still show up as a triple to n3ql

From: Yosi Scharf <syosi@MIT.EDU>
Date: Mon, 12 Jul 2004 16:42:07 -0400
Message-ID: <40F2F79F.7000507@mit.edu>
To: public-cwm-bugs@w3.org
Cc: connolly@w3.org, timbl@w3.org

It was confirmed at a meeting that this is a result of cwm's conversion 
of rdf lists to lists. Timbl said that this is ok, because it does not 
manifest itself to n3 files. Further, treating lists as lists make many 
things in cwm possible / easier.

Perhaps it had no effect on n3 files, but only until until now.
see http://lists.w3.org/Archives/Public/public-cwm-talk/2004JulSep/0005.html

He was trying to simply return a list of his results. Take a look at the 
following, a very minor modification to the query file given there:

@prefix ex: <http://example.org/ex#>.
@prefix q: <http://www.w3.org/2004/ql#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
#@prefix rdf: <http://www.example.com/rdf#> .
[] q:select {[ rdf:first ?x;
  		rdf:rest [ rdf:first ?y; rdf:rest rdf:nil]] };
    q:where { ?x a ex:Librarian; ex:hairColor ?y }.

if we run ../../cwm.py rdql_data1.n3 --think -query=rdql_query1.n3
we get nothing. Now change thr rdf: prefix so the first choice is 
commented out, and rdf:first has no meaning. Now the query works, returning

#Processed by Id: cwm.py,v 1.156 2004/07/06 18:04:18 syosi Exp
         #    using base 
file:/home/syosi/CVS-local/WWW/2000/10/swap/test/includes/rdql_data1.n3

#  Notation3 generation by
#       notation3.py,v 1.158 2004/07/06 18:04:19 syosi Exp

#   Base was: 
file:/home/syosi/CVS-local/WWW/2000/10/swap/test/includes/rdql_data1.n3
      @prefix : <http://www.example.com/rdf#> .
      @prefix ex: <http://example.org/ex#> .

       [      :first ex:Joe;
              :rest  [
                  :first "black";
                  :rest :nil ] ].

       [      :first ex:Mary;
              :rest  [
                  :first "red";
                  :rest :nil ] ].

#ENDS


Yosi
Received on Monday, 12 July 2004 16:42:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:52:00 UTC