F
Fredrik Henricsson
Hey, I'm building an ontology in Protégé and I want to transform parts of it
(e.g. the instances) to HTML with XSL. When I was transforming another file
with 'simple' XML-tags like <author> before, I got it working, but the
OWL-file is formatted differently and I don't know how to access the
elements. I'll post the .owl file below, but this is basically what I want
to get from the file (the course name):
</Course>
Any kind of help is appreciated.
The OWL-file:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="MasterAI.xsl"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlnswl="http://www.w3.org/2002/07/owl#"
xmlns="http://www.owl-ontologies.com/unnamed.owl#"
xml:base="http://www.owl-ontologies.com/unnamed.owl">
<owl:Ontology rdf:about=""/>
<owl:Class rdf:ID="Programme">
<rdfs:subClassOf>
<owl:Class rdf:ID="MasterAI"/>
</rdfs:subClassOf>
<owl:disjointWith>
<owl:Class rdf:ID="University"/>
</owl:disjointWith>
<owl:disjointWith>
<owl:Class rdf:ID="Course"/>
</owl:disjointWith>
<owl:equivalentClass>
<owl:Class>
<owl:intersectionOf rdfarseType="Collection">
<owl:Restriction>
<owl:allValuesFrom>
<owl:Class rdf:about="#Course"/>
</owl:allValuesFrom>
<owlnProperty>
<owl:ObjectProperty rdf:ID="hasCourse"/>
</owlnProperty>
</owl:Restriction>
<owl:Restriction>
<owlnProperty>
<owl:ObjectProperty rdf:about="#hasCourse"/>
</owlnProperty>
<owl:someValuesFrom>
<owl:Class rdf:about="#Course"/>
</owl:someValuesFrom>
</owl:Restriction>
</owl:intersectionOf>
</owl:Class>
</owl:equivalentClass>
</owl:Class>
<owl:Class rdf:about="#Course">
<owl:disjointWith>
<owl:Class rdf:about="#University"/>
</owl:disjointWith>
<rdfs:subClassOf rdf:resource="#MasterAI"/>
<owl:disjointWith rdf:resource="#Programme"/>
</owl:Class>
<owl:Class rdf:about="#University">
<rdfs:subClassOf rdf:resource="#MasterAI"/>
<owl:disjointWith rdf:resource="#Course"/>
<owl:equivalentClass>
<owl:Class>
<owl:intersectionOf rdfarseType="Collection">
<owl:Restriction>
<owlnProperty>
<owl:ObjectProperty rdf:ID="hasProgramme"/>
</owlnProperty>
<owl:allValuesFrom rdf:resource="#Programme"/>
</owl:Restriction>
<owl:Restriction>
<owl:someValuesFrom rdf:resource="#Programme"/>
<owlnProperty>
<owl:ObjectProperty rdf:about="#hasProgramme"/>
</owlnProperty>
</owl:Restriction>
</owl:intersectionOf>
</owl:Class>
</owl:equivalentClass>
<owl:disjointWith rdf:resource="#Programme"/>
</owl:Class>
<owl:Class rdf:ID="ProgrammeAI">
<rdfs:subClassOf rdf:resource="#Programme"/>
</owl:Class>
<owl:ObjectProperty rdf:about="#hasProgramme">
<rdfs:domain rdf:resource="#University"/>
<rdf:type
rdf:resource="http://www.w3.org/2002/07/owl#InverseFunctionalProperty"/>
<rdfs:range rdf:resource="#Programme"/>
<owl:inverseOf>
<owl:FunctionalProperty rdf:ID="isProgrammeOf"/>
</owl:inverseOf>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:about="#hasCourse">
<rdfs:range rdf:resource="#Course"/>
<rdfs:domain rdf:resource="#Programme"/>
<owl:inverseOf>
<owl:ObjectProperty rdf:ID="isCourseOf"/>
</owl:inverseOf>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:about="#isCourseOf">
<rdfs:domain rdf:resource="#Course"/>
<owl:inverseOf rdf:resource="#hasCourse"/>
<rdfs:range rdf:resource="#Programme"/>
</owl:ObjectProperty>
<owlatatypeProperty rdf:ID="CourseName">
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:domain rdf:resource="#Course"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
</owlatatypeProperty>
<owlatatypeProperty rdf:ID="CourseECTS">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
<rdfs:domain rdf:resource="#Course"/>
</owlatatypeProperty>
<owl:FunctionalProperty rdf:ID="ProgrammeName">
<rdfs:domain rdf:resource="#Programme"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
</owl:FunctionalProperty>
<owl:FunctionalProperty rdf:ID="UniversityName">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:domain rdf:resource="#University"/>
</owl:FunctionalProperty>
<owl:FunctionalProperty rdf:about="#isProgrammeOf">
<owl:inverseOf rdf:resource="#hasProgramme"/>
<rdfs:range rdf:resource="#University"/>
<rdfs:domain rdf:resource="#Programme"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
</owl:FunctionalProperty>
<isProgrammeOf>
</University>
</isProgrammeOf>
</ProgrammeAI>
</rdf:RDF>
(e.g. the instances) to HTML with XSL. When I was transforming another file
with 'simple' XML-tags like <author> before, I got it working, but the
OWL-file is formatted differently and I don't know how to access the
elements. I'll post the .owl file below, but this is basically what I want
to get from the file (the course name):
....Advanced Knowledge Technology</CourseName>
</Course>
Any kind of help is appreciated.
The OWL-file:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="MasterAI.xsl"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlnswl="http://www.w3.org/2002/07/owl#"
xmlns="http://www.owl-ontologies.com/unnamed.owl#"
xml:base="http://www.owl-ontologies.com/unnamed.owl">
<owl:Ontology rdf:about=""/>
<owl:Class rdf:ID="Programme">
<rdfs:subClassOf>
<owl:Class rdf:ID="MasterAI"/>
</rdfs:subClassOf>
<owl:disjointWith>
<owl:Class rdf:ID="University"/>
</owl:disjointWith>
<owl:disjointWith>
<owl:Class rdf:ID="Course"/>
</owl:disjointWith>
<owl:equivalentClass>
<owl:Class>
<owl:intersectionOf rdfarseType="Collection">
<owl:Restriction>
<owl:allValuesFrom>
<owl:Class rdf:about="#Course"/>
</owl:allValuesFrom>
<owlnProperty>
<owl:ObjectProperty rdf:ID="hasCourse"/>
</owlnProperty>
</owl:Restriction>
<owl:Restriction>
<owlnProperty>
<owl:ObjectProperty rdf:about="#hasCourse"/>
</owlnProperty>
<owl:someValuesFrom>
<owl:Class rdf:about="#Course"/>
</owl:someValuesFrom>
</owl:Restriction>
</owl:intersectionOf>
</owl:Class>
</owl:equivalentClass>
</owl:Class>
<owl:Class rdf:about="#Course">
<owl:disjointWith>
<owl:Class rdf:about="#University"/>
</owl:disjointWith>
<rdfs:subClassOf rdf:resource="#MasterAI"/>
<owl:disjointWith rdf:resource="#Programme"/>
</owl:Class>
<owl:Class rdf:about="#University">
<rdfs:subClassOf rdf:resource="#MasterAI"/>
<owl:disjointWith rdf:resource="#Course"/>
<owl:equivalentClass>
<owl:Class>
<owl:intersectionOf rdfarseType="Collection">
<owl:Restriction>
<owlnProperty>
<owl:ObjectProperty rdf:ID="hasProgramme"/>
</owlnProperty>
<owl:allValuesFrom rdf:resource="#Programme"/>
</owl:Restriction>
<owl:Restriction>
<owl:someValuesFrom rdf:resource="#Programme"/>
<owlnProperty>
<owl:ObjectProperty rdf:about="#hasProgramme"/>
</owlnProperty>
</owl:Restriction>
</owl:intersectionOf>
</owl:Class>
</owl:equivalentClass>
<owl:disjointWith rdf:resource="#Programme"/>
</owl:Class>
<owl:Class rdf:ID="ProgrammeAI">
<rdfs:subClassOf rdf:resource="#Programme"/>
</owl:Class>
<owl:ObjectProperty rdf:about="#hasProgramme">
<rdfs:domain rdf:resource="#University"/>
<rdf:type
rdf:resource="http://www.w3.org/2002/07/owl#InverseFunctionalProperty"/>
<rdfs:range rdf:resource="#Programme"/>
<owl:inverseOf>
<owl:FunctionalProperty rdf:ID="isProgrammeOf"/>
</owl:inverseOf>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:about="#hasCourse">
<rdfs:range rdf:resource="#Course"/>
<rdfs:domain rdf:resource="#Programme"/>
<owl:inverseOf>
<owl:ObjectProperty rdf:ID="isCourseOf"/>
</owl:inverseOf>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:about="#isCourseOf">
<rdfs:domain rdf:resource="#Course"/>
<owl:inverseOf rdf:resource="#hasCourse"/>
<rdfs:range rdf:resource="#Programme"/>
</owl:ObjectProperty>
<owlatatypeProperty rdf:ID="CourseName">
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:domain rdf:resource="#Course"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
</owlatatypeProperty>
<owlatatypeProperty rdf:ID="CourseECTS">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
<rdfs:domain rdf:resource="#Course"/>
</owlatatypeProperty>
<owl:FunctionalProperty rdf:ID="ProgrammeName">
<rdfs:domain rdf:resource="#Programme"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
</owl:FunctionalProperty>
<owl:FunctionalProperty rdf:ID="UniversityName">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:domain rdf:resource="#University"/>
</owl:FunctionalProperty>
<owl:FunctionalProperty rdf:about="#isProgrammeOf">
<owl:inverseOf rdf:resource="#hasProgramme"/>
<rdfs:range rdf:resource="#University"/>
<rdfs:domain rdf:resource="#Programme"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
</owl:FunctionalProperty>
<isCourseOf>Advanced Knowledge Technology</CourseName>
<hasCourse rdf:resource="#AdvancedKnowledgeTechnology"/>Mens-Machine Communicatie en Artificial Intelligence</ProgrammeName>
<isProgrammeOf>
<hasProgramme rdf:resource="#MensMachineCommunicatie"/>Groningen(RuG)</UniversityName>
</University>
</isProgrammeOf>
</ProgrammeAI>
</Course>5.0</CourseECTS>
</rdf:RDF>