Datatype: logical

Description:

True, False, or Unknown. This datatype is the same as the boolean datatype, with three case variations of unknown added.

Proposed Usage:

This datatype was developed to support the Epicentre logical data type. Its intended usage is shown in the PEF logical element document. Usage as a useful datatype is shown in the following sample usage schema and sample XML.

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:simpleType name="logical">
      <xsd:restriction base="xsd:string">
        <xsd:enumeration value="true"/>
        <xsd:enumeration value="True"/>
        <xsd:enumeration value="TRUE"/>
        <xsd:enumeration value="false"/>
        <xsd:enumeration value="False"/>
        <xsd:enumeration value="FALSE"/>
        <xsd:enumeration value="unknown"/>
        <xsd:enumeration value="Unknown"/>
        <xsd:enumeration value="UNKNOWN"/>
      </xsd:restriction>
    </xsd:simpleType>
    

    Sample Usage Schema:

  • This datatype implies that the application must be able to accept the various case alternatives of true, false, and unknown.
  • This datatype alone contains no elements. All namespace requirements will be derived from the schema that includes this file. The following uses unqualified.
  •    <xsd:element name="someFlag" type="logical"/>
    

    Sample XML:

       <someFlag>True</someFlag>
    

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