On 10 Nov 2011, at 00:48, Kevin Corcoran wrote:
> 
> To give a very brief description of my situation:
> * I've got a namespace with a prefix defined in the opening <rdf:RDF> tag.
> ( xmlns:wn="http://www.ontologyportal.org/WordNet.owl#"; )
> * An element in the namespace is referenced using the prefix (

> <subsumingRelation rdf:resource="*wn#WN30-201691057*"/> 

Aha!

That does not mean what you think it means.

1) wn#WN... is not how you use prefixes in any RDF syntax. However...
2) You can't use prefixes in rdf:resource anyway.

In rdf/xml you only use namespaces in elements, e.g.

<ex:MyClass ...>
  <ex:myProp ...>

rdf:resource and rdf:about take URIs, in much the same way as href in html. So 
you should write:

<subsumingRelation 
rdf:resource="http://www.ontologyportal.org/WordNet.owl#WN30-201691057*"/>

> * When getNameSpace() is called on the Resource which represents the object
> of that triple, it returns http://www.ontologyportal.org/wn# - which seems
> to be a weird mash-up of the actual namespace and it's prefix.

What's happening is:

1) The resource is given as "wn#WN30-201691057*"
2) That's not an absolute URI, so (like href) we resolve it relative the 
document base.
3) I assume the document base is something like 
http://www.ontologyportal.org/...something..., and I would guess 
http://www.ontologyportal.org/WordNet.owl ?

Resolving results in http://www.ontologyportal.org/wn#WN30-201691057*

If I'm right about the base, try rdf:resource="#WN30-201691057*".

Damian

Reply via email to