Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] When do prefixes display when qname option is set?

John Armstrong johna318 at
Sun Nov 14 10:01:52 PST 2010

Now that I’m 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?


I’m 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
(, 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 didn’t 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):


<rdf:RDF xmlns= 



     xmlns:dc= USED

     xmlns:wgs84_pos= NOT USED

     xmlns:foaf= USED

     xmlns:terms= USED (BUT DISPLAYS AS dcterms,
NOT terms)

     xmlns:vs= NOT USED

     xmlns:contact= NOT USED


     xmlns:rdfs= USED

     xmlns:owl= USED

     xmlns:xsd= USED

     xmlns:rdf= USED

     xmlns:skos= NOT USED



    <owl:Ontology rdf:about="">

        <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
Ontology Language.</dc:description>



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. :)


-- John




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the protege-owl mailing list