W3C home > Mailing lists > Public > www-rdf-interest@w3.org > April 2002

Comments as part of the Graph [was: Re: n3s - A Notation3 Preprocessor]

From: Sean B. Palmer <sean@mysterylights.com>
Date: Tue, 16 Apr 2002 15:01:24 +0100
Message-ID: <00df01c1e54f$340367a0$adbb0150@localhost>
To: <tony_hammond@harcourt.com>
Cc: <www-rdf-interest@w3.org>
> Would you not consider an option to pass comments through
> to the output which since you're pretty printing I'm assuming
> you're also intending this to be for human consumption?

Good question. There are two difficulties that this raises, the first one
being that you can't include comments at all on the command line (-s)
option - the major intended use of n3s - since you can't really include new
lines. Of course, I could define "\n" as a newline, or (*shudder*) use # to
end a comment (that'd be the language extension blunder of the 21st

Which brings us to the second difficulty: comments are difficult to parse,
since you have to treat them separately to the tokenizing process. If you
haven't tokenized yet, how do you know what's really a comment and what's
just (say) a hash in a URI-ref? This is why I should be using Yapps or

In any case, I could quite easily pass through whole line comments to the
output from local/Web files (and I may do if you desparately require the
functionality), but I don't really like the comments construct in N3
anyway; if this is useful information, shouldn't it be part of the graph?
As it's not, do you really need it? There are quite a few N3 files with "#
Title - this file is for x y z" at the top which could quite easily have
the comments converted into a dc:title and dc:description or something.

Moreover, it would be nicer to have some kind of proper annotations
mechanism using some type of RDF Path. There are a few RDF Path proposals
going about, but people don't seem to have caught onto the fact that RDF
is - to a great extent - its own RDF Path syntax, once you add universally
quantified variables. You'd also need something for spanning triples (e.g.
across formulae etc. - painful), but the variables that RDF already has are
probably good enough.

TimBL outlined his sort-of RDF Path syntax (in N3Alternatives [1]) which
are just neat extensions to N3. For example, one might have a comment such
as the following, taken from the EARL test schema:-

earl:email a daml:UnambiguousProperty; rdfs:label "email";
   rdfs:subPropertyOf earl:contactInfo;
   rdfs:seeAlso foaf:mbox .
     # a machine can have an earl:email, but not foaf:mbox

Now I realise that it'd have been better to do something like:-

earl:email$rdfs:seeAlso :annotation
   (<> "a machine can have an earl:email, but not foaf:mbox") .

Neat, eh? A good annotations implementation and an RDF diff program (cf.
[2]) are the two biggest things that I'd like right now for RDF.

Many thanks for the praise and feedback,

[1] http://www.w3.org/DesignIssues/N3Alternatives
[2] http://www.w3.org/DesignIssues/Diff

Kindest Regards,
Sean B. Palmer
@prefix : <http://purl.org/net/swn#> .
:Sean :homepage <http://purl.org/net/sbp/> .
Received on Tuesday, 16 April 2002 10:01:30 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:44:35 UTC