[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Datatypes from the W3C Schema Specification
As promised, below is a succinct list of datatypes that
are defined in the W3C "XML Schema Part 2: Datatypes"
Candidate Recommendation. I don't believe all these
datatypes are necessary but it would be useful to
select a core set.
Most of these datatypes are not valid in XML DTD's.
I have identified which datatypes can be used in
DTD's, however, it is possible to use them in
a standard way:
<!ELEMENT date (#PCDATA)>
<!ATTLIST date
datatype CDATA #FIXED "date"
format CDATA #FIXED "MMDDYYYY">
Primitive Datatypes
1. string - The string datatype represents character strings
in XML.
2. boolean - Boolean has the value space required to support
the mathematical concept of binary-valued
logic: {true, false}.
3. float - float corresponds to the IEEE single-precision
32-bit floating point type [IEEE 754-1985].
4. double - The double datatype corresponds to IEEE
double-precision 64-bit floating point type
[IEEE 754-1985].
5. decimal - Decimal represents arbitrary precision decimal
numbers.
6. timeDuration - timeDuration represents a duration of time.
7. recurringDuration - recurringDuration represents a specific
period of time that recurs with a specific frequency,
starting from a specific point in time.
8. binary - binary represents arbitrary binary data.
9. uriReference - uriReference represents a Uniform Resource
Identifier (URI) Reference
10. ID - ID represents the ID attribute type from
[XML 1.0 Recommendation (Second Edition)].
NOTE: ID values can currently be used in DTDs.
11. IDREF - IDREF represents the IDREF attribute type from
[XML 1.0 Recommendation (Second Edition)].
NOTE: IDREF values can currently be used in DTDs.
12. ENTITY - ENTITY represents the ENTITY attribute type
from [XML 1.0 Recommendation (Second Edition)].
NOTE: ENTITY attribute values can be used in
DTDs.
13. QName - QName represents XML qualified names.
The Schema Datatype Specification Defines the datatypes below
as "Derived datatypes".
1. CDATA - CDATA represents white space normalized strings.
NOTE: CDATA attribute values can be used in XML
DTDs.
2. token - token represents tokenized strings.
3. language - language represents natural language identifiers
as defined by [RFC 1766].
4. IDREFS - IDREFS represents the IDREFS attribute type from
[XML 1.0 Recommendation (Second Edition)].
NOTE: IDREFS attribute values can be used in XML
DTDs.
5. ENTITIES - ENTITIES represents the ENTITIES attribute type from
[XML 1.0 Recommendation (Second Edition)].
6. NMTOKEN - NMTOKEN represents the NMTOKEN attribute type from
[XML 1.0 Recommendation (Second Edition)].
NOTE: NMTOKEN attribute values can be used in XML
DTDs.
7. NMTOKENS - NMTOKENS represents the NMTOKENS attribute type from
[XML 1.0 Recommendation (Second Edition)].
NOTE: NMTOKEN attribute values can be used in XML
DTDs.
8. Name - Name represents XML Names.
Note: In SGML DTD's this is a valid attribute
value. It is being brought back with XML Schemas.
9. NCName - NCName represents XML "non-colonized" Names.
10. NOTATION - NOTATION represents the NOTATION attribute
type from [XML 1.0 Recommendation
(Second Edition)].
Note: In SGML DTD's this is a valid attribute
value. It is being brought back with XML Schemas.
11. integer - integer is derived from decimal by fixing the value
of scale to be 0.
12. nonPositiveInteger - nonPositiveInteger is derived from
integer by setting the value of maxInclusive to
be 0.
13. negativeInteger - negativeInteger is derived from
nonPositiveInteger by setting the value
of maxInclusive to be -1.
14. long - long is derived from integer by setting the
value of maxInclusive to be 9223372036854775807
and minInclusive to be -9223372036854775808. The
base type of long is integer.
15. int - int is derived from long by setting the value of
maxInclusive to be 2147483647 and minInclusive to
be -2147483648. The base type of int is long.
16. short - short is derived from int by setting the value
of maxInclusive to be 32767 and minInclusive to
be -32768. The base type of short is int.
17. byte - byte is derived from short by setting the
value of maxInclusive to be 127 and minInclusive
to be -128. The base type of byte is short.
18. nonNegativeInteger - nonNegativeInteger is derived from
integer by setting the value of minInclusive
to be 0.
19. unsignedLong - unsignedLong is derived from nonNegativeInteger
by setting the value of maxInclusive to be
18446744073709551615. The base type of
unsignedLong is nonNegativeInteger.
20. unsignedInt - unsignedInt is derived from unsignedLong by
setting the value of maxInclusive to be 4294967295.
The base type of unsignedInt is unsignedLong.
21. unsignedShort - unsignedShort is derived from unsignedInt
by setting the value of maxInclusive to be 65535.
The base type of unsignedShort is unsignedInt.
22. unsignedByte - unsignedByte is derived from unsignedShort
by setting the value of maxInclusive to be 255.
The base type of unsignedByte is unsignedShort.
23. positiveInteger - positiveInteger is derived from
nonNegativeInteger by setting the value of
minInclusive to be 1.
24. timeInstant - timeInstant represents a specific instant
of time.
25. time - time represents an instant of time that recurs
every day.
26. timePeriod - timePeriod represents a specific period of
time with a given start and end.
27. date - date represents a timePeriod that starts at
midnight of a specified day and lasts until
midnight the following day.
28. month - month represents a timePeriod that starts at
midnight on the first day of the month and
lasts until the midnight that ends the last
day of the month.
29. year - year represents a timePeriod that starts at
the midnight that starts the first day of
the year and ends at the midnight that ends
the last day of the year.
30. century - century represents a timePeriod that starts
at the midnight that starts the first day
of the century and ends at the midnight that
ends that last day of the century.
31. recurringDate - recurringDate is a date that recurs,
specifically a day of the year such as the
third of May.
32. recurringDay - recurringDay is a day that recurs,
specifically a day of the month such as
the 5th of the month.
Betty
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Betty Harvey | Phone: 410-787-9200 FAX: 9830
Electronic Commerce Connection, Inc. |
harvey@eccnet.com | Washington,DC SGML/XML Users Grp
URL: http://www.eccnet.com | http://www.eccnet.com/xmlug/
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC