外部システムからの xml のスキーマを作成しています。このタイプのモデル化に問題があります:
<main>
...
<Foo TYPE="Numeric"/>
<Bar TYPE="Numeric">12.0</Bar>
...
</main>
double を拡張する型を作成しました。
<xs:complexType name="myNumeric">
<xs:simpleContent>
<xs:extension base="xs:double">
<xs:attribute name="TYPE" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
....
<xs:element name="Foo" type="myNumeric" />
<xs:element name="Bar" type="myNumeric" />
ただし、これでは十分ではありません。スキーマを検証しようとすると、「'' は 'double' の有効な値ではありません」というエラーが表示されました。
ヒントはありますか?
ありがとう