File extensions vs namespaces?

View: New views
3 Messages — Rating Filter:   Alert me  

File extensions vs namespaces?

by Brad Cox-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've been searching for a way to build ontologies that raise the least  
possible uncertainties/questions with my users and keep stumbling over  
what's probably a simple problem. Hope someone here can help:

Here's the pattern I use now.

<rdf:RDF
        ...
        xmlns:core="http://fed.gov/ontology/2009/07/core#"
        xmlns:dod="http://fed.gov/ontology/2009/07/dod#"
        xmlns:pmbc="http://fed.gov/ontology/2009/07/pmbc#"
        xml:base="http://fed.gov/ontology/2009/07/dod"
 >
        <owl:Ontology rdf:about="">
                <rdfs:comment>A comment</rdfs:comment>
                <rdfs:label>{$file}</rdfs:label>
                <owl:imports rdf:resource="http://fed.gov/ontology/2009/07/ 
core"/>
                ...
        </owl:Ontology>

This works so long as the target of those owl:imports have no  
extension. If I move "core" to "core.owl" (to stop tools like Protege  
from refusing to even consider extension-less filenames), the only way  
I can make things work is to rejigger the whole file
so that the namespace is core.owl too. There are about a half-dozen  
such cases; core, pmbc, dod, etc.

I want the file/resource name to be pmbc.owl but the namespace to be http://fed.gov/ontology/2009/07/pmbc# 
.

        xmlns:pmbc="http://fed.gov/ontology/2009/07/pmbc#"

Is that possible?


Re: File extensions vs namespaces?

by Danny Ayers :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/7/28 Brad Cox <bradjcox@...>:

> I want the file/resource name to be pmbc.owl but the namespace to be
> http://fed.gov/ontology/2009/07/pmbc#.
>
>        xmlns:pmbc="http://fed.gov/ontology/2009/07/pmbc#"
>
> Is that possible?

Have you tried e.g. the file pmbc.owl containing

    <owl:Ontology rdf:about="http://fed.gov/ontology/2009/07/pmbc#">
    ...

Cheers,
Danny.



--
http://danny.ayers.name


Re: File extensions vs namespaces?

by Brad Cox, Ph.D. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

No, never thought to try that. Thought that was always supposed to be  
rdf:about="". Bad me.

On Jul 28, 2009, at 2:52 AM, Danny Ayers wrote:

> 2009/7/28 Brad Cox <bradjcox@...>:
>
>> I want the file/resource name to be pmbc.owl but the namespace to be
>> http://fed.gov/ontology/2009/07/pmbc#.
>>
>>        xmlns:pmbc="http://fed.gov/ontology/2009/07/pmbc#"
>>
>> Is that possible?
>
> Have you tried e.g. the file pmbc.owl containing
>
>    <owl:Ontology rdf:about="http://fed.gov/ontology/2009/07/pmbc#">
>    ...
>
> Cheers,
> Danny.
>
>
>
> --
> http://danny.ayers.name