レストランベースのシステム用に小さなxsd/xmlファイルを作成しています。
XSDファイル用に持っているコードは次のとおりです。
<xs:element name="table_cat">
<xs:complexType>
<xs:sequence>
<xs:element name="category" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element name="category_id" type="CatID" />
<xs:element name="catdescription" type="Length50"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:unique name="unique-catid">
<xs:selector xpath="category" />
<xs:field xpath="category_id"/>
</xs:unique>
</xs:element>
しかし、XMLファイルに複数のCategory_IDフィールドがある場合は常に、次のエラーが発生し続けます。
The field 'category_id' is expecting at the most one value.
私はそれを機能させるためにさまざまな解決策を試しましたが、何も機能していないようです。
あなたがありがとうを助けることができることを願っています!