Search Mailing List Archives
[protege-owl] When do prefixes display when qname option is set?
johna318 at hotmail.com
Sun Nov 14 10:01:52 PST 2010
Now that Im over my installation issue I am back to using protégé and
wondering about prefixes.
I have developed the trick of reading in and then saving out
rdf/xml-formatted ontologies I find on the web to normalize them to the
standard protégé representation. Doing this changes some items
initially displayed as inactive (I assume; not bolded) to active (bolded)
but otherwise seems to have no effect on the ontology or its display.
I examined some normalized forms and also tried making some changes to try
to find the answers to two questions:
(1) When does protégé display a prefixed name as opposed to a bare
unprefixed one when the qnames option is set?
(2) When it displays prefixes, where does it get the prefixes from?
Im pretty sure the two questions are related.
Re (2), I had the hypothesis that it gets the prefixes from the (internal
equivalent) of the set of xmlns namespace prefixes specified in the rdf:RDF
element, and maps URIs to them by looking for an initial subpath of the URI
that matches a value of one of the xmlns prefix URIs. I made a normalized
rdf/xml form of my test ontology, the FOAF rdf
(http://xmlns.com/foaf/0.1/index.rdf), and systematically changed the main
namespace, foaf, to foaf_ja and did the same to the corresponding
protégé-generated ENTITY, and then read the mutated ontology in. I expected
to see the foaf prefix systematically change to foaf_ja in the display, but
it continued to appears as foaf as before the change, and when I saved the
file out a second time it included a foaf xmlns specification in addition to
the foaf_ja one.
Question then is, where did it get foaf from? It didnt occur anywhere in
the altered rdf. Did it somehow get it from the web?
Re (1) when I load the foaf ontology in whatever form, I see some specified
namespace prefixes appear as prefixes in qnames and others not (so that the
names with the URIs in question appear with no prefix), as follow:
(from the normalized but otherwise unchanged rdf):
xmlns:wgs84_pos=http://www.w3.org/2003/01/geo/wgs84_pos# NOT USED
xmlns:terms=http://purl.org/dc/terms/ USED (BUT DISPLAYS AS dcterms,
xmlns:vs=http://www.w3.org/2003/06/sw-vocab-status/ns# NOT USED
xmlns:contact=http://www.w3.org/2000/10/swap/pim/contact# NOT USED
xmlns:wot=http://xmlns.com/wot/0.1/ (ANNOTATION PROPRTTY ONLY -
DISPLAYS AS <URI>)
xmlns:skos=http://www.w3.org/2004/02/skos/core# NOT USED
<dc:title rdf:datatype="&rdf;PlainLiteral">Friend of a Friend (FOAF)
<dc:description rdf:datatype="&rdf;PlainLiteral">The Friend of a
Friend (FOAF) RDF vocabulary, described using W3C RDF Schema and the Web
Seems pretty mysterious to me especially the behavior of wot and term.
I should add that in other ontologies including the resume ones and my own I
see an xmlns namespace prefix specified but not used in the display. Though
there could be another explanation, I assume they are just more examples
like the foaf NOT USED items.
I suppose I could look in the protégé source code but that would really be
opening the floodgates of pointless fiddling. :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the protege-owl