[XESAM] RDF vs .Desktop
Evgeny Egorochkin
phreedom.stdin at gmail.com
Fri May 18 13:42:13 PDT 2007
On Friday 18 May 2007 09:48:29 Mikkel Kamstrup Erlandsen wrote:
> 2007/5/17, Evgeny Egorochkin <phreedom.stdin at gmail.com>:
> > Just realized that I KISSed examples too much and didn't notice a
> > mistake. Need to sleep more :( and stop talking to myself...
> >
> > Anyway, resource has to have a prefix: or has to be included in <>
> > brackets.
> >
> > Also, I changed field naming to xesam:Audio.composer. This seems to be
> > better
> > due to Jamie's wish to explicitly link DC and other external ontologies.
> > I don't object this either.
> >
> > These two examples now look like this:
> >
> > ========= #1 ======================
> > =====================================
> > @prefix DC: <http://freedesktop.org/standards/DC#>
> > @prefix xesam: <http://freedesktop.org/standards/xesam#>
> > @prefix : <
> > http://freedesktop.org/standards/xesam_base#>
> >
> > xesam:Audio.Composer
> > a :field;
> >
> > :of_type :string;
> > :has_parent DC:Creator;
> > :name "Composer"@EN;
> > :name "Композитор"@RU;
> > :description "Audio composer".
> >
> > =====================================
> >
> > ========= #2 =======================
> > You can map rdf:Property to something other like file:Property
> > not sure which is better. Any ideas for the prefix since xesam: is now
> > used?
> > I still strongly advise to use #2 an not #1.
> > =====================================
> > @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
> > @prefix DC: <http://freedesktop.org/standards/DC#>
> > @prefix type: <http://freedesktop.org/standards/xesam_base#>
> > @prefix xesam: <http://freedesktop.org/standards/xesam#>
> > @prefix : <http://www.w3.org/2000/01/rdf-schema#>
> >
> > xesam:Audio.Composer
> > a rdf:Property;
> >
> > :range type:string;
> > :subPropertyOf DC:Creator;
> > :label "Composer"@EN;
> > :label "Композитор"@RU;
> > :comment "Audio composer".
> >
> > =====================================
> >
> > Will re-check this when I wake up once more :)
> >
> > Sorry for confusion.
>
> Thanks the examples. I think it looks unintuitive that the "a" entry does
> not have a :-prefix while the others don't. Also this format clearly
> contain superfluous characters, like the leading :'s and trailing ;'s. If
> you write a .desktop file it is pretty hard getting syntax errors...
If the #1 you can replace a with :a, :is_a or whatever else you like. It
doesn't matter since it doesn't use RDFS.
In the second one you are stuck either with a,rdf:type, some prefix:type. It
maybe possible to change the name completely, though I'd better check first
if this is a good idea.
.Desktop too has superfluous characters like = or ] :)
> I liked the first example in your first mail the best, but I'm a bit
> confused now... Was it valid or invalid? - And why did your prefer the one
> with redundant characters?
My idea was that we define a base for all URIs with @base. So we can use
simple URIs like string, type or whatever. However after carefully looking at
the formal grammar, I discovered, that you either have specify a prefix(even
an empty one like ":") or have to enclose the URI in <> brackets, so I chose
the empty prefix.
If course it's possible to deviate form the spec, but it doesn't help the
interoperability.
As to the differences between #1 and #2.
#2 is a valid RDFS: Viz tools understand it. Ontology introspection/mapping is
possible because RDFS is what is used to describe ontologies. Other software
will consider these files an ontology definition as is.
#1 is a valid RDF: Viz tools work just fine. Ontology mapping is still
possible, however software must be provided with a proper xesam-rdfs mapping
data to consider these files an ontology, and not just a RDF data set.
--Evgeny
More information about the xdg
mailing list