Chapter 7. Common Textual Elements to All XML Formats

Table of Contents

Lire Data Types Parameter Entities
Boolean Type
Integer Type
Number Type
String Type
Timestamp type
Time Type
Date Type
Duration Type
IP Type
Port Type
Hostname Type
URL Type
Email Type
Bytes Type
Filename Type
Field Type
Superservice Type
Related Types

Lire Data Types Parameter Entities

This module contains the parameter entity declarations for the data types used by all Lire DTDs.

All defined data types have a <type>.type parameter entity which defines their type as an XML type valid in an attribute declaration and a <type>.name parameter entity that declare their name.

Additionally, this module declares <name>.types parameter entities that group related types together.

The latest version of that module is 1.0 and its public identifier is -//LogReport.ORG//ENTITIES Lire Data Types V1.0//EN™.

Boolean Type

The bool type. It contains a boolean value, either 0, 1, f, t, false or true.


<!ENTITY % bool.type         "0 | 1 | f | t | false | true | yes | no">
<!ENTITY % bool.name         "bool"                                  >

   

Integer Type

The int type can contains positive or negative 32 bits integer.


<!ENTITY % int.type          "CDATA"                                 >
<!ENTITY % int.name          "int"                                   >

   

Number Type

The number type can contains any number either integral or floating point.


<!ENTITY % number.type       "CDATA"                                 >
<!ENTITY % number.name       "number"                                >

   

String Type

The string type contains any displayable text string.


<!ENTITY % string.type       "CDATA"                                 >
<!ENTITY % string.name       "string"                                >

   

Timestamp type

The timestamp type contains a time representation which contains the date and time informations. It can be represented in UNIX epoch time.


<!ENTITY % timestamp.type    "CDATA"                                 >
<!ENTITY % timestamp.name    "timestamp"                             >

   

Time Type

The time type contains a time representation which contains only the time of the day, not the date. For example, this data type can represent 12h00, 15:13:10, etc.


<!ENTITY % time.type         "CDATA"                                 >
<!ENTITY % time.name         "time"                                  >

   

Date Type

The date type contains a time representation which contains only a date.


<!ENTITY % date.type         "CDATA"                                 >
<!ENTITY % date.name         "date"                                  >

   

Duration Type

The duration type contains a quantity of time. For example : 5s, 30h, 2days, 3w, 2M, 1y. (The authoritive list of supported duration types is coded in Lire::DataTypes::duration2sec.)


<!ENTITY % duration.type     "CDATA"                                 >
<!ENTITY % duration.name     "duration"                              >

   

IP Type

The ip type contains an IPv4 address.


<!ENTITY % ip.type           "CDATA"                                 >
<!ENTITY % ip.name           "ip"                                    >

   

Port Type

The port type contains a port as used in the TCP to name the ends of logical connections. See also RFC 1700 and http://www.iana.org/numbers.htm. Commonly found in /etc/services on Unix systems.


<!ENTITY % port.type         "CDATA"                                 >
<!ENTITY % port.name         "port"                                  >

   

Hostname Type

The hostname type contains an DNS hostname. (It can also contains the IPv4 address of the host).


<!ENTITY % hostname.type     "NMTOKEN"                               >
<!ENTITY % hostname.name     "hostname"                              >

   

URL Type

The url type represents URL.


<!ENTITY % url.type          "CDATA"                                 >
<!ENTITY % url.name          "url"                                   >

   

Email Type

The email type can be used to represent an email address.


<!ENTITY % email.type        "CDATA"                                 >
<!ENTITY % email.name        "email"                                 >

   

Bytes Type

The bytes type can be used to represent quantity of data. (5m, 1.2g, 300bytes, etc.)


<!ENTITY % bytes.type        "CDATA"                                 >
<!ENTITY % bytes.name        "bytes"                                 >

   

Filename Type

The filenametype can be used to Represent the name of a file or directory.


<!ENTITY % filename.type     "CDATA"                                 >
<!ENTITY % filename.name     "filename"                              >

   

Field Type

Important

This type should be considered internal to Lire and shouldn't be used as a parameter or DLF field type.

The field type can contains a DLF field name. It is used in the parameter specification to represent a choice of sort field for example.


<!ENTITY % field.type        "NMTOKEN"                               >
<!ENTITY % field.name        "field"                                 >

   

Superservice Type

Important

This type should be considered internal to Lire and shouldn't be used as a parameter or DLF field type.


<!ENTITY % superservice.type "NMTOKEN"                               >
<!ENTITY % superservice.name "superservice"                          >

   

Related Types


<!ENTITY % basic.types       "%bool.name; | %int.name; | 
                              %number.name; | %string.name;"         >
<!ENTITY % internet.types    "%email.name; | %url.name; | 
                              %ip.name; | %hostname.name; |
                              %port.name;"                           >
<!ENTITY % misc.types        "%filename.name; | %bytes.name; "       >
<!ENTITY % time.types        "%date.name; | %time.name; | 
                              %timestamp.name; | %duration.name;"    >

<!ENTITY % lire.types        "%basic.types; | %time.types; |
                              %internet.types; | %misc.types;"       >