Datatype: money

Description:

An element of type money will have a value and an attribute:

Proposed Usage:

This datatype was developed to support the Epicentre money data type. Its intended usage is shown in the PEF money element document. It is anticipated that it will be useful primarily to support the PEF application. However, the restriction to the list of currencies as defined by ISO will make this datatype useful in itself.

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="money">
      <xsd:simpleContent>
        <xsd:extension base="xsd:decimal">
          <xsd:attribute name="currency" type="currencies"/>
        </xsd:extension>
      </xsd:simpleContent>
    </xsd:complexType>
    

    Sample Usage Schema:

    The file defining this datatype "includes" the file, currency.xsd, which has 178 currency codes as defined by ISO.

       <element name="cost" type="money"/>
    

    Sample XML:

       <cost currency="USD">82000</cost>
    

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