が使用されると、ベースタイプはコンテンツタイプが単純な複雑な型でなければなりません…」とはどうなりますか?

StackOverflow https://stackoverflow.com/questions/3505923

質問

これが私がXercesから得続けるエラー全体です。

When <simpleContent> is used, the base type must be a complexType whose content type 
is simple, or, only if restriction is specified, a complex type with mixed content
and emptiable particle, or, only if extension is specified, a simple type.
'string' satisfies none of these conditions.

私はこれを理解したと思いましたが、それを何度かもたらした後、私はそれを失ったに違いありません、誰もがそれに良い「スピン」を持っています

私はそれをこの要素に絞り込みました

<xs:element name="Note">
  <xs:complexType>
    <xs:simpleContent>
      <xs:restriction base="xs:string">
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>
</xs:element>

私はプロジェクトで長い間主演しているだけだと思います...

役に立ちましたか?

解決

あなたが望んでいるように見えます

<xs:extension base="xs:string">

それ以外の

<xs:restriction base="xs:string">

例を参照 XMLスキーマ:コンテンツタイプ, 、2番目のコードスニペット。

メモ要素が何であるかについて仮定しています。上記が達成しようとしていることと一致しない場合は、メモ要素に属性、および/またはテキストコンテンツ、および/または子要素を持たせることができるかどうかを説明してください。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top