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 rdf:ID="Advance dKnowledgeTechn ology">
<CourseName rdf:datatype="h ttp://www.w3.org/2001/XMLSchema#strin g"[color=blue]
>Advanced Knowledge Technology</CourseName>[/color]
....
</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="htt p://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="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="Program me">
<rdfs:subClassO f>
<owl:Class rdf:ID="MasterA I"/>
</rdfs:subClassOf >
<owl:disjointWi th>
<owl:Class rdf:ID="Univers ity"/>
</owl:disjointWit h>
<owl:disjointWi th>
<owl:Class rdf:ID="Course"/>
</owl:disjointWit h>
<owl:equivalent Class>
<owl:Class>
<owl:intersecti onOf rdf:parseType=" Collection">
<owl:Restrictio n>
<owl:allValuesF rom>
<owl:Class rdf:about="#Cou rse"/>
</owl:allValuesFr om>
<owl:onProperty >
<owl:ObjectProp erty rdf:ID="hasCour se"/>
</owl:onProperty>
</owl:Restriction >
<owl:Restrictio n>
<owl:onProperty >
<owl:ObjectProp erty rdf:about="#has Course"/>
</owl:onProperty>
<owl:someValues From>
<owl:Class rdf:about="#Cou rse"/>
</owl:someValuesF rom>
</owl:Restriction >
</owl:intersectio nOf>
</owl:Class>
</owl:equivalentC lass>
</owl:Class>
<owl:Class rdf:about="#Cou rse">
<owl:disjointWi th>
<owl:Class rdf:about="#Uni versity"/>
</owl:disjointWit h>
<rdfs:subClassO f rdf:resource="# MasterAI"/>
<owl:disjointWi th rdf:resource="# Programme"/>
</owl:Class>
<owl:Class rdf:about="#Uni versity">
<rdfs:subClassO f rdf:resource="# MasterAI"/>
<owl:disjointWi th rdf:resource="# Course"/>
<owl:equivalent Class>
<owl:Class>
<owl:intersecti onOf rdf:parseType=" Collection">
<owl:Restrictio n>
<owl:onProperty >
<owl:ObjectProp erty rdf:ID="hasProg ramme"/>
</owl:onProperty>
<owl:allValuesF rom rdf:resource="# Programme"/>
</owl:Restriction >
<owl:Restrictio n>
<owl:someValues From rdf:resource="# Programme"/>
<owl:onProperty >
<owl:ObjectProp erty rdf:about="#has Programme"/>
</owl:onProperty>
</owl:Restriction >
</owl:intersectio nOf>
</owl:Class>
</owl:equivalentC lass>
<owl:disjointWi th rdf:resource="# Programme"/>
</owl:Class>
<owl:Class rdf:ID="Program meAI">
<rdfs:subClassO f rdf:resource="# Programme"/>
</owl:Class>
<owl:ObjectProp erty rdf:about="#has Programme">
<rdfs:domain rdf:resource="# University"/>
<rdf:type
rdf:resource="h ttp://www.w3.org/2002/07/owl#InverseFunc tionalProperty"/>
<rdfs:range rdf:resource="# Programme"/>
<owl:inverseO f>
<owl:Functional Property rdf:ID="isProgr ammeOf"/>
</owl:inverseOf>
</owl:ObjectPrope rty>
<owl:ObjectProp erty rdf:about="#has Course">
<rdfs:range rdf:resource="# Course"/>
<rdfs:domain rdf:resource="# Programme"/>
<owl:inverseO f>
<owl:ObjectProp erty rdf:ID="isCours eOf"/>
</owl:inverseOf>
</owl:ObjectPrope rty>
<owl:ObjectProp erty rdf:about="#isC ourseOf">
<rdfs:domain rdf:resource="# Course"/>
<owl:inverseO f rdf:resource="# hasCourse"/>
<rdfs:range rdf:resource="# Programme"/>
</owl:ObjectPrope rty>
<owl:DatatypePr operty rdf:ID="CourseN ame">
<rdfs:range rdf:resource="h ttp://www.w3.org/2001/XMLSchema#strin g"/>
<rdfs:domain rdf:resource="# Course"/>
<rdf:type rdf:resource="h ttp://www.w3.org/2002/07/owl#FunctionalP roperty"/>
</owl:DatatypePro perty>
<owl:DatatypePr operty rdf:ID="CourseE CTS">
<rdf:type rdf:resource="h ttp://www.w3.org/2002/07/owl#FunctionalP roperty"/>
<rdfs:range rdf:resource="h ttp://www.w3.org/2001/XMLSchema#float "/>
<rdfs:domain rdf:resource="# Course"/>
</owl:DatatypePro perty>
<owl:Functional Property rdf:ID="Program meName">
<rdfs:domain rdf:resource="# Programme"/>
<rdf:type rdf:resource="h ttp://www.w3.org/2002/07/owl#DatatypePro perty"/>
<rdfs:range rdf:resource="h ttp://www.w3.org/2001/XMLSchema#strin g"/>
</owl:FunctionalP roperty>
<owl:Functional Property rdf:ID="Univers ityName">
<rdf:type rdf:resource="h ttp://www.w3.org/2002/07/owl#DatatypePro perty"/>
<rdfs:range rdf:resource="h ttp://www.w3.org/2001/XMLSchema#strin g"/>
<rdfs:domain rdf:resource="# University"/>
</owl:FunctionalP roperty>
<owl:Functional Property rdf:about="#isP rogrammeOf">
<owl:inverseO f rdf:resource="# hasProgramme"/>
<rdfs:range rdf:resource="# University"/>
<rdfs:domain rdf:resource="# Programme"/>
<rdf:type rdf:resource="h ttp://www.w3.org/2002/07/owl#ObjectPrope rty"/>
</owl:FunctionalP roperty>
<Course rdf:ID="Advance dKnowledgeTechn ology">
<CourseName rdf:datatype="h ttp://www.w3.org/2001/XMLSchema#strin g"[color=blue]
>Advanced Knowledge Technology</CourseName>[/color]
<isCourseOf>
<ProgrammeAI rdf:ID="MensMac hineCommunicati e">
<ProgrammeNam e rdf:datatype="h ttp://www.w3.org/2001/XMLSchema#strin g"[color=blue]
>Mens-Machine Communicatie en Artificial Intelligence</ProgrammeName>[/color]
<hasCourse rdf:resource="# AdvancedKnowled geTechnology"/>
<isProgrammeO f>
<University rdf:ID="Groning enRuG">
<UniversityNa me rdf:datatype="h ttp://www.w3.org/2001/XMLSchema#strin g"[color=blue]
>Groningen(RuG) </UniversityName>[/color]
<hasProgramme rdf:resource="# MensMachineComm unicatie"/>
</University>
</isProgrammeOf>
</ProgrammeAI>
</isCourseOf>
<CourseECTS rdf:datatype="h ttp://www.w3.org/2001/XMLSchema#float "[color=blue]
>5.0</CourseECTS>[/color]
</Course>
</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):
<Course rdf:ID="Advance dKnowledgeTechn ology">
<CourseName rdf:datatype="h ttp://www.w3.org/2001/XMLSchema#strin g"[color=blue]
>Advanced Knowledge Technology</CourseName>[/color]
....
</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="htt p://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="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="Program me">
<rdfs:subClassO f>
<owl:Class rdf:ID="MasterA I"/>
</rdfs:subClassOf >
<owl:disjointWi th>
<owl:Class rdf:ID="Univers ity"/>
</owl:disjointWit h>
<owl:disjointWi th>
<owl:Class rdf:ID="Course"/>
</owl:disjointWit h>
<owl:equivalent Class>
<owl:Class>
<owl:intersecti onOf rdf:parseType=" Collection">
<owl:Restrictio n>
<owl:allValuesF rom>
<owl:Class rdf:about="#Cou rse"/>
</owl:allValuesFr om>
<owl:onProperty >
<owl:ObjectProp erty rdf:ID="hasCour se"/>
</owl:onProperty>
</owl:Restriction >
<owl:Restrictio n>
<owl:onProperty >
<owl:ObjectProp erty rdf:about="#has Course"/>
</owl:onProperty>
<owl:someValues From>
<owl:Class rdf:about="#Cou rse"/>
</owl:someValuesF rom>
</owl:Restriction >
</owl:intersectio nOf>
</owl:Class>
</owl:equivalentC lass>
</owl:Class>
<owl:Class rdf:about="#Cou rse">
<owl:disjointWi th>
<owl:Class rdf:about="#Uni versity"/>
</owl:disjointWit h>
<rdfs:subClassO f rdf:resource="# MasterAI"/>
<owl:disjointWi th rdf:resource="# Programme"/>
</owl:Class>
<owl:Class rdf:about="#Uni versity">
<rdfs:subClassO f rdf:resource="# MasterAI"/>
<owl:disjointWi th rdf:resource="# Course"/>
<owl:equivalent Class>
<owl:Class>
<owl:intersecti onOf rdf:parseType=" Collection">
<owl:Restrictio n>
<owl:onProperty >
<owl:ObjectProp erty rdf:ID="hasProg ramme"/>
</owl:onProperty>
<owl:allValuesF rom rdf:resource="# Programme"/>
</owl:Restriction >
<owl:Restrictio n>
<owl:someValues From rdf:resource="# Programme"/>
<owl:onProperty >
<owl:ObjectProp erty rdf:about="#has Programme"/>
</owl:onProperty>
</owl:Restriction >
</owl:intersectio nOf>
</owl:Class>
</owl:equivalentC lass>
<owl:disjointWi th rdf:resource="# Programme"/>
</owl:Class>
<owl:Class rdf:ID="Program meAI">
<rdfs:subClassO f rdf:resource="# Programme"/>
</owl:Class>
<owl:ObjectProp erty rdf:about="#has Programme">
<rdfs:domain rdf:resource="# University"/>
<rdf:type
rdf:resource="h ttp://www.w3.org/2002/07/owl#InverseFunc tionalProperty"/>
<rdfs:range rdf:resource="# Programme"/>
<owl:inverseO f>
<owl:Functional Property rdf:ID="isProgr ammeOf"/>
</owl:inverseOf>
</owl:ObjectPrope rty>
<owl:ObjectProp erty rdf:about="#has Course">
<rdfs:range rdf:resource="# Course"/>
<rdfs:domain rdf:resource="# Programme"/>
<owl:inverseO f>
<owl:ObjectProp erty rdf:ID="isCours eOf"/>
</owl:inverseOf>
</owl:ObjectPrope rty>
<owl:ObjectProp erty rdf:about="#isC ourseOf">
<rdfs:domain rdf:resource="# Course"/>
<owl:inverseO f rdf:resource="# hasCourse"/>
<rdfs:range rdf:resource="# Programme"/>
</owl:ObjectPrope rty>
<owl:DatatypePr operty rdf:ID="CourseN ame">
<rdfs:range rdf:resource="h ttp://www.w3.org/2001/XMLSchema#strin g"/>
<rdfs:domain rdf:resource="# Course"/>
<rdf:type rdf:resource="h ttp://www.w3.org/2002/07/owl#FunctionalP roperty"/>
</owl:DatatypePro perty>
<owl:DatatypePr operty rdf:ID="CourseE CTS">
<rdf:type rdf:resource="h ttp://www.w3.org/2002/07/owl#FunctionalP roperty"/>
<rdfs:range rdf:resource="h ttp://www.w3.org/2001/XMLSchema#float "/>
<rdfs:domain rdf:resource="# Course"/>
</owl:DatatypePro perty>
<owl:Functional Property rdf:ID="Program meName">
<rdfs:domain rdf:resource="# Programme"/>
<rdf:type rdf:resource="h ttp://www.w3.org/2002/07/owl#DatatypePro perty"/>
<rdfs:range rdf:resource="h ttp://www.w3.org/2001/XMLSchema#strin g"/>
</owl:FunctionalP roperty>
<owl:Functional Property rdf:ID="Univers ityName">
<rdf:type rdf:resource="h ttp://www.w3.org/2002/07/owl#DatatypePro perty"/>
<rdfs:range rdf:resource="h ttp://www.w3.org/2001/XMLSchema#strin g"/>
<rdfs:domain rdf:resource="# University"/>
</owl:FunctionalP roperty>
<owl:Functional Property rdf:about="#isP rogrammeOf">
<owl:inverseO f rdf:resource="# hasProgramme"/>
<rdfs:range rdf:resource="# University"/>
<rdfs:domain rdf:resource="# Programme"/>
<rdf:type rdf:resource="h ttp://www.w3.org/2002/07/owl#ObjectPrope rty"/>
</owl:FunctionalP roperty>
<Course rdf:ID="Advance dKnowledgeTechn ology">
<CourseName rdf:datatype="h ttp://www.w3.org/2001/XMLSchema#strin g"[color=blue]
>Advanced Knowledge Technology</CourseName>[/color]
<isCourseOf>
<ProgrammeAI rdf:ID="MensMac hineCommunicati e">
<ProgrammeNam e rdf:datatype="h ttp://www.w3.org/2001/XMLSchema#strin g"[color=blue]
>Mens-Machine Communicatie en Artificial Intelligence</ProgrammeName>[/color]
<hasCourse rdf:resource="# AdvancedKnowled geTechnology"/>
<isProgrammeO f>
<University rdf:ID="Groning enRuG">
<UniversityNa me rdf:datatype="h ttp://www.w3.org/2001/XMLSchema#strin g"[color=blue]
>Groningen(RuG) </UniversityName>[/color]
<hasProgramme rdf:resource="# MensMachineComm unicatie"/>
</University>
</isProgrammeOf>
</ProgrammeAI>
</isCourseOf>
<CourseECTS rdf:datatype="h ttp://www.w3.org/2001/XMLSchema#float "[color=blue]
>5.0</CourseECTS>[/color]
</Course>
</rdf:RDF>
Comment