code sample icon Sample Code

Replace the entire <xsd:schema> element and its children elements with the following code:

<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> 

Instead of typing the sample code, you can copy the code in this window and then paste it into the XML editor.

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

false ,,,,,,,,,,,,,,,