Re: owl:sameAs assertions in RDFa

On 01/04/2013 20:39, Gregg Kellogg wrote:
>  >
>  > Thanks Gregg - yes that was my experience, I first tried to do this
> object-to-subject switch with @property and it failed, but @rel worked.
>
> People found this behavior confusing, so it's not in RDFa 1.1 Lite, but
> any conforming RDFa 1.1 processor will understand chaining with @rel.
>
>  > I'm having trouble with getting the owl: prefix declared with
> anything other than a local @xmlns on the <span>, which I suspect is not
> even legal.
>
> Note that owl: is pre-defined in the RDFa 1.1 initial context. If you're
> not seeing this, then the processor your using is not properly loading
> the initial context.
>
>  > So far I've tried the following approaches:
>  >
>  > 1. <span prefix="owl:http://www.w3.org/2002/07/owl#" rel="owl:sameAs"
> resource="http://dbpedia.org/resource/Buckinghamshire_County_Council"></span>
>
> You need whitespace between the "owl" and the ":http:...", such as the
> following:
>
> <span prefix="owl: http://www.w3.org/2002/07/owl#" rel="owl:sameAs"
> resource="http://dbpedia.org/resource/Buckinghamshire_County_Council"></span>
>
> @xmlns is deprecated, and really shouldn't be used with HTML5. Add that
> space, and it works on my distiller.
>
>  > 2. <span vocab="http://www.w3.org/2002/07/owl#" rel="sameAs"
> resource="http://dbpedia.org/resource/Buckinghamshire_County_Council"></span>
>
> That works in my distiller, but seems painful!
>
>  > 3. <span xmlns:owl="http://www.w3.org/2002/07/owl#" rel="owl:sameAs"
> resource="http://dbpedia.org/resource/Buckinghamshire_County_Council"></span>
>
> That will work, but you're using the deprecated @xmlns prefix definition
> path.
>
>  > In each case I have run against your RDF extractor using the example
> file here [1], only option 3 generates the desired sameAs statement.
>  >
>  > I note your point above about owl being included in the initial RDFa
> context. Perhaps I am breaking that by declaring xmlns:rnews in the
> document's <html> element
>
> No, that shouldn't break anything. All these variations (with the
> correction in 1.) work on my distiller, note you can use the "From Form
> Input" tab to copy-and-paste such examples. They also work on the W3C
> RDFa distiller [3]
>
> If you'd like to discuss on IRC, i'm "gkellogg" on W3 and Freenode. I
> hang out at #rdfa on irc.w3.org.
>
> Gregg
>
> [3] http://www.w3.org/2012/pyRdfa/#distill_by_input
>
>  > JT
>  >
>  > [1] http://www.topdrawersausage.net/rnews-example.html
>  >
>  >
>

Many thanks for the pointers with this Gregg. I traced the issue back to 
the DOCTYPE declaration in my source document, which was:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" 
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

You had explained previously that the feature I was using was part of 
RDFa 1.1, and that the owl vocab was pre-defined in the RDFa-1.1 default 
context, so when I changed the DOCTYPE to

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" 
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

and then re-ran against your tool my extra owl:sameAs statement showed 
up fine.

For some reason it still doesn't show up in the W3C tool though. I made 
a simpler version of my HTML doc, here are the results when running the 
same doc against the two tools:

http://rdf.greggkellogg.net/distiller?format=turtle&in_fmt=rdfa&uri=http://www.topdrawersausage.net/RDFa-test.html

http://www.w3.org/2007/08/pyRdfa/extract?format=turtle&uri=http://www.topdrawersausage.net/RDFa-test.html

They look similar but the W3C tool does not extract that final statement:

<http://www.bbc.co.uk/things/4c0ccb99-7042-49e5-bb44-338b540441eb#id> 
owl:sameAs <http://dbpedia.org/resource/Buckinghamshire_County_Council> .

I wonder if this is because it is not loading the owl vocabulary into 
it's initial context?


JT

Received on Tuesday, 2 April 2013 17:22:12 UTC