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 hotmail.com
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
(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 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=http://xmlns.com/foaf/0.1/ 

     xml:base=http://xmlns.com/foaf/0.1/

 

     xmlns:dc=http://purl.org/dc/elements/1.1/ USED

     xmlns:wgs84_pos=http://www.w3.org/2003/01/geo/wgs84_pos# NOT USED

     xmlns:foaf=http://xmlns.com/foaf/0.1/ USED

     xmlns:terms=http://purl.org/dc/terms/ USED (BUT DISPLAYS AS dcterms,
NOT terms)

     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:rdfs=http://www.w3.org/2000/01/rdf-schema# USED

     xmlns:owl=http://www.w3.org/2002/07/owl# USED

     xmlns:xsd=http://www.w3.org/2001/XMLSchema# USED

     xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns# USED

     xmlns:skos=http://www.w3.org/2004/02/skos/core# NOT USED

    > 

 

    <owl:Ontology rdf:about="http://xmlns.com/foaf/0.1/">

        <dc:title rdf:datatype="&rdf;PlainLiteral">Friend of a Friend (FOAF)
vocabulary</dc:title>

        <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>

    </owl:Ontology>

 

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: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20101114/f263c64a/attachment.html>


More information about the protege-owl mailing list