XmlSchemaSimpleContent.Content プロパティ

定義

XmlSchemaSimpleContentRestrictionまたはXmlSchemaSimpleContentExtensionのいずれかを取得します。

public:
 virtual property System::Xml::Schema::XmlSchemaContent ^ Content { System::Xml::Schema::XmlSchemaContent ^ get(); void set(System::Xml::Schema::XmlSchemaContent ^ value); };
public override System.Xml.Schema.XmlSchemaContent? Content { get; set; }
public override System.Xml.Schema.XmlSchemaContent Content { get; set; }
member this.Content : System.Xml.Schema.XmlSchemaContent with get, set
Public Overrides Property Content As XmlSchemaContent

プロパティ値

XmlSchemaSimpleContentRestrictionまたはXmlSchemaSimpleContentExtension クラス内に含まれるコンテンツ。

simpleContent要素を使用して、次の要素宣言には、要素の内容を単一の属性 (complexType) を持つdecimal型として定義するsizingが含まれています。

<xs:element name="shoeSize">
  <xs:complexType>
    <xs:simpleContent>
      <xs:extension base="xs:decimal">
        <xs:attribute name="sizing">
          <xs:restriction base="xs:string">
            <xs:enumeration value="US"/>
            <xs:enumeration value="European"/>
            <xs:enumeration value="UK"/>
            <xs:enumeration value="Japan"/>
          </xs:restriction>
        </xs:attribute>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
</xs:element>

注釈

simpleContent要素を使用すると、要素のない単純型を含む要素として指定し、要素のコンテンツの値を制限したり、属性を使用してコンテンツを拡張したりできます。

適用対象