Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


XSL Transformation of .owl file

From: "Fredrik Henricsson" <faid@-------.-->
To: NULL
Date: 3/24/2005 12:09:00 AM
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="AdvancedKnowledgeTechnology">
<CourseName rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>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#"
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="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 rdf:parseType="Collection">
<owl:Restriction>
<owl:allValuesFrom>
<owl:Class rdf:about="#Course"/>
</owl:allValuesFrom>
<owl:onProperty>
<owl:ObjectProperty rdf:ID="hasCourse"/>
</owl:onProperty>
</owl:Restriction>
<owl:Restriction>
<owl:onProperty>
<owl:ObjectProperty rdf:about="#hasCourse"/>
</owl:onProperty>
<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 rdf:parseType="Collection">
<owl:Restriction>
<owl:onProperty>
<owl:ObjectProperty rdf:ID="hasProgramme"/>
</owl:onProperty>
<owl:allValuesFrom rdf:resource="#Programme"/>
</owl:Restriction>
<owl:Restriction>
<owl:someValuesFrom rdf:resource="#Programme"/>
<owl:onProperty>
<owl:ObjectProperty rdf:about="#hasProgramme"/>
</owl:onProperty>
</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>
<owl:DatatypeProperty 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"/>
</owl:DatatypeProperty>
<owl:DatatypeProperty 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"/>
</owl:DatatypeProperty>
<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>

<Course rdf:ID="AdvancedKnowledgeTechnology">
<CourseName rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Advanced Knowledge Technology</CourseName>
<isCourseOf>
<ProgrammeAI rdf:ID="MensMachineCommunicatie">
<ProgrammeName rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Mens-Machine Communicatie en Artificial Intelligence</ProgrammeName>
<hasCourse rdf:resource="#AdvancedKnowledgeTechnology"/>
<isProgrammeOf>
<University rdf:ID="GroningenRuG">
<UniversityName rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Groningen(RuG)</UniversityName>
<hasProgramme rdf:resource="#MensMachineCommunicatie"/>
</University>
</isProgrammeOf>
</ProgrammeAI>
</isCourseOf>
<CourseECTS rdf:datatype="http://www.w3.org/2001/XMLSchema#float"
>5.0</CourseECTS>
</Course>

</rdf:RDF> 




transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent