code sample iconサンプル・コード

<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ソース・エディタ内に張りつけることができます。

Copyright © 1997, 2008, Oracle. All rights reserved.