On 17/11/11 01:18, Kevin Corcoran wrote:
Thanks, all, for the help and clarifications.  I've got another issue with
getNameSpace() and I figured I'd ask it here, as opposed to starting
another thread.

Once again, I'm using SUMO ( http://www.ontologyportal.org/SUMO.owl# ) as
my test case.  As was pointed out in answering my last question, this
serialization has known problems, and I'm ready and willing to believe that
SUMO is once again doing something wrong here.  Anyway, on to the question.

SUMO.owl defines a class :

<owl:Class rdf:about="TheaterProfession">
   <rdfs:isDefinedBy rdf:resource="http://www.ontologyportal.org/SUMO.owl"/>
   ...
</owl:Class>



I have an OntClass instance for this class (TheaterProfession).  When I
call .getNameSpace() on that object, I get "
http://www.ontologyportal.org/TheaterProfession";.  I think I *should* get "
http://www.ontologyportal.org/SUMO.owl#TheaterProfession";.  The default
namespace for the ontology is defined as :

<rdf:RDF
xmlns="http://www.ontologyportal.org/SUMO.owl#";



Adding xml:base="http://www.ontologyportal.org/SUMO.owl#"; has no effect.
  Any help is greatly appreciated.  Thanks,

rdf:about is concerned with URI resolution, not simple concatentation.
rdf:ID is concerned with fragments

rdf:about takes any URI:
rdf:about="http://example/foobar";


Consider the URL:

http://example/dir/page.html

and in that

<a href="page2.html">...</a>

so the base is <http://example/dir/page.html> and the relative URI is <page2.html>

You would expect to navigate to

http://example/dir/page2.html



Now consider

rdf:about="TheaterProfession"
so <TheaterProfession> is the relative URI and the base is <http://www.ontologyportal.org/SUMO.owl#>

so you get

<http://www.ontologyportal.org/TheaterProfession>

Try a base of
<http://www.ontologyportal.org/SUMO.owl>
and
rdf:about="#TheaterProfession"

or
http://www.ontologyportal.org/SUMO.owl#
rdf:ID="TheaterProfession"

http://www.w3.org/TR/REC-rdf-syntax/#section-Syntax-ID-xml-base

rdf:ID="abc" is the same as rdf:about="#abc"

        Andy


Kevin


Reply via email to