Datatype: rationalNumber

Description:

An element of type rationalNumber will have two subelements and no attributes:

Proposed Usage:

This datatype was developed to support the Epicentre rational data type. Its intended usage is shown in the PEF rational element document. It is useful whenever a rational number is to be expressed by giving its numerator and denominator.

XML Schema:

  • The schema and examples do not explicitly show the lines that set the namespaces.
  • All schema examples will use xsd: as the namespace for the schema tags and datatypes, and null for all the locally generated namespaces.
  • XML Examples will exclude namespace modifiers for clarity. Actual XML will probably need namespaces.
  • <xsd:complexType name="rationalNumber">
      <xsd:sequence>
        <xsd:element name="numerator" type="xsd:integer"/>
        <xsd:element name="denominator" type="xsd:integer"/>
      </xsd:sequence>
    </xsd:complexType>
    

    Sample Usage Schema:

       <element name="mapScale" type="rationalNumber"/>
    

    Sample XML:

       <mapScale>
         <numerator>1</numerator>
         <denominator>10000</denominator>
       </mapScale>
    

    Last Modified: March 21, 2001
    ©Copyright 2001 POSC. All rights reserved.