<?xml version="1.0"?>
<rdf:RDF xmlns="http://example.org/test#"
     xml:base="http://example.org/test"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
    <owl:Ontology rdf:about="http://example.org/test"/>
    <owl:Class rdf:about="http://example.org/test#A">
        <rdfs:subClassOf rdf:resource="http://example.org/test#B"/>
    </owl:Class>
    <owl:Class rdf:about="http://example.org/test#B"/>
    <owl:Class rdf:about="http://example.org/test#C">
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="http://example.org/test#hasPart"/>
                <owl:someValuesFrom rdf:resource="http://example.org/test#B"/>
            </owl:Restriction>
        </rdfs:subClassOf>
    </owl:Class>
    <owl:ObjectProperty rdf:about="http://example.org/test#hasPart"/>
</rdf:RDF>
