xml-schema, Genauigkeit von decimal-Wert

Dies ist meine xml (nicht ganz):

<xsd:complexType name="xx">
    <xsd:complexContent>
      <xsd:extension base="tns:xx">
        <xsd:sequence>
          <xsd:element name="rekVrednostDdv" nillable="true" type="decimal"/>
          <xsd:element name="xx" nillable="true" type="dateTime"/>
          <xsd:element name="xx" nillable="true" type="decimal"/>
          <xsd:element name="xx" nillable="true" type="string"/>
          <xsd:element name="xx" nillable="true" type="dateTime"/>
          <xsd:element name="xx" nillable="true" type="string"/>
          <xsd:element name="xx" nillable="true" type="decimal"/>
          <xsd:element name="xx" nillable="true" type="decimal"/>
          <xsd:element name="xx" nillable="true" type="string"/>
          <xsd:element name="xx" nillable="true" type="string"/>
          <xsd:element name="xx" nillable="true" type="decimal"/>
          <xsd:element name="xx" nillable="true" type="tns:xx"/>
          <xsd:element name="xx" nillable="true" type="dateTime"/>
          <xsd:element name="xx" nillable="true" type="string"/>
          <xsd:element name="xx" nillable="true" type="string"/>
          <xsd:element name="xx" nillable="true" type="string"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>

Beispielsweise rekVrednostDdv muss Präzision 2. Wie kann ich sagen, dieser Typ zu haben, der Präzision 2.

ich versuche wie diese:

<xsd:element name="rekVrednostDdv" nillable="true">
                    <xsd:simpleType>
                        <xsd:restriction base="decimal">
                            <xsd:precision value="6"/>
                            <xsd:scale value="2"/>
                        </xsd:restriction>
                    </xsd:simpleType>
                </xsd:element>

aber jetzt bekomme ich bei der Verwendung von http://www.brainbell.com/tutorials/XML/Working_With_Simple_Types.htm

Invalid XML schema: 'Element <xsd:precision> is not allowed under element <xsd:restriction>.'
InformationsquelleAutor senzacionale | 2011-05-30
Schreibe einen Kommentar