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] How to detect undefined references in rdf:resource

Bunsz bunsz at
Tue Jan 26 04:03:42 PST 2010

let me explain it in other words.
I'm trying to use owl-ontologies in conjunction with swrl in order to 
perform a semantic verification of specific xml-files. The verification 
goes beyond what is possible with an xml-schema.
So I have three ontologies:
1. a class ontology which consists of class / property definitions and 
some enumeration class definitions and its individuals.
2. a rule ontology which imports the class ontology and contains swrl rules.
3. an individual ontology which imports the rule ontology and which is 
generated out of an xml-file using xslt.

So in my xml-file I have for example:

<street id="Street_5">
<signOnStreet refId="Sign_3" pos="3.2" />
<signOnStreet refId="Sign_4" pos="2.5" />
<sign id="Sign_3">
<function name="stop" />
<function name="pedestrian_crossing_warning" />

Sign_3 is referenced and defined ... not so Sign_4 which is referenced 
only, but not defined. Transforming this xml-file to the individual 
ontology result in sth. like

<rdf:RDF .... >
<Street rdf:ID="Street_5">
<hasSign rdf:resource="#Sign_3"/>
<hasSign rdf:resource="#Sign_4"/>
<Sign rdf:ID="Sign_3">
<hasFunction rdf:datatype="&xsd;string">stop</hasFunction>

And now I want to spot the error of the undefined reference to Sign_4.
This was an example, but in my case it will always be the same situation 
of having an object property which refers to an undefined individual and 
that is what I want to detect.

One can argue that I can transform the xml to another xml with xlink / 
xpointer statements and spot undefined references while validating 
against an xml-schema, but I really would like to know if this can be 
done in owl somehow.

> Actually, Sign_4 is defined in this ontology.
Ok, the n3 notation is not very expressive regarding my issue.
Talking about ontologies ... "mentioned" is not the same as "defined", 
is it?

<hasSign rdf:resource="#Sign_3"/>

is "mentioned" (referenced) and different from

<Sign rdf:ID="Sign_3">

which expresses a definition, am I right?

>   It is explicitly mentioned, and in a context in which it is clear 
> that it must be an Individual.

In my cases it will always be like that: Referenced but undefined 

>   The only way you would get something that doesn't have some implicit 
> type is to have a mention of it where there is no context that allows 
> figuring out if it is a class, property or individual.  So you would 
> need something like
>   default:Something .
> with no other information.  Just about anything else you might say 
> about it would give some clue as to what sort of object it would need 
> to be, and then it would be recognized and treated as such an object.

Picking this up ... is it possible to model following:
Every individual which is not defined (which has no base class but 
owl:Thing) but referenced, can be classified as default:Something ... 
Even if the reference is within an object property, where - by its range 
-  the reasoner can guess that the individual must be for example a Sign?

I hope someone can help me.


More information about the protege-owl mailing list