For the XSD below:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
<xs:simpleType name="size">
<xs:restriction base="xs:string">
<xs:enumeration value="small" />
<xs:enumeration value="medium" />
<xs:enumeration value="large" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="jeans">
<xs:simpleContent>
<xs:extension base="size">
<xs:attribute name="sex">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="male" />
<xs:enumeration value="female" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:schema>
I want to convert xs:enumeration to owl. I found only one way to do it:
converting the string literal to a owl:Class:
:Class_2
a owl:Class ;
rdfs:subClassOf dtype:EnumeratedValue ;
rdfs:subClassOf
[ a owl:Restriction ;
owl:maxCardinality "1"^^xsd:int ;
owl:onProperty dtype:hasValue
] ;
rdfs:subClassOf
[ a owl:Restriction ;
owl:allValuesFrom xsd:string ;
owl:onProperty dtype:hasValue
] ;
owl:oneOf (:Class_2_male :Class_2_female) .
:Class_2_female
a :Class_2 ;
dtype:hasValue "female"^^xsd:string .
But I don't like this way. A literal looks much like constant. A owl:Class could have many instances. Is there any way to represent a constant in OWL? The result may look like this:
<Constant rdf:abot="#female" rdf:type="http://www.w3.org/2001/XMLSchema#string">female</Constant>
The question could be rephrased: how to describe a plain string literal in OWL?