私はxmlが初めてで、いくつかの複雑なタイプを作成しようとしました。Oxygen で .xsd を検証しようとしましたが、「名前 'state' を a(n) 'type definition' コンポーネントに解決できません。10:70」というメッセージが表示され、理由がわかりません。これは、 http://www.w3schools.com/schema/schema_complex.aspの最後の例のようなチュートリアル コードでも発生します。
ここにコードを含めようとしましたが、「あなたの投稿には適切にフォーマットされていないコードが含まれているようです」と表示され続けます。自分のコードを含めるために見つけたすべてを試しましたが、何も機能しません。とにかく、私が言ったように、それは上記の例でも起こります (で囲まれています:
<xs:schema version="1.0" xmlns="http://www.w3schools.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> ...ここに例があります... </xs:schema>
[編集]
Ok。コードを1行ずつ含めた後、動作します。ここにあります:
<xs:schema version="1.0"
xmlns="http://www.w3schools.com"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xs:complexType name="state_machine">
<xs:sequence>
<xs:element name="state" type="state"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="state">
<xs:sequence>
<xs:element name="Superclass" type="xs:string"/>
<xs:element name="transition" type="transition"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="transition">
<xs:sequence>
<xs:element name="from" type="xs:string"/>
<xs:element name="to" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
助けてください!!