Accessibility/Datatypes: Difference between revisions

No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Proposal ==
== Proposal ==
* Change aaa:datatype attribute name to aaa:type (to match what's used with schema)
* Allow aaa:datatype attribute to point to any schema, e.g. type="my:phonenumber"
* Allow aaa:type attribute to point to any schema, e.g. type="my:phonenumber"
* The user agent will parse the data type pointed to and provide the following information via ATK/AT-SPI/IAccessible2 object attributes (which can expose arbitrary string values)
* The user agent will parse the data type pointed to and provide the following information via ATK/AT-SPI/IAccessible2 object attributes (which can expose arbitrary string values)
* Each element on the page can utilize a simple type, and the schema can define the xs:restrictions as well as the xs:use attribute
* Each element on the page can utilize a simple type, and the schema can define the xs:restrictions as well as the xs:use attribute
* If a complex type is used, it makes the most sense to map this to multiple elements on the page, each with its own simple type
* If a complex type is used, it makes the most sense to map this to multiple elements on the page, each with its own simple type
* Note that this means HTML will be usable for author defined types, because it does not support xmlns, and thus the actualy datatype would not be reachable by the user agent.
* Note that this means HTML will *not* be usable for author defined types, because it does not support xmlns, and thus the actualy datatype would not be reachable by the user agent.


{| summary="Proposed data type attribute to mapping" width="90%" border="1" cellspacing="1" cellpadding="1"
{| summary="Proposed data type attribute to mapping" width="90%" border="1" cellspacing="1" cellpadding="1"
Line 12: Line 11:
! Notes
! Notes
|-
|-
| aaa:type
| aaa:datatype
| "xs-type"
| "datatype"
|
|
|-
|-
| xs:base
| xs:base
| "xs-basetype"
| "datatypebase"
| What the type is derived from. Must be one of the built-in types such as xs:integer. If original aaa:type is one of the built-in types, then this will be the same.
| What the type is derived from. Must be one of the built-in types such as xs:integer. If original aaa:datatype is one of the built-in types, then this will be the same.
|-
|-
| xs:minLength
| xs:minLength
| "xs-minlength"
| "value-minlength"
|
|
|-  
|-  
| xs:maxLength
| xs:maxLength
| "xs-maxlength"
| "value-maxlength"
|
|
|-  
|-  
| xs:length
| xs:length
| "xs-minlength" and "xs-maxlength"  
| "valueminlength" and "valuemaxlength"  
| Expose these two attributes with the same value
| Expose these two attributes with the same value
|-
|-
| xs:totalDigits
| xs:totalDigits
| "xs-totaldigits"
| "value-total-digits"
|
|
|-
|-
| xs:fractionDigits
| xs:fractionDigits
| "xs-fractiondigits"
| "value-fraction-digits"
|
|
|-
|-
Line 53: Line 52:
|-
|-
| xs:whiteSpace
| xs:whiteSpace
| "xs-whitespace"
| "value-whitespace"
|
|
|-  
|-  
| xs:pattern
| xs:pattern
| "xs-pattern"
| "value-pattern"
|
|
|-
|-
| xs:enumeration
| xs:enumeration
| "xs-pattern" (must be built by in the format "<nowiki>string1|string2|string3</nowiki>"), with appropriate characters escaped with a backslash
| "value-pattern" (must be built by in the format "<nowiki>string1|string2|string3</nowiki>"), with appropriate characters escaped with a backslash
| same functionality as xs:pattern, so to simplify we expose the same way
| same functionality as xs:pattern, so to simplify we expose the same way
|-
|-
| xs:minInclusive
| xs:minInclusive
| "xs-valuemin"
| "valuemin"
| When aaa:valuemin is also set, the schema minimum value will be used
| When aaa:valuemin is also set, the schema minimum value will be used
|-
|-
| xs:maxInclusive
| xs:maxInclusive
| "xs-valuemax"
| "valuemax"
| When aaa:valuemax is also set, the schema maximum value will be used
| When aaa:valuemax is also set, the schema maximum value will be used
|-
|-
| xs:minExclusive
| xs:minExclusive
| "xs-valuemin" + "xs-exclude-min"="true"
| "valuemin" + "valuemin-exclude"="true"
|
|
|-
|-
| xs:maxExclusive
| xs:maxExclusive
| "xs-valuemax" + "xs-exclude-max"="true"
| "valuemax" + "valuemax-exclude"="true"
|
|
|-
|-
| xs:union
| xs:union
| "xs-pattern"
| "value-pattern"
| This must be generated as a fixup to "xs-pattern" using the OR operator
| This must be generated as a fixup to "value-pattern" using the OR operator
|-
|-
| xs:list
| xs:list
| "xs-list"="true" and change "xs-base" to the specified xs:itemType for the list
| "value-list"="true" and change "datatypebase" to the specified xs:itemType for the list
|  
|  
|}
|}
346

edits