我正在学习如何使用protegè构建本体。我按照关于披萨的教程,但在创建类,子类等之后,当我使用推理器Racer 2.0时,它发现了这个问题:
ParseException.encountnered:第8行第1列的“错误” 期待以下之一: “零”... “T” ...
这是xml_code:
<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [
<!ENTITY owl "http://www.w3.org/2002/07/owl#" >
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
<!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" >
<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
<!ENTITY pizzatutorial "http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#" > ]>
<rdf:RDF xmlns="http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#"
xml:base="http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#"
xmlns:pizzatutorial="http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<owl:Ontology rdf:about=""/>
<!-- ///////////////////////////////////////////////////////////////////////////////////////
//
// Object Properties
//
///////////////////////////////////////////////////////////////////////////////////////
-->
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#hasBase -->
<owl:ObjectProperty rdf:about="#hasBase">
<rdf:type rdf:resource="&owl;FunctionalProperty"/>
<rdfs:domain rdf:resource="#Pizza"/>
<rdfs:range rdf:resource="#PizzaBase"/>
<rdfs:subPropertyOf rdf:resource="#hasIngredient"/>
<owl:inverseOf rdf:resource="#isBaseOf"/>
</owl:ObjectProperty>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#hasIngredient -->
<owl:ObjectProperty rdf:about="#hasIngredient">
<rdf:type rdf:resource="&owl;TransitiveProperty"/>
</owl:ObjectProperty>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#hasTopping -->
<owl:ObjectProperty rdf:about="#hasTopping">
<rdfs:domain rdf:resource="#Pizza"/>
<rdfs:range rdf:resource="#PizzaTopping"/>
<rdfs:subPropertyOf rdf:resource="#hasIngredient"/>
<owl:inverseOf rdf:resource="#isToppingOf"/>
</owl:ObjectProperty>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#isBaseOf -->
<owl:ObjectProperty rdf:about="#isBaseOf">
<rdfs:range rdf:resource="#Pizza"/>
<rdfs:domain rdf:resource="#PizzaBase"/>
<rdfs:subPropertyOf rdf:resource="#isIngredientOf"/>
</owl:ObjectProperty>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#isIngredientOf -->
<owl:ObjectProperty rdf:about="#isIngredientOf">
<rdf:type rdf:resource="&owl;TransitiveProperty"/>
<owl:inverseOf rdf:resource="#hasIngredient"/>
</owl:ObjectProperty>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#isToppingOf -->
<owl:ObjectProperty rdf:about="#isToppingOf">
<rdfs:range rdf:resource="#Pizza"/>
<rdfs:domain rdf:resource="#PizzaTopping"/>
<rdfs:subPropertyOf rdf:resource="#isIngredientOf"/>
</owl:ObjectProperty>
<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Classes
//
///////////////////////////////////////////////////////////////////////////////////////
-->
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#AmericanHotPizza -->
<owl:Class rdf:about="#AmericanHotPizza">
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasTopping"/>
<owl:someValuesFrom rdf:resource="#JalapenoPepperTopping"/>
</owl:Restriction>
</owl:equivalentClass>
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasTopping"/>
<owl:someValuesFrom rdf:resource="#MozzarellaTopping"/>
</owl:Restriction>
</owl:equivalentClass>
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasTopping"/>
<owl:someValuesFrom rdf:resource="#TomatoTopping"/>
</owl:Restriction>
</owl:equivalentClass>
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasTopping"/>
<owl:someValuesFrom rdf:resource="#PepperoniTopping"/>
</owl:Restriction>
</owl:equivalentClass>
<rdfs:subClassOf rdf:resource="#NamedPizza"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#AmericanPizza -->
<owl:Class rdf:about="#AmericanPizza">
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasTopping"/>
<owl:someValuesFrom rdf:resource="#TomatoTopping"/>
</owl:Restriction>
</owl:equivalentClass>
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasTopping"/>
<owl:someValuesFrom rdf:resource="#PepperoniTopping"/>
</owl:Restriction>
</owl:equivalentClass>
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasTopping"/>
<owl:someValuesFrom rdf:resource="#MozzarellaTopping"/>
</owl:Restriction>
</owl:equivalentClass>
<rdfs:subClassOf rdf:resource="#NamedPizza"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#AnchovyTopping -->
<owl:Class rdf:about="#AnchovyTopping">
<rdfs:subClassOf rdf:resource="#SeafoodTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#CaperTopping -->
<owl:Class rdf:about="#CaperTopping">
<rdfs:subClassOf rdf:resource="#VegetableTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#CheeseTopping -->
<owl:Class rdf:about="#CheeseTopping">
<rdfs:subClassOf rdf:resource="#PizzaTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#DeepPanBase -->
<owl:Class rdf:about="#DeepPanBase">
<rdfs:subClassOf rdf:resource="#PizzaBase"/>
<owl:disjointWith rdf:resource="#ThinAndCrispyBase"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#GreenPepperTopping -->
<owl:Class rdf:about="#GreenPepperTopping">
<rdfs:subClassOf rdf:resource="#PepperTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#HamTopping -->
<owl:Class rdf:about="#HamTopping">
<rdfs:subClassOf rdf:resource="#MeatTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#JalapenoPepperTopping -->
<owl:Class rdf:about="#JalapenoPepperTopping">
<rdfs:subClassOf rdf:resource="#PepperTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#MargheritaPizza -->
<owl:Class rdf:about="#MargheritaPizza">
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasTopping"/>
<owl:someValuesFrom rdf:resource="#TomatoTopping"/>
</owl:Restriction>
</owl:equivalentClass>
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasTopping"/>
<owl:someValuesFrom rdf:resource="#MozzarellaTopping"/>
</owl:Restriction>
</owl:equivalentClass>
<rdfs:subClassOf rdf:resource="#NamedPizza"/>
<rdfs:comment
>A pizza that has only TomatonTopping and Mozzarella</rdfs:comment>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#MeatTopping -->
<owl:Class rdf:about="#MeatTopping">
<rdfs:subClassOf rdf:resource="#PizzaTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#MozzarellaTopping -->
<owl:Class rdf:about="#MozzarellaTopping">
<rdfs:subClassOf rdf:resource="#CheeseTopping"/>
<owl:disjointWith rdf:resource="#ParmezanTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#MushroomTopping -->
<owl:Class rdf:about="#MushroomTopping">
<rdfs:subClassOf rdf:resource="#VegetableTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#NamedPizza -->
<owl:Class rdf:about="#NamedPizza">
<rdfs:subClassOf rdf:resource="#Pizza"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#OliveTopping -->
<owl:Class rdf:about="#OliveTopping">
<rdfs:subClassOf rdf:resource="#VegetableTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#OnionTopping -->
<owl:Class rdf:about="#OnionTopping">
<rdfs:subClassOf rdf:resource="#VegetableTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#ParmezanTopping -->
<owl:Class rdf:about="#ParmezanTopping">
<rdfs:subClassOf rdf:resource="#CheeseTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#PepperTopping -->
<owl:Class rdf:about="#PepperTopping">
<rdfs:subClassOf rdf:resource="#VegetableTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#PepperoniTopping -->
<owl:Class rdf:about="#PepperoniTopping">
<rdfs:subClassOf rdf:resource="#MeatTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#Pizza -->
<owl:Class rdf:about="#Pizza">
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasBase"/>
<owl:someValuesFrom rdf:resource="#PizzaBase"/>
</owl:Restriction>
</owl:equivalentClass>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#PizzaBase -->
<owl:Class rdf:about="#PizzaBase"/>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#PizzaTopping -->
<owl:Class rdf:about="#PizzaTopping"/>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#PrawnTopping -->
<owl:Class rdf:about="#PrawnTopping">
<rdfs:subClassOf rdf:resource="#SeafoodTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#RedPepperTopping -->
<owl:Class rdf:about="#RedPepperTopping">
<rdfs:subClassOf rdf:resource="#PepperTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#SalamiTopping -->
<owl:Class rdf:about="#SalamiTopping">
<rdfs:subClassOf rdf:resource="#MeatTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#SeafoodTopping -->
<owl:Class rdf:about="#SeafoodTopping">
<rdfs:subClassOf rdf:resource="#PizzaTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#SohoPizza -->
<owl:Class rdf:about="#SohoPizza">
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasTopping"/>
<owl:someValuesFrom rdf:resource="#TomatoTopping"/>
</owl:Restriction>
</owl:equivalentClass>
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasTopping"/>
<owl:someValuesFrom rdf:resource="#ParmezanTopping"/>
</owl:Restriction>
</owl:equivalentClass>
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasTopping"/>
<owl:someValuesFrom rdf:resource="#OliveTopping"/>
</owl:Restriction>
</owl:equivalentClass>
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="#hasTopping"/>
<owl:someValuesFrom rdf:resource="#MozzarellaTopping"/>
</owl:Restriction>
</owl:equivalentClass>
<rdfs:subClassOf rdf:resource="#NamedPizza"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#SpicyBeefTopping -->
<owl:Class rdf:about="#SpicyBeefTopping">
<rdfs:subClassOf rdf:resource="#MeatTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#ThinAndCrispyBase -->
<owl:Class rdf:about="#ThinAndCrispyBase">
<rdfs:subClassOf rdf:resource="#PizzaBase"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#TomatoTopping -->
<owl:Class rdf:about="#TomatoTopping">
<rdfs:subClassOf rdf:resource="#VegetableTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#TunaTopping -->
<owl:Class rdf:about="#TunaTopping">
<rdfs:subClassOf rdf:resource="#SeafoodTopping"/>
</owl:Class>
<!-- http://www.semanticweb.org/marcello/ontologies/2015/4/pizzatutorial.owl#VegetableTopping -->
<owl:Class rdf:about="#VegetableTopping">
<rdfs:subClassOf rdf:resource="#PizzaTopping"/>
</owl:Class>
<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// General axioms
//
///////////////////////////////////////////////////////////////////////////////////////
-->
<rdf:Description>
<rdf:type rdf:resource="&owl;AllDisjointClasses"/>
<owl:members rdf:parseType="Collection">
<rdf:Description rdf:about="#HamTopping"/>
<rdf:Description rdf:about="#PepperoniTopping"/>
<rdf:Description rdf:about="#SalamiTopping"/>
<rdf:Description rdf:about="#SpicyBeefTopping"/>
</owl:members>
</rdf:Description>
<rdf:Description>
<rdf:type rdf:resource="&owl;AllDisjointClasses"/>
<owl:members rdf:parseType="Collection">
<rdf:Description rdf:about="#Pizza"/>
<rdf:Description rdf:about="#PizzaBase"/>
<rdf:Description rdf:about="#PizzaTopping"/>
</owl:members>
</rdf:Description>
<rdf:Description>
<rdf:type rdf:resource="&owl;AllDisjointClasses"/>
<owl:members rdf:parseType="Collection">
<rdf:Description rdf:about="#GreenPepperTopping"/>
<rdf:Description rdf:about="#JalapenoPepperTopping"/>
<rdf:Description rdf:about="#RedPepperTopping"/>
</owl:members>
</rdf:Description>
<rdf:Description>
<rdf:type rdf:resource="&owl;AllDisjointClasses"/>
<owl:members rdf:parseType="Collection">
<rdf:Description rdf:about="#AnchovyTopping"/>
<rdf:Description rdf:about="#PrawnTopping"/>
<rdf:Description rdf:about="#TunaTopping"/>
</owl:members>
</rdf:Description>
<rdf:Description>
<rdf:type rdf:resource="&owl;AllDisjointClasses"/>
<owl:members rdf:parseType="Collection">
<rdf:Description rdf:about="#CaperTopping"/>
<rdf:Description rdf:about="#MushroomTopping"/>
<rdf:Description rdf:about="#OliveTopping"/>
<rdf:Description rdf:about="#OnionTopping"/>
<rdf:Description rdf:about="#PepperTopping"/>
<rdf:Description rdf:about="#TomatoTopping"/>
</owl:members>
</rdf:Description>
<rdf:Description>
<rdf:type rdf:resource="&owl;AllDisjointClasses"/>
<owl:members rdf:parseType="Collection">
<rdf:Description rdf:about="#CheeseTopping"/>
<rdf:Description rdf:about="#MeatTopping"/>
<rdf:Description rdf:about="#SeafoodTopping"/>
<rdf:Description rdf:about="#VegetableTopping"/>
</owl:members>
</rdf:Description>
<rdf:Description>
<rdf:type rdf:resource="&owl;AllDisjointClasses"/>
<owl:members rdf:parseType="Collection">
<rdf:Description rdf:about="#AmericanHotPizza"/>
<rdf:Description rdf:about="#AmericanPizza"/>
<rdf:Description rdf:about="#MargheritaPizza"/>
<rdf:Description rdf:about="#SohoPizza"/>
</owl:members>
</rdf:Description>