RE: N3 question

Andy,

>> but Jena gave
>>   N3toRDF: All statements are asserted - no formulae in RDF
>> ?-)
>
> The N3 parser in Jena is (should be) complete and it does parse this
> expression.

Great - I was actually using
jena.rdfcopy %1 N3 RDF/XML
and was hoping that RDF had formulae :-)

> The error you are getting is when you try to read into an RDF model
because
> and RDF models can't express formulae.  Its only the N3 to RDF conversion
> stage that throws the error - the parser does not care - because its not
> pure RDF.

Right Andy

> An application can access the parser directly if it wants to but it will
> have to do something with the parser output (a stream of quads, with the
an
> slot to record which base formula the triple is in).
>
> You can access just the parser from the command line with:
>
>            java -cp ... jena.n3 <file>
>
> -n turns off the raw parser output.

I wasn't aware of that and it works great indeed i.e. we got

@prefix log:(QNAME) http://www.w3.org/2000/10/swap/log#(URIREF)
@prefix owl:(QNAME) http://www.w3.org/2002/07/owl#(URIREF)
@prefix :(QNAME) http://example.org/eg#(URIREF)
{}:2 [ http://example.org/noone(URIREF) , a(KW_A) , owl:Nothing(QNAME) ]
{}:1 [ http://example.org/liar(URIREF) , log:implies(QNAME) , {}:2(FORMULA)
]
[ {}:1(FORMULA) , owl:sameAs(QNAME) , http://example.org/liar(URIREF) ]

out of

==== liarP.n3
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix : <http://example.org/eg#>.

{
  <http://example.org/liar>
       log:implies {
    <http://example.org/noone> a owl:Nothing .
  } .
} owl:sameAs <http://example.org/liar> .
====

--
Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/

Received on Monday, 17 November 2003 05:58:42 UTC