Datatype: ratio

Description:

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

Proposed Usage:

This datatype was developed to support the Epicentre ratio data type. Its intended usage is shown in the PEF ratio element document. The ratio datatype is useful whenever it is intended to express the ratio of two real numbers.

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:double"/>
        <xsd:element name="denominator" type="xsd:double"/>
      </xsd:sequence>
    </xsd:complexType>
    

    Sample Usage Schema:

       <element name="concentration" type="ratio"/>
    

    Sample XML:

       <concentration>
         <numerator>11.6</numerator>
         <denominator>100000.</denominator>
       </concentration>
    

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