コード・サンプル・アイコン サンプル・コード

<xsd:schema>要素とその子要素全体を次のコードに置き換えます。

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
           xmlns="http://www.example.org"
           targetNamespace="http://www.example.org"
           elementFormDefault="qualified">
  <xsd:element name="CreditRatingDetailsElement" type="CreditRatingDetails"/>
  <xsd:complexType name="CreditRatingDetails">
    <xsd:sequence>
      <xsd:element name="ssn" minOccurs="1">
        <xsd:simpleType>
          <xsd:restriction base="xsd:string">
            <xsd:maxLength value="9"/>
          </xsd:restriction>
        </xsd:simpleType>
      </xsd:element>
      <xsd:element name="rating" minOccurs="0">
        <xsd:simpleType>
          <xsd:restriction base="xsd:int">
            <xsd:maxLength value="1"/>
          </xsd:restriction>
        </xsd:simpleType>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>
</xsd:schema>  

サンプル・コードを入力するかわりに、このウィンドウのコードをコピーしてXMLソース・エディタに貼り付けることができます。