XML-Schemaを使用してFOAFのようなrdf-vocabularyを拡張することは可能ですが、定義内でそのような語彙のクラスを使用するにはどうすればよいですか?基本的に、foaf:personに新しい要素を追加したいと思います。これらの要素があるということは、このオブジェクトがfoaf:Personであり、他には何もないことを意味します。
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/NewXMLSchema" xmlns:foaf="http://xmlns.com/foaf/0.1/" elementFormDefault="qualified">
<xs:import foaf:namespace="http://xmlns.com/foaf/0.1/" foaf:schemaLocation="http://xmlns.com/foaf/spec/index.rdf"/>
<xs:complexType ref="foaf:Person">
<xs:sequence>
<xs:element name="owns">
<xs:complexType>
<xs:sequence>
<xs:element name="device">
<xs:complexType>
<xs:sequence>
<xs:element name="HereBeSomething"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="datapoints">
<xs:complexType>
<xs:sequence>
<xs:element name="point" type="xs:string"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
Complex Typeはfoaf:Personであると想定されていますが、この配置ではエラーが発生します。
"この行に複数の注釈が見つかりました:-s4s-att-must-appear:属性'name'は要素'complexType'に表示される必要があります。--s4s-att-not-allowed:属性'ref'は要素'complexType'に表示できません。 「」
新しいスキーマの定義で他のRDFオントロジーの型を使用するにはどうすればよいですか?