Data Types
From html4all
Here we describe the data types used for attribute values in HTML. Many are drawn from the HTML 4.01 recommendation and other related recommendations. We also make use of the XML Schema Data types and try to use those as base types for introducing new data types.
[ plan to rework DateTime and Number into (perhaps differently named) data types that encompass the same capabilities but are specified from base data types from XSD.]
Contents
|
I18N and data type requirements
For internationalization and general flexibility, there are some additional requirements we should include for data types beyond what XSD provides with its native data types.
Dates
- a date and datetime type which includes specification of both calendar (defaulting to Gregorian) and and calendar era (defaulting to the common era which the Gregorian calendar inherited from its contemporary predecessor Julian calendar where the years are named according to their ordered position on the timeline starting immediately with 1 after the zero mark and starting immediately with -1 before the zero mark).
- the various calendars and calendar eras might also be specified each with a different xsd:datatype
Times
- a time and datetime type which includes specification of named timezones (perhaps drawn from the CalDAV format) to include timezone information with implied daylight savings time information
- a time and datetime type which includes specification of daylight savings time boolean
- a time and datetime type which includes specification of a non-universal-coordinated-time (such as +LLL) for indicating local non-UTC time for historic time events, for example
Numbers
- a number format that supports not only integers and the various decimal number formats (decimal, float, double), but also fractions and mixed numbers.
- another number data type to support complex numbers in either cartesian or polar form (including fractions, decimal, and mixed numbers) where polar form also supports multiples of [ampersand]#x003C0;
- lexical space support for scientific notation for any of these number data types
- a number data type that supports some key irrational number constants (e.g., [ampersand]#x003C0; [ampersand]#x003C6;, [ampersand]#x221A;2, [ampersand]#x212F;) and multiples (and even logarithms, and exponential power) of those constants
- it may be desirable to allow any Unicode number decimal digit (general category Nd) for these data types for improved I18N support. Unicode eases this for any Unicode processor since these characters all indicate their ASCII equivalent value for the character properties: decimal digit value, digit value, and numeric value.
Data types
| Type | Description | Authority |
| General | ||
| CDATA | SGML | |
| token | XSD | |
| Name | XSD, XML 1.0 | |
| NCName | XSD, Namespaces in XML 1.0 | |
| NMTOKEN | XSD, XML 1.0 | |
| NMTOKENS | A space separated list of NMTOKEN data types | XSD, XML 1.0 |
| ID | XSD | |
[NOTE: currently errors with the MediaWiki software have caused some loss of content. We are working to restore the remaining HTML data types. See a temporary HTML data types page in the mean time]
URIRep (URI Representation)
The term URIRep is used in different ways in different contexts so it is important to clearly express here the way the term is used in these documents. Whereas a URI is a specific uniform manner of expressing, using character graphemes, an identifier for a resource, a URIRep here means a specific octal expression of that URI. While a URI is a complete integral identifier for a resource, a URIRep can be merely a part of the URI expressed in a particular encoding that when interpreted within its own context can -- ideally -- produce a complete and accurate URI. Therefore a URIRep is a sequence of octets in the documents character repertoire that when combined with information about:
- the document's originating serialization encoding;
- a base URI, either specified as a peer attribute to the URIRep, or an inherited property; and
- other associated properties and attributes;
the UA can produce a complete and faithful URI which another processing UA (or even the same UA in another context) can interpret in a manner meeting the needs and expectations of the user.
Within RFC 2396 there is some use of URI and UIR Ref in the way we use URIRep or URI representation. However, RFC 2396 also suggests a URI Reference as a URI with a document fragment identifier. This is not the distinction used here so to avoid confusion, we use the term URIRep. Also here both a URIRep and a URI can include fragment identifier where the resource identified by the URI is a fragment within another resource.
Therefore the use of URIRef here is more closely matched to the use of the term URI reference in the XLink recommendation's section 5.4.
Since URIs are defined in terms of grapheme characters, there are difficulties when using electronic transmission of URIs arising from differences in transforming grapheme characters into octets (or bytes of any size) and transforming the bytes back into grapheme characters. Increasingly, many implementations have relied on UTF-8 to express the mapping of graphemes to octets, however, this is not universal. Using UTF-8 as a document encoding and expecting UTF-8 in server-side applications can help authors and users deal with these ambiguities and holes in standardization. Ideally, for internationalization support, UTF-16 would also be supported as a peer with UTF-8 for URI transmission allowing all scripts outside Latin to enjoy mostly 2-octet grapheme character size for most commonly used graphemes. For example the ad hoc standard UTF-16 escaping sequence (e.g., %uxxxx,) is supported in some browsers.
Authors need to exercise caution in using non-Basic-Latin characters within URIReps, especially whenever using a character encoding other than UTF-8. Particularly within the query (following the '?' character) and document fragment (following the '#' character) parts of the URIRef. For 'http' schema URIs the other parts of the URI are largely encoded and interpreted as UTF-8 already. HTML also includes a query-charset attribute to provide control over the query component of a schema and how those graphemes should be encoded as octets.
QNames for attribute values
Link Relations
| QName Type | QName Values | Description |
| Link Relations | (for the 'rel' and 'rev' Metainformation attributes | |
| contents | ||
| index | ||
| next |
Accessibility roles
| Role | Local Name | Details |
| banner | ||
| complementary | ||
| contentinfo | ||
| definition | ||
| main | ||
| navigation | ||
| note | ||
| search | ||
| meaningful | ||
| icon | ||
| illustrative | ||
| decorative | ||
| photograph | ||
| chart | ||
| cartograph |
Metadata Properties
| Properties | (for the 'property' and meta@name attributes) | |
| description | ||
| generator | ||
| keywords | ||
| reference | ||
| robots | ||
| title | ||
| author | ||
| creator | ||
| contributor | ||
| publisher | ||
| date.content.creation | ||
| date.content.lastmodified | ||
| date.published | ||
| identifier |
Authoring data types
| Authoring Data Types | HTML, XSD, and other data types | |
| token | identical with XSD native types, but included in the HTML namespace and therefore requiring no prefix when used on HTML attributes. To use other XSD datateyps, use either the default 'xsd' prefix or the prefix declared for the document. | |
| datetime | ||
| duration | ||
| date | ||
| time | ||
| decimal | ||
| integer | ||
| mixednumber | ||
| complexnumber | ||
| realnumber | ||
| geocode |
Section and Article types
| SectionTypes | ||
| article | ||
| chapter | ||
| verse | ||
| section | ||
| entry | ||
| comment |
List types
| ListTypes | ||
| reference | bibliographic reference list | |
| definition | definition list | |
| navigation | navigation list | |
| alternate | alternate list |
CiteType QNames
| NCName (local name) | Description |
| book | |
| article | |
| journalarticle | |
| newspaperarticle | |
| collectedworkarticle | |
| journal | |
| collectedwork | |
| artisticwork | |
| webpage | |
| correspondence |
Phonetic systems
| PhoneticSystems | ||
| ipa | International Phonetic Alphabet | |
| apa | American Phonetic Alphabet | |
| unicode | Unicode Phonemes (proposed) |
Modifier keys
| ModifierKeys | ||
| A | Indicates the primary modifier key combination for a platform. (For example, this would likely be the command key on a Mac OS system and the control key on a Windows system) | |
| B | Indicates the secondary modifier key combination for a platform. (e.g., Mac OS "shift-command") | |
| C | Indicates the tertiary modifier key combination for a platform. (e.g., Mac OS "option-command') | |
| D | Indicates the quarternary modifier key combination for a platform (e.g., Mac OS 'shift-option-command') | |
| none | indicates that no modifier key is involved in the input event (same as no value). | |
| control | ||
| command | ||
| alt | also called 'option' on Mac OS | |
| capslock |
Input events
| InputEvents | ||
| Extended Keyboard | ||
| akey | the key position usually representing an 'a' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| bkey | the key position usually representing an 'b' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| ckey | the key position usually representing an 'c' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| dkey | the key position usually representing an 'd' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| dkey | the key position usually representing an 'd' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| ekey | the key position usually representing an 'e' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| fkey | the key position usually representing an 'f' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| gkey | the key position usually representing an 'g' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| hkey | the key position usually representing an 'h' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| ikey | the key position usually representing an 'i' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| jkey | the key position usually representing an 'j' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| kkey | the key position usually representing an 'k' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| lkey | the key position usually representing an 'l' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| mkey | the key position usually representing an 'm' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| nkey | the key position usually representing an 'n' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| okey | the key position usually representing an 'o' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| pkey | the key position usually representing an 'p' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| qkey | the key position usually representing an 'q' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| rkey | the key position usually representing an 'r' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| skey | the key position usually representing an 's' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| tkey | the key position usually representing an 't' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| ukey | the key position usually representing an 'u' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| vkey | the key position usually representing an 'v' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| wkey | the key position usually representing an 'w' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| xkey | the key position usually representing an 'x' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| ykey | the key position usually representing an 'y' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| zkey | the key position usually representing an 'z' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| 1key | the key position usually representing an '1' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| 2key | the key position usually representing an '2' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| 3key | the key position usually representing an '3' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| 4key | the key position usually representing an '4' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| 5key | the key position usually representing an '5' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| 6key | the key position usually representing an '6' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| 7key | the key position usually representing an '7' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| 8key | the key position usually representing an '8' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| 9key | the key position usually representing an '9' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| 0key | the key position usually representing an '0' character on an English keyboard, regardless of the keyboard locale or its visual appearance | |
| esckey | the key position usually representing an esc key on a keyboard, regardless of the keyboard locale or its visual appearance [we need a visual map for each device] | |
| tabkey | the key position for a tab key or character on a keyboard, regardless of the keyboard locale or its visual appearance [we need a visual map for each device] | |
| spacebar | the key position for a spacebar on a keyboard, regardless of the keyboard locale or its visual appearance [we need a visual map for each device] | |
| returnorenter | the key position usually representing either the return or enter key on a keyboard (regardless of which key the user uses), regardless of the keyboard locale or its visual appearance [we need a visual map for each device] | |
| return | the key position usually representing a return key on a keyboard, regardless of the keyboard locale or its visual appearance [we need a visual map for each device] | |
| enter | the key position usually representing an enter key on a keyboard, regardless of the keyboard locale or its visual appearance [we need a visual map for each device] | |
| backspace | the key position usually representing a backspace (or backspace delete) key on a keyboard, regardless of the keyboard locale or its visual appearance [we need a visual map for each device] | |
| uparrow | the key position usually representing a up arrow key on a keyboard, regardless of the keyboard locale or its visual appearance [we need a visual map for each device] | |
| downarrow | the key position usually representing a down arrow key on a keyboard, regardless of the keyboard locale or its visual appearance [we need a visual map for each device] | |
| leftarrow | the key position usually representing a left arrow key on a keyboard, regardless of the keyboard locale or its visual appearance [we need a visual map for each device] | |
| rightarrow | the key position usually representing a right arrow key on a keyboard, regardless of the keyboard locale or its visual appearance [we need a visual map for each device] | |
| pageup | the key position usually representing a page up key on a keyboard, regardless of the keyboard locale or its visual appearance [we need a visual map for each device] | |
| pagedown | the key position usually representing a page down key on a keyboard, regardless of the keyboard locale or its visual appearance [we need a visual map for each device] | |
| homekey | the key position usually representing a home key on a keyboard, regardless of the keyboard locale or its visual appearance [we need a visual map for each device] | |
| endkey | the key position usually representing a end key on a keyboard, regardless of the keyboard locale or its visual appearance [we need a visual map for each device] | |
| delkey | the key position usually representing a del key on a keyboard, regardless of the keyboard locale or its visual appearance [we need a visual map for each device] | |
| inskey | the key position usually representing a ins key on a keyboard, regardless of the keyboard locale or its visual appearance [we need a visual map for each device] | |
| f1key | the key position usually representing a f1 function key on a keyboard, regardless of the keyboard locale or its visual appearance [we need a visual map for each device] |
- QNames for extended keyboard for specialty character keys some of which often vary widely from locale to locale: §, `, -, =, [, ], ;, ', \, ,, ., /, and therefore may be more difficult to provide for unambiguous mnemonic QNames [especially ` and § but maybe others too]
- QNames to allow entry that does not distinguish (such as returnorenter)
- QNames to allow entry that does distinguish (such as 9key, alpha9, num9 where the first does not distinguish and the other two do distinguish)
- access draft compatible QNames where the input is whatever input event would otherwise cause the indicated character inserted into a hypothetical insertion point (e.g., 'a', for 'a' or 'A', 'b', for 'b' or "B", etc.)
- Qnames for pointing devices
- QNames for touch devices
- QNames for game controllers
- QNames for phone keypads (typically 12 keys)
Units
HTML provides a limited set of QNames to allow authors to indicate the units for quantities used within their documents. The unit QNames include the SI unit prefixes and SI measurement units and so those provide a fairly comprehensive set of units to express establish measurements. US customary units are also included which together with the SI units provide most units in current use. The use of QNames also permits other authoring communities to establish alternate unit QNames. For example, a community that wanted to differentiate British Imperial units from the US customary units of the same name could do so through a separate namespace for one or the other or even both.
Also each unit QName refers to the unit of the corresponding name from the designated contemporary standards body steward. However, these QNames reference those units independent of their present steward so that when comparing units from one document to another, caution must be exercised and consumers must ensure such comparisons are valid. For example authors should use the US customary unit 'foot' to indicate a US foot. Though if the conversion factor for a foot were ever adjusted in the future, the HTML provided QNames provides no mechanism to differentiate a foot of one vintage from a foot of another vintage. Such precision could be provided though a more rigorous namespace: perhaps a namespace directed towards academic history of thought discussions. However, the HTML provided QNames are sufficiently comprehensive and the adjustments are seldom and subtle enough to be insignificant for most authors and users.
Types:
- SI Units (current steward: Bureau International des Poids et Mesures)
- US Customary Units (current steward National Institute of Standards and Technology (NIST), formerly known between 1901 and 1988 as the National Bureau of Standards (NBS)
- Printing Units (current steward: N/A)
- Computer Units (current steward: N/A)
- Monetary Currencies (current steward: ISO 4217 alphabetic code)
- Calendars and Eras (current steward: various entities)
Unit prefixes (optional)
| Units | units can include multiple space separated QNames where the first QName can be drawn from the unit-prefix QNames and the second from the unit-base QNames | |
| unit-prefix | ||
| n | for none, null, nil, no prefix: [ampersand]#x000D7; 1 | |
| deca | [ampersand]#x000D7; 10 | |
| hecto | [ampersand]#x000D7; 100 | |
| kilo | [ampersand]#x000D7; 103 ([ampersand]#x000D7; 1000) | |
| mega | [ampersand]#x000D7; 106 | |
| giga | [ampersand]#x000D7; 109 | |
| tera | [ampersand]#x000D7; 1012 | |
| peta | [ampersand]#x000D7; 1015 | |
| exa | [ampersand]#x000D7; 1018 | |
| zetta | [ampersand]#x000D7; 1021 | |
| yotta | [ampersand]#x000D7; 1024 | |
| deci | ÷ 10 | |
| centi | ÷ 100 | |
| milli | ÷ 103 (÷ 1000) | |
| micro | ÷ 106 | |
| nano | ÷ 109 | |
| pico | ÷ 1012 | |
| femto | ÷ 1015 | |
| atto | ÷ 1018 | |
| zepto | ÷ 1021 | |
| yocto | ÷ 1024 |
Other Measurement NCName
| NCName | Details |
| General units | |
| per | indicates the QNameRef units prior to 'per' are in a ratio relation with the QNameRef units after |
| percent | per 100 |
| permille | per 1,000 |
| degree | per 360; normally for circular or spherical measures |
| grad | per 400 (right angle = 100) normally circular or spherical measures |
| NCName | Synonyms | Exponential Variants |
| General units | ||
| second | s, sec | s2, sec2, second4, s3, sec3, second3, s4, sec4, second4 |
| meter | metre | meter-1, metre-1 (reciprocal meter), meter2, metre2, meter3, metre3 |
| kilo gram | kilogram, kg | |
The remaining QNames can be used in space separated chains where each QName is understood as forming a product with the next. For example, the value 'pound foot' would indicate the measure of work or torque in pound-foot units. Whereas the value 'meter per second2' would mean a unit of acceleration in meters per second2 (using the 'per' QName).
- meter kilo gram second (meter-kilogram-second)
- mile per hour (miles-per-hour often abbreviated mph)
- meter per second2 or metre per s s (meters-per-second-squared)
Measurement units
| category | NCName | Standard Name | Measurement | Base unit | SI Base conversion | Details |
| General units | ||||||
| percent | ||||||
| permille | ||||||
| SI time units | SI units follow HTML standard of using en-US using meter, but the alternate form metre is acceptable wherever the string meter appears. Also kilogram and second each have alternates 'kg' and 's' respectively within QNames. | |||||
| category | NCName | Standard Name | Measurement | Base unit | SI Base conversion | Details |
| second | time | |||||
| minute | time (second [ampersand]#x000D7; 60) | |||||
| hour | time (minute [ampersand]#x000D7; 60; second [ampersand]#x000D7; 3,600) | |||||
| day | time (hour [ampersand]#x000D7; 24; second [ampersand]#x000D7; 86,400) | |||||
| Other SI units | ||||||
| category | NCName | Standard Name | Measurement | Base unit | SI Base conversion | Details |
| meter ( or metre) | length or distance | |||||
| gram | mass | |||||
| ampere | electric current | |||||
| kelvin | thermodynamic temperature | |||||
| candela | luminous intensity | |||||
| mole | amount of substance | |||||
| hertz | ||||||
| radian | ||||||
| steradian | ||||||
| newton | ||||||
| pascal | ||||||
| joule | ||||||
| watt | ||||||
| coulomb | ||||||
| volt | ||||||
| farad | ||||||
| ohm | ||||||
| siemens | ||||||
| weber | ||||||
| tesla | ||||||
| henry | ||||||
| celcius | degreeCelcius | |||||
| lumen | ||||||
| lux | ||||||
| becquerel | ||||||
| gray | ||||||
| sievert | ||||||
| katal | ||||||
| Typical SI Compound QName Examples | ||||||
| meter2 | Square Metre | |||||
| meter3 | Cubic Metre | |||||
| meter per second2 | ||||||
| meter3 per second | cubic metre per second | |||||
| meter per second 2 | metre per second squared | |||||
| meter per second3 | metre per second cubed | |||||
| meter per second4 | metre per quartic second | |||||
| radian per second | radian per second | |||||
| netwon second | newton second | |||||
| netwon meter second | newton metre second | |||||
| newton meter | newton metre | |||||
| meter-1 | reciprocal metre | |||||
| kilogram per meter3 | kilogram per cubic metre | |||||
| meter3 per kilogram | cubic metre per kilogram | |||||
| mole per meter3 | mole per cubic metre | |||||
| meter3 per mole | cubic metre per mole | |||||
| joule per kelvin | joule per kelvin | |||||
| joule per kelvin mole | joule per kelvin mole | |||||
| joule per kilogram kelvin | joule per kilogram kelvin | |||||
| joule per mole | joule per mole | |||||
| joule per kilogram | joule per kilogram | |||||
| joule per meter3 | joule per cubic metre | |||||
| newton per meter | newton per metre | |||||
| watt per meter2 | watt per square metre | |||||
| watt per meter kelvin | watt per metre kelvin | |||||
| meter2 per second | square metre per second | |||||
| pascal second | pascal second | |||||
| coulomb per meter3 | coulomb per cubic metre | |||||
| ampere per meter2 | ampere per square metre | |||||
| siemens per meter | siemens per metre | |||||
| siemens meter2 per mole | siemens square metre per mole | |||||
| farad per meter | farad per metre | |||||
| henry per meter | henry per metre | |||||
| volt per meter | volt per metre | |||||
| ampere per meter | ampere per metre | |||||
| candela per meter2 | candela per square metre | |||||
| coulomb per kilogram | coulomb per kilogram | |||||
| gray per second | gray per second | |||||
| ohm meter | ohm metre | |||||
| kilometres per hour | kilometres per hour | |||||
| US customary length/distance units | ||||||
| category | NCName | Standard Name | Measurement | Base unit | SI Base conversion | Details |
| inch | length or distance equal to 0.0254 [ampersand]#x000D7; meter | |||||
| foot | length or distance equal to 12 [ampersand]#x000D7; inch | |||||
| yard | length or distance equal to 36 [ampersand]#x000D7; inch | |||||
| mile | length or distance equal to 1,760 [ampersand]#x000D7; yard | |||||
| US customary survey length units | ||||||
| category | NCName | Standard Name | Measurement | Base unit | SI Base conversion | Details |
| link | length or distance equal to 33/50 surveyfoot units | |||||
| surveyfoot | length or distance equal to 1200/3937 SI meters | |||||
| rod | length or distance equal to 25 link units | |||||
| chain | length or distance equal to 4 rod units | |||||
| furlong | length or distance equal to 10 chain units | |||||
| surveymile | length or distance equal to 80 chain units | |||||
| US customary liquid capacity/volume units | ||||||
| category | NCName | Standard Name | Measurement | Base unit | SI Base conversion | Details |
| minim | volume | |||||
| dram | volume | |||||
| ounce | volume | |||||
| gill | volume | |||||
| cup | volume | |||||
| pint | volume | |||||
| quart | volume | |||||
| gallon | volume | |||||
| beerbarrel | volume | |||||
| oilbarrel | volume | |||||
| hogshead | volume | |||||
| US customary dry capacity/volume units | ||||||
| category | NCName | Standard Name | Measurement | Base unit | SI Base conversion | Details |
| drypint | ||||||
| dryquart | ||||||
| drygallon | ||||||
| peck | ||||||
| bushel | ||||||
| US customary mass/weight units | ||||||
| category | NCName | Standard Name | Measurement | Base unit | SI Base conversion | Details |
| grain | ||||||
| dram | ||||||
| ounce | ||||||
| pound | ||||||
| hundredweight | ||||||
| ton | ||||||
| pennyweight | ||||||
| troyounce | ||||||
| troypound | ||||||
| US customary cooking units | ||||||
| category | NCName | Standard Name | Measurement | Base unit | SI Base conversion | Details |
| teaspoon | ||||||
| tablespoon | ||||||
| stick | ||||||
| US customary other units | ||||||
| category | NCName | Standard Name | Measurement | Base unit | SI Base conversion | Details |
| fahrenheit | ||||||
| btu | ||||||
| horsepower | ||||||
| hand | ||||||
| calorie | ||||||
| board-foot | ||||||
| r-value | ||||||
| slug | ||||||
More units?: perhaps these should be organized by prefix anyway; or metric as namespaced HTML and other as non-HTML namespace such as uscu:foot, si:meter, be:ounce others?
The US customary units do not necessarily need to be so comprehensive for the HTML namespace. Adding these now for comment, discussion, and feedback purposes and the list can be pared down later.
Other possible units
- points
- picas
- ems
- exs
- degrees
- grad
Computer-related measurements
- bit
- byte
- pixel
- pixel density units
Monetary currencies
Authors can use any ISO 4217 alphabetic code as a QName in the HTML namespace for units. The other unit QNames (calendars and measurement units) both follow lexical conventions that should avoid any name collisions with ISO4217. Calendars are never three letters and are mixed case. The other units are always lower case. Collisions with other QNames are not important since the semantics of a QName can be different when used for different attribute values.
| Currencies | ||||||
| QNameRef | Details | |||||
Calendars
| Calendars | |
| Gregorian | |
| Julian | |
| Hebrew | |
| Islamic | |
| JulianDay | |
| ModifiedJulianDay | |
| Buddhist | |
| IndianCivil | |
| Persian | |
UA handling of data types
Numbers
Number DOM Interface
Attributes to allow access to:
- wholenumber
- fractionalnumber (numerator)
- denominator
- decimalfraction
- imaginarycomponent
- polarradius
- coeficient
- exponent
CSS and presentational requirements
For the presentation layer, numbers can be converted from numeral presentation to word presentation or mixed numeral presentation in a localized fashion. See wikipedia article on large numbers for some indication of the English language. This also suggests the presentation layer would need to include a property to distinguish between the short scale and the long scale.
For number presentation and base changes [1].
- case insensitive A-Z indicates digits beyond 9 for other base number as indicated by the peer 'numberbase' attribute.
- lowercase [ampersand]#x003B1;-[ampersand]#x003C9; (with the exception of [ampersand]#x003C0; which is reserved for the mathematical constant and [ampersand]nu; ([ampersand]#x003BD;) and [ampersand]omicron; ([ampersand]#x003BF;) due to ambiguity with Latin lowercase 'v' and 'o' ) indicates digits beyond Z (base36) for other base number as indicated by the peer 'numberbase' attribute
- some additional letters to reach base60 or base64 without turning to a separate recommendation
Overall
Supports the formatting of numbers in terms of:
- numeral system
- alternate base
- numerals or words (number names including long or short scales)
- fractional or decimal forms for non-integer numbers
- customization of notation for negative and positive, scientific notation, polar form, cartesian form
- precision and rounding rules
- customization and localization of unit names and unit name prefixes/suffixes/qualifiers
- decimal separator character, group separator character and grouping count/arrangement
Properties
Possible keyword in parentheses, bold indicates the default.
- numeral-system (arabic-indic, roman, ancient-greek, cuneiform, counting-rod)
- base-system (decimal, hexadecimal, binary, <any integer>)
- base-digits (a list of space-separated digits from 0 to B, where B is the size of the base-system)
- scientific-notation (?)
- precision [the number of digits in the coefficient in scientific notation, excluding leading and trailing zeros]
- word-scale (short, long)
- rounding (round, truncate, ?)
- digit-words [a list of words from 0 to B where B is the size of the base-system, used to express the digits in any base; default is a localized strings for 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', eight', nine
- place-words [a list of strings expressing the names of each named place in the words for numbers; the default is localized strings for 'ten', 'hundred', 'thousand']
- group-words [a list of strings expressing the names of each group; the default is localized strings for 'million', 'billion', 'trillion', 'quadrillion', 'quintillion', etc.]
- named-words [a list of number name pairs for any named numbers; default is 10='ten', 11='eleven', 12='twelve', 13='thirteen', 14='fourteen', 15='fifteen', 16='sixteen', 17='seventeen', 18='eighteen', 19='nineteen', 20='twenty' 30='thirty' 40='forty', 50='fifty' 60='sixty', 70='seventy', 80='eighty', 90='ninety']
- number-format [a structured syntax that indicates how each digit, place and group should be expressed; #GN## for group, number-name, numeral-digit]
- negative-sign string ([ampersand]#x2212; U+2212)
- scientific-notation-form string (coefficient [ampersand]#x000D7;10exponent where the keywords 'coefficient' and 'exponent' serve as a placeholders for the coefficient and exponent)
- fraction-separator (/ U+2044 by default)
- mixed-number-separator (U+0020 by default)
Optionally UAs may support the presentation of numbers as
- decimal representation or mixed number representation (with the CSS specified precision when expressing mixed numbers in decimal form)
- polar form or cartesian form
pseudo class selectors
[need some way to select numbers based on their size and express the boundaries between different size numbers like @large 100 @verylarge 1000000]
- :negative
- :large
- :verylarge
- :complexnumber
DateTime
CSS and presentational requirements
- conversion between calendars [as an optional capability?]
- conversion between eras [as an optional capability?]
- Customized and localized notation for AM, PM, AD/CE, BC/BCE, timzeone offsets, etc.
- formatting dates and times in terms of numerals and words [e.g., 8 January 2009 or January, 8 2009 or 8/1/2009, etc]
TimeInterval
CSS and presentational requirements
- presentation as the star and end of the interval, the duration or both
- unit selection
Other date and time related data type aspects
| category | NCName | Standard Name | Measurement | Base unit | SI Base conversion | Details |
| tzname | TimeZoneName | X | In contrast to the timezone offset (such as -5:00) used in ISO 8601, this is the Time Zone Name that may include additional information such as DST | |||
| dst | boolean | X | Indicates the time expressed in 'datestamp' is with daylight savings time in effect. | |||
| calendarera | QName | X | default: "CommonEra". Indicates the meaning of the year field in the datestamp attribute. "CommonEra' is available for either the Gregorian or Julian calendar QNames. Other values are calendar specific. | |||
| calendar | QName | X | default; "Gregorian". The calendar expressed within the element. While the calendar used for the attributes is always the Gregorian calendar (proleptic or otherwise), the contents of the element may express the date in another calendar: the calendar attribute indicates the calendar of the element's date contents. HTML QNames include: Gregorian, Julian, JulianDay, ModifiedJulianDay, Buddhist, Islamic, Hebrew, Persian, Indian, other?) |
Notes
- ↑ Perhaps we do not need the multiple base support in the entry of data and merely support it in the CSS presentation of the data. In contrast we may want to support all Unicode numeric decimal digits (general category Nd) for better I18N support. The presentation of these values should be handled with even more I18N support through CSS permitting changes in base, notation, decimal digits / place numerals (e.g., Hindi instead of ASCII), mixture of words and numerals (e.g., 5 Million), and even altering the numeral system (e.g., Roman, Cuneiform, or Ancient Greek instead of Arabic-Indic)

