diff --git a/html5-syntax/applications.rnc b/html5-syntax/applications.rnc deleted file mode 100644 index 921a55133..000000000 --- a/html5-syntax/applications.rnc +++ /dev/null @@ -1,260 +0,0 @@ -datatypes w = "http://whattf.org/datatype-draft" - -# ##################################################################### -## RELAX NG Schema for HTML 5: Web Application Features # -# ##################################################################### - -## Additions to Common Attributes - - common.attrs.interact &= - ( common.attrs.contextmenu? - & common.attrs.contenteditable? - & common.attrs.draggable? - & common.attrs.hidden? - & common.attrs.spellcheck? - ) - - common.attrs.other &= common.attrs.interact - -## Context Menu: contextmenu - - common.attrs.contextmenu = - attribute contextmenu { - common.data.idref - } - -## Editable Content: contenteditable - - common.attrs.contenteditable = - attribute contenteditable { - w:string "true" | w:string "false" | w:string "" - } - -## Draggable Element: draggable - - common.attrs.draggable = - attribute draggable { - w:string "true" | w:string "false" - } - -## Hidden Element: hidden - - common.attrs.hidden = - attribute hidden { - w:string "hidden" | w:string "" - } - -## Spellchecking and grammar checking: spellcheck - - common.attrs.spellcheck = - attribute spellcheck{ - w:string "true" | w:string "false" | w:string "" - } - -## Application Cache: manifest - - html.attrs.manifest = - attribute manifest { - common.data.uri - } - - html.attrs &= html.attrs.manifest? - -## Progess Indicator: - - progress.elem = - element progress { progress.inner & progress.attrs } - progress.attrs = - ( common.attrs - & progress.attrs.value? - & progress.attrs.max? - ) - progress.attrs.value = - attribute value { - common.data.float.non-negative - } - progress.attrs.max = - attribute max { - common.data.float.positive - } - progress.inner = - ( common.inner.phrasing ) #Cannot enforce textContent format here - - common.elem.phrasing |= progress.elem - -## Command with an associated action: - - command.command.elem = - element command { command.inner & command.command.attrs } - command.command.attrs = - ( common.attrs - & command.command.attrs.type? - & common-command.attrs - ) - command.command.attrs.type = - attribute type { - w:string "command" - } - command.elem = command.command.elem - -## Selection of one item from a list of items: - - command.radio.elem = - element command { command.inner & command.radio.attrs } - command.radio.attrs = - ( common.attrs - & ( command.radio.attrs.type - & command.radio.attrs.radiogroup #REVISIT taking liberties here - & command.radio.attrs.checked? - ) - & common-command.attrs - ) - command.radio.attrs.type = - attribute type { - w:string "radio" - } - command.radio.attrs.radiogroup = - attribute radiogroup { - string #REVISIT need special format here? - } - command.radio.attrs.checked = - attribute checked { - w:string "checked" | w:string "" - } - command.elem |= command.radio.elem - -## State or option that can be toggled: - - command.checkbox.elem = - element command { command.inner & command.checkbox.attrs } - command.checkbox.attrs = - ( common.attrs - & ( command.checkbox.attrs.type - & command.checkbox.attrs.checked? - ) - & common-command.attrs - ) - command.checkbox.attrs.type = - attribute type { - w:string "checkbox" - } - command.checkbox.attrs.checked = - attribute checked { - w:string "checked" | w:string "" - } - command.elem |= command.checkbox.elem - - common-command.attrs = - ( command.attrs.label? - & command.attrs.icon? - & command.attrs.disabled? - ) - command.attrs.label = - attribute label { - string - } - command.attrs.icon = - attribute icon { - common.data.uri - } - command.attrs.disabled = - attribute disabled { - w:string "disabled" | w:string "" - } - command.inner = - ( empty ) - - common.elem.metadata |= - ( command.elem & nonHTMLizable ) - common.elem.phrasing |= command.elem - -## Menu: - - menu.elem = - element menu { menu.inner & menu.attrs } - menu.attrs = - ( common.attrs - & menu.attrs.type? - & menu.attrs.label? - ) - menu.attrs.type = - attribute type { - w:string "toolbar" | w:string "context" - } - menu.attrs.label = - attribute label { - string - } - menu.inner = - ( mli.elem* - | common.inner.flow - ) - - common.elem.flow |= menu.elem - # REVISIT allow nested menus - -## Menu Item:
  • - - mli.elem = - element li { mli.inner & mli.attrs } - mli.attrs = - ( common.attrs ) - mli.inner = - ( common.inner.flow ) - -## Canvas for Dynamic Graphics: - - canvas.elem.flow = - element canvas { canvas.inner.flow & canvas.attrs } - canvas.elem.phrasing = - element canvas { canvas.inner.phrasing & canvas.attrs } - canvas.attrs = - ( common.attrs - & canvas.attrs.height? - & canvas.attrs.width? - & common.attrs.aria? - ) - canvas.attrs.height = - attribute height { - common.data.integer.non-negative - } - canvas.attrs.width = - attribute width { - common.data.integer.non-negative - } - canvas.inner.flow = - ( common.inner.flow ) - canvas.inner.phrasing = - ( common.inner.phrasing ) - - common.elem.flow |= canvas.elem.flow - common.elem.phrasing |= canvas.elem.phrasing - -## Additional On-Demand Information:
    - - details.elem = - element details { details.inner & details.attrs } - details.attrs = - ( common.attrs - & details.attrs.open? - & common.attrs.aria.implicit.region? - ) - details.attrs.open = - attribute open { - w:string "open" | w:string "" - } - details.inner = - ( summary.elem? - , common.inner.flow - ) - - common.elem.flow |= details.elem - -## Caption/summary for details element: - - summary.elem = - element summary { summary.inner & summary.attrs } - summary.attrs = - ( common.attrs ) - summary.inner = - ( common.inner.phrasing ) diff --git a/html5-syntax/applications.rng b/html5-syntax/applications.rng new file mode 100644 index 000000000..016f8c67c --- /dev/null +++ b/html5-syntax/applications.rng @@ -0,0 +1,437 @@ + + + + + RELAX NG Schema for HTML 5: Web Application Features # + + Additions to Common Attributes + + + + + + + + + + + + + + + + + + + + + + + Context Menu: contextmenu + + + + + + Editable Content: contenteditable + + + true + false + + + + + + Draggable Element: draggable + + + true + false + + + + + Hidden Element: hidden + + + hidden + + + + + + Spellchecking and grammar checking: spellcheck + + + true + false + + + + + + Application Cache: manifest + + + + + + + + + + + Progess Indicator: <progress> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Command with an associated action: <command type='command'> + + + + + + + + + + + + + + + + + + + command + + + + + + + Selection of one item from a list of items: <command type='radio'> + + + + + + + + + + + + + + + + + + + + + + + + radio + + + + + + + + + + + + checked + + + + + + + + + State or option that can be toggled: <command type='checkbox'> + + + + + + + + + + + + + + + + + + + + + + checkbox + + + + + + checked + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + disabled + + + + + + + + + + + + + + + + + + Menu: <menu> + + + + + + + + + + + + + + + + + + + + + + toolbar + context + + + + + + + + + + + + + + + + + + + + + + Menu Item: <li> + + + + + + + + + + + + + + + Canvas for Dynamic Graphics: <canvas> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Additional On-Demand Information: <details> + + + + + + + + + + + + + + + + + + + + + + open + + + + + + + + + + + + + + + Caption/summary for details element: <summary> + + + + + + + + + + + + + + diff --git a/html5-syntax/aria.rnc b/html5-syntax/aria.rnc deleted file mode 100644 index 9721d36e0..000000000 --- a/html5-syntax/aria.rnc +++ /dev/null @@ -1,1017 +0,0 @@ -# ##################################################################### -## RELAX NG Schema for HTML 5: Accessible Rich Internet Applications # -# ##################################################################### - -# ##################################################################### -## ARIA - -## Global states and properties - -aria.global = - ( aria.prop.atomic? - & aria.state.busy? - & aria.prop.controls? - & aria.prop.describedby? - & aria.state.disabled? - & aria.state.dropeffect? - & aria.prop.flowto? - & aria.state.grabbed? - & aria.prop.haspopup? - & aria.state.hidden? - & aria.state.invalid? - & aria.prop.label? - & aria.prop.labelledby? - & aria.prop.live? - & aria.prop.owns? - & aria.prop.relevant? - & aria.prop.required? - ) - -common.attrs.other &= aria.global? - -## States and Properties for Native Roles - -# common.attrs.aria.implicit.button |= -# ( aria.prop.controls? -# ) - -# common.attrs.aria.implicit.input |= -# ( aria.prop.controls? -# & aria.state.invalid? -# & aria.prop.required? -# ) - -common.attrs.aria.implicit.region |= - ( aria.state.expanded? -# & aria.prop.level? - ) - -common.attrs.aria.implicit.group |= - ( aria.state.expanded? - & aria.prop.activedescendant? - ) - -common.attrs.aria.implicit.th |= - ( aria.prop.sort? - & aria.prop.level? - & aria.state.expanded? - & aria.prop.readonly? - & aria.state.selected? - ) - -# common.attrs.aria.implicit.structure |= -# ( aria.prop.atomic? -# & aria.state.busy? -# & aria.prop.channel? -# & aria.prop.live? -# & aria.prop.relevant? -# ) - -# common.attrs.aria.implicit.link |= -# ( aria.prop.controls? -# & aria.state.disabled? -# ) - -common.attrs.aria.implicit.listitem |= - ( aria.prop.posinset? - & aria.prop.setsize? -# & aria.prop.atomic? - ) - -# common.attrs.aria.implicit.img |= -# ( aria.prop.atomic? -# & aria.state.busy? -# & aria.prop.channel? -# & aria.prop.controls? -# & aria.prop.live? -# & aria.prop.relevant? -# ) - -#common.attrs.aria.implicit.select |= -# ( aria.state.invalid? -# & aria.prop.required? -# & aria.prop.atomic? -# & aria.state.busy? -# & aria.prop.channel? -# & aria.prop.controls? -# & aria.prop.live? -# & aria.prop.relevant? -# ) - -# ##################################################################### -## States - -## busy - aria.state.busy = - attribute aria-busy - { string "true" - | string "false" #default - } - -## checked - aria.state.checked = - attribute aria-checked - { string "true" - | string "false" - | string "mixed" - | string "undefined" #default - } - -## disabled - aria.state.disabled = - attribute aria-disabled - { string "true" - | string "false" #default - } - -## dropeffect - aria.state.dropeffect = - attribute aria-dropeffect - { token "none" #default - | token "popup" - | token "execute" - | list - { ( string "copy" ) - , ( string "execute" )? - } - | list - { ( string "move" ) - , ( string "execute" )? - } - | list - { ( string "reference" ) - , ( string "execute" )? - } - | list - { ( string "execute" ) - , ( string "copy" ) - } - | list - { ( string "execute" ) - , ( string "move" ) - } - | list - { ( string "execute" ) - , ( string "reference" ) - } - } - -## expanded - aria.state.expanded = - attribute aria-expanded - { string "true" - | string "false" - | string "undefined" #default - } - -## grabbed - aria.state.grabbed = - attribute aria-grabbed - { string "true" - | string "false" - | string "undefined" #default - } - -## hidden - aria.state.hidden = - attribute aria-hidden - { string "true" - | string "false" #default - } - -## invalid - aria.state.invalid = - attribute aria-invalid - { string "true" - | string "false" #default - | string "grammar" - | string "spelling" - } - -## pressed - aria.state.pressed = - attribute aria-pressed - { string "true" - | string "false" - | string "mixed" - | string "undefined" #default - } - -## selected - aria.state.selected = - attribute aria-selected - { string "true" - | string "false" - | string "undefined" #default - } - - - -# ##################################################################### -## Properties - -## activedescendant - aria.prop.activedescendant = - attribute aria-activedescendant { - common.data.idref #REVISIT add Schematron check - } - -## atomic - aria.prop.atomic = - attribute aria-atomic - { string "true" - | string "false" #default - } - -## autocomplete - aria.prop.autocomplete = - attribute aria-autocomplete - { string "inline" - | string "list" - | string "both" - | string "none" #default - } - -## controls - aria.prop.controls = - attribute aria-controls { - common.data.idrefs #REVISIT add Schematron check - } - -## describedby - aria.prop.describedby = - attribute aria-describedby { - common.data.idrefs #REVISIT add Schematron check - } - -## flowto - aria.prop.flowto = - attribute aria-flowto { - common.data.idrefs #REVISIT add Schematron check - } - -## haspopup - aria.prop.haspopup = - attribute aria-haspopup - { string "true" #REVISIT check owns or descendant - | string "false" #default - } - -## label - aria.prop.label = - attribute aria-label { - string - } - -## labelledby - aria.prop.labelledby = - attribute aria-labelledby { - common.data.idrefs #REVISIT add Schematron check - } - -## level - aria.prop.level = - attribute aria-level { - common.data.integer.positive - } - -## live - aria.prop.live = - attribute aria-live - { string "off" #default - | string "polite" - | string "assertive" - } - -## multiline - aria.prop.multiline = - attribute aria-multiline - { string "true" - | string "false" #default - } - -## multiselectable - aria.prop.multiselectable = - attribute aria-multiselectable - { string "true" - | string "false" #default - } - -## owns - aria.prop.owns = - attribute aria-owns { - common.data.idrefs #REVISIT add Schematron check - } - -## posinset - aria.prop.posinset = - attribute aria-posinset { - common.data.integer.positive - } - -## readonly - aria.prop.readonly = - attribute aria-readonly - { string "true" - | string "false" #default - } - -## relevant - aria.prop.relevant = - attribute aria-relevant - { token "all" - | list - { ( string "additions" ) - , ( string "removals" )? - , ( string "text" )? - } - | list - { ( string "additions" ) - , ( string "text" )? - , ( string "removals" )? - } - | list - { ( string "removals" ) - , ( string "additions" )? - , ( string "text" )? - } - | list - { ( string "removals" ) - , ( string "text" )? - , ( string "additions" )? - } - | list - { ( string "text" ) - , ( string "additions" )? - , ( string "removals" )? - } - | list - { ( string "text" ) - , ( string "removals" )? - , ( string "additions" )? - } - } - -## required - aria.prop.required = - attribute aria-required - { string "true" - | string "false" #default - } - -## setsize - aria.prop.setsize = - attribute aria-setsize { - common.data.integer.non-negative - } - -## sort - aria.prop.sort = - attribute aria-sort - { string "ascending" - | string "descending" - | string "none" #default - | string "other" - } - -## valuemax - aria.prop.valuemax = - attribute aria-valuemax { - common.data.float #REVISIT - } - -## valuemin - aria.prop.valuemin = - attribute aria-valuemin { - common.data.float #REVISIT - } - -## valuenow - aria.prop.valuenow = - attribute aria-valuenow { - common.data.float #REVISIT - } - -## valuetext - aria.prop.valuetext = - attribute aria-valuetext { - string - } - -# ##################################################################### -## Roles - -## alert - aria.alert = - ( aria.role.alert - & aria.state.expanded? - ) - aria.role.alert = - attribute role { string "alert" } - - common.attrs.aria |= aria.alert - -## alertdialog - aria.alertdialog = - ( aria.role.alertdialog - & aria.state.expanded? - ) - aria.role.alertdialog = - attribute role { string "alertdialog" } - - common.attrs.aria |= aria.alertdialog - -## application - aria.application = - ( aria.role.application - & aria.state.expanded? - ) - aria.role.application = - attribute role { string "application" } - - common.attrs.aria |= aria.application - common.attrs.aria.landmark.application |= aria.application - -## article - aria.article = - ( aria.role.article - & aria.state.expanded? - ) - aria.role.article = - attribute role { string "article" } - - common.attrs.aria |= aria.article - common.attrs.aria.landmark.article |= aria.article - -## banner - aria.banner = - ( aria.role.banner - & aria.state.expanded? - ) - aria.role.banner = - attribute role { string "banner" } - - common.attrs.aria |= aria.banner - common.attrs.aria.landmark.banner |= aria.banner - -## button - aria.button = - ( aria.role.button - & aria.state.pressed? # not inherited - ) - aria.role.button = - attribute role { string "button" } - - common.attrs.aria |= aria.button - -## checkbox - aria.checkbox = - ( aria.role.checkbox - & aria.state.checked #required! - ) - aria.role.checkbox = - attribute role { string "checkbox" } - - common.attrs.aria |= aria.checkbox - -# XXX columnheader - -## combobox - aria.combobox = - ( aria.role.combobox - & aria.prop.activedescendant? - & aria.state.expanded #required! - ) - aria.role.combobox = - attribute role { string "combobox" } - - common.attrs.aria |= aria.combobox - -## complementary - aria.complementary = - ( aria.role.complementary - & aria.state.expanded? - ) - aria.role.complementary = - attribute role { string "complementary" } - - common.attrs.aria |= aria.complementary - common.attrs.aria.landmark.complementary |= aria.complementary - -## contentinfo - aria.contentinfo = - ( aria.role.contentinfo - & aria.state.expanded? - ) - aria.role.contentinfo = - attribute role { string "contentinfo" } - - common.attrs.aria |= aria.contentinfo - common.attrs.aria.landmark.contentinfo |= aria.contentinfo - -## definition - aria.definition = - ( aria.role.definition - & aria.state.expanded? - ) - aria.role.definition = - attribute role { string "definition" } - - common.attrs.aria |= aria.definition - -## dialog - aria.dialog = - ( aria.role.dialog - & aria.state.expanded? - ) - aria.role.dialog = - attribute role { string "dialog" } - - common.attrs.aria |= aria.dialog - -## directory - aria.directory = - ( aria.role.directory - & aria.state.expanded? - ) - aria.role.directory = - attribute role { string "directory" } - - common.attrs.aria |= aria.directory - -## document - aria.document = - ( aria.role.document - & aria.state.expanded? - ) - aria.role.document = - attribute role { string "document" } - - common.attrs.aria |= aria.document - common.attrs.aria.landmark.document |= aria.document - -## grid - aria.grid = - ( aria.role.grid - & aria.prop.level? # not inherited - & aria.prop.multiselectable? # not inherited - & aria.prop.readonly? # not inherited - & aria.prop.activedescendant? - & aria.state.expanded? - ) - aria.role.grid = - attribute role { string "grid" } - - common.attrs.aria |= aria.grid - -## gridcell - aria.gridcell = - ( aria.role.gridcell - & aria.prop.level? # net inherited - & aria.prop.readonly? # not inherited - & aria.state.selected? # not inherited - & aria.state.expanded? - ) - aria.role.gridcell = - attribute role { string "gridcell" } - - common.attrs.aria |= aria.gridcell - -## group - aria.group = - ( aria.role.group - & aria.prop.activedescendant? # not inherited - & aria.state.expanded? # not inherited - ) - aria.role.group = - attribute role { string "group" } - - common.attrs.aria |= aria.group - -## XXX heading - -## img - aria.img = - ( aria.role.img - & aria.state.expanded? - ) - aria.role.img = - attribute role { string "img" } - - common.attrs.aria |= aria.img - -## link - aria.link = - ( aria.role.link - ) - aria.role.link = - attribute role { string "link" } - - common.attrs.aria |= aria.link - -## list - aria.list = - ( aria.role.list - & aria.state.expanded? - ) - aria.role.list = - attribute role { string "list" } - - common.attrs.aria |= aria.list - -## listbox - aria.listbox = - ( aria.role.listbox - & aria.prop.multiselectable? # not inherited - & aria.prop.activedescendant? - & aria.state.expanded? - ) - aria.role.listbox = - attribute role { string "listbox" } - - common.attrs.aria |= aria.listbox - -## listitem - aria.listitem = - ( aria.role.listitem - & aria.prop.posinset? # not inherited - & aria.prop.setsize? # not inherited - & aria.prop.level? # not inherited - & aria.state.expanded? - ) - aria.role.listitem = - attribute role { string "listitem" } - - common.attrs.aria |= aria.listitem - -## log - aria.log = - ( aria.role.log - & aria.state.expanded? - ) - aria.role.log = - attribute role { string "log" } - - common.attrs.aria |= aria.log - -## main - aria.main = - ( aria.role.main - & aria.state.expanded? - ) - aria.role.main = - attribute role { string "main" } - - common.attrs.aria |= aria.main - common.attrs.aria.landmark.main |= aria.main - -## marquee - aria.marquee = - ( aria.role.marquee - & aria.state.expanded? - ) - aria.role.marquee = - attribute role { string "marquee" } - - common.attrs.aria |= aria.marquee - -## math - aria.math = - ( aria.role.math - & aria.state.expanded? - ) - aria.role.math = - attribute role { string "math" } - - common.attrs.aria |= aria.math - -## menu - aria.menu = - ( aria.role.menu - & aria.prop.activedescendant? - & aria.state.expanded? - ) - aria.role.menu = - attribute role { string "menu" } - - common.attrs.aria |= aria.menu - -## menubar - aria.menubar = - ( aria.role.menubar - & aria.prop.activedescendant? - & aria.state.expanded? - ) - aria.role.menubar = - attribute role { string "menubar" } - - common.attrs.aria |= aria.menubar - -## menuitem - aria.menuitem = - ( aria.role.menuitem ) - aria.role.menuitem = - attribute role { string "menuitem" } - - common.attrs.aria |= aria.menuitem - -## menuitemcheckbox - aria.menuitemcheckbox = - ( aria.role.menuitemcheckbox - & aria.state.checked #required - ) - aria.role.menuitemcheckbox = - attribute role { string "menuitemcheckbox" } - - common.attrs.aria |= aria.menuitemcheckbox - -## menuitemradio - aria.menuitemradio = - ( aria.role.menuitemradio - & aria.state.checked #required - & aria.state.selected? - ) - aria.role.menuitemradio = - attribute role { string "menuitemradio" } - - common.attrs.aria |= aria.menuitemradio - -## navigation - aria.navigation = - ( aria.role.navigation - & aria.state.expanded? - ) - aria.role.navigation = - attribute role { string "navigation" } - - common.attrs.aria |= aria.navigation - common.attrs.aria.landmark.navigation |= aria.navigation - -## note - aria.note = - ( aria.role.note - & aria.state.expanded? - ) - aria.role.note = - attribute role { string "note" } - - common.attrs.aria |= aria.note - common.attrs.aria.landmark.note |= aria.note - -## option - aria.option = - ( aria.role.option - & aria.state.checked? # not inherited - & aria.state.selected? # not inherited - ) - aria.role.option = - attribute role { string "option" } - - common.attrs.aria |= aria.option - - -## presentation - aria.presentation = - ( aria.role.presentation - & aria.state.expanded? - ) - aria.role.presentation = - attribute role { string "presentation" } - - common.attrs.aria |= aria.presentation - -## progressbar - aria.progressbar = - ( aria.role.progressbar - & aria.prop.valuemax? # not inherited - & aria.prop.valuemin? # not inherited - & aria.prop.valuenow? # not inherited - & aria.prop.valuetext? # not inherited - ) - aria.role.progressbar = - attribute role { string "progressbar" } - - common.attrs.aria |= aria.progressbar - -## radio - aria.radio = - ( aria.role.radio - & aria.state.checked #required! - & aria.state.selected? - ) - aria.role.radio = - attribute role { string "radio" } - - common.attrs.aria |= aria.radio - -## radiogroup - aria.radiogroup = - ( aria.role.radiogroup - & aria.prop.activedescendant? - & aria.state.expanded? - ) - aria.role.radiogroup = - attribute role { string "radiogroup" } - - common.attrs.aria |= aria.radiogroup - -## region - aria.region = - ( aria.role.region - & aria.state.expanded? - ) - aria.role.region = - attribute role { string "region" } - - common.attrs.aria |= aria.region - -## row - aria.row = - ( aria.role.row - & aria.prop.level? # not inherited - & aria.state.selected? # not inherited - & aria.prop.activedescendant? - & aria.state.expanded? - ) - aria.role.row = - attribute role { string "row" } - - common.attrs.aria |= aria.row - -# XXX rowheader - -## search - aria.search = - ( aria.role.search - & aria.state.expanded? - ) - aria.role.search = - attribute role { string "search" } - - common.attrs.aria |= aria.search - common.attrs.aria.landmark.search |= aria.search - -## separator - aria.separator = - ( aria.role.separator - & aria.state.expanded? - ) - aria.role.separator = - attribute role { string "separator" } - - common.attrs.aria |= aria.separator - -## slider - aria.slider = - ( aria.role.slider - & aria.prop.valuemax - & aria.prop.valuemin - & aria.prop.valuenow - & aria.prop.valuetext - ) - aria.role.slider = - attribute role { string "slider" } - - common.attrs.aria |= aria.slider - -## spinbutton - aria.spinbutton = - ( aria.role.spinbutton - & aria.prop.activedescendant? - & aria.prop.valuemax - & aria.prop.valuemin - & aria.prop.valuenow - & aria.prop.valuetext - ) - aria.role.spinbutton = - attribute role { string "spinbutton" } - - common.attrs.aria |= aria.spinbutton - -## status - aria.status = - ( aria.role.status - & aria.prop.activedescendant? - & aria.state.expanded? - ) - aria.role.status = - attribute role { string "status" } - - common.attrs.aria |= aria.status - -## tab - aria.tab = - ( aria.role.tab - & aria.state.selected? - & aria.state.expanded? - ) - aria.role.tab = - attribute role { string "tab" } - - common.attrs.aria |= aria.tab - -## tablist - aria.tablist = - ( aria.role.tablist - & aria.prop.activedescendant? - & aria.state.expanded? - ) - aria.role.tablist = - attribute role { string "tablist" } - -## tabpanel - aria.tabpanel = - ( aria.role.tabpanel - & aria.state.expanded? - ) - aria.role.tabpanel = - attribute role { string "tabpanel" } - - common.attrs.aria |= aria.tabpanel - -## textbox - aria.textbox = - ( aria.role.textbox - & aria.prop.autocomplete? # not inherited - & aria.prop.multiline? # not inherited - & aria.prop.readonly? # not inherited - ) - aria.role.textbox = - attribute role { string "textbox" } - - common.attrs.aria |= aria.textbox - -## timer - aria.timer = - ( aria.role.timer - & aria.prop.activedescendant? - & aria.state.expanded? - ) - aria.role.timer = - attribute role { string "timer" } - - common.attrs.aria |= aria.timer - -## toolbar - aria.toolbar = - ( aria.role.toolbar - & aria.prop.activedescendant? - & aria.state.expanded? - ) - aria.role.toolbar = - attribute role { string "toolbar" } - - common.attrs.aria |= aria.toolbar - -## tooltip - aria.tooltip = - ( aria.role.tooltip - & aria.state.expanded? - ) - aria.role.tooltip = - attribute role { string "tooltip" } - - common.attrs.aria |= aria.tooltip - -## tree - aria.tree = - ( aria.role.tree - & aria.prop.multiselectable? # not inherited - & aria.prop.activedescendant? - & aria.state.expanded? - ) - aria.role.tree = - attribute role { string "tree" } - - common.attrs.aria |= aria.tree - -## treegrid - aria.treegrid = - ( aria.role.treegrid - & aria.prop.activedescendant? - & aria.state.expanded? - & aria.prop.level? - & aria.prop.multiselectable? - & aria.prop.readonly? - ) - aria.role.treegrid = - attribute role { string "treegrid" } - - common.attrs.aria |= aria.treegrid - -## treeitem - aria.treeitem = - ( aria.role.treeitem - & aria.state.checked? - & aria.state.expanded? - & aria.prop.level? - & aria.prop.posinset? - & aria.state.selected? - & aria.prop.setsize? - ) - aria.role.treeitem = - attribute role { string "treeitem" } - - common.attrs.aria |= aria.treeitem - - diff --git a/html5-syntax/aria.rng b/html5-syntax/aria.rng new file mode 100644 index 000000000..08cb23b91 --- /dev/null +++ b/html5-syntax/aria.rng @@ -0,0 +1,1674 @@ + + + + + RELAX NG Schema for HTML 5: Accessible Rich Internet Applications # + + + ARIA + Global states and properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + States and Properties for Native Roles + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + States + busy + + + true + false + + + + + + checked + + + true + false + mixed + undefined + + + + + + disabled + + + true + false + + + + + + dropeffect + + + none + + popup + execute + + copy + + execute + + + + move + + execute + + + + reference + + execute + + + + execute + copy + + + execute + move + + + execute + reference + + + + + + expanded + + + true + false + undefined + + + + + + grabbed + + + true + false + undefined + + + + + + hidden + + + true + false + + + + + + invalid + + + true + false + + grammar + spelling + + + + + pressed + + + true + false + mixed + undefined + + + + + + selected + + + true + false + undefined + + + + + + + Properties + activedescendant + + + + + + + atomic + + + true + false + + + + + + autocomplete + + + inline + list + both + none + + + + + + controls + + + + + + + describedby + + + + + + + flowto + + + + + + + haspopup + + + true + + false + + + + + + label + + + + + + labelledby + + + + + + + level + + + + + + live + + + off + + polite + assertive + + + + + multiline + + + true + false + + + + + + multiselectable + + + true + false + + + + + + owns + + + + + + + posinset + + + + + + readonly + + + true + false + + + + + + relevant + + + all + + additions + + removals + + + text + + + + additions + + text + + + removals + + + + removals + + additions + + + text + + + + removals + + text + + + additions + + + + text + + additions + + + removals + + + + text + + removals + + + additions + + + + + + + required + + + true + false + + + + + + setsize + + + + + + sort + + + ascending + descending + none + + other + + + + + valuemax + + + + + + + valuemin + + + + + + + valuenow + + + + + + + valuetext + + + + + + + Roles + alert + + + + + + + + + + alert + + + + + + + alertdialog + + + + + + + + + + alertdialog + + + + + + + application + + + + + + + + + + application + + + + + + + + + + article + + + + + + + + + + article + + + + + + + + + + banner + + + + + + + + + + banner + + + + + + + + + + button + + + + + + + + + + + button + + + + + + + checkbox + + + + + + + + + checkbox + + + + + + + + combobox + + + + + + + + + + + + combobox + + + + + + + complementary + + + + + + + + + + complementary + + + + + + + + + + contentinfo + + + + + + + + + + contentinfo + + + + + + + + + + definition + + + + + + + + + + definition + + + + + + + dialog + + + + + + + + + + dialog + + + + + + + directory + + + + + + + + + + directory + + + + + + + document + + + + + + + + + + document + + + + + + + + + + grid + + + + + + + + + + + + + + + + + + + + + + + + + grid + + + + + + + gridcell + + + + + + + + + + + + + + + + + + + + + + gridcell + + + + + + + group + + + + + + + + + + + + + + + group + + + + + + + XXX heading + img + + + + + + + + + + img + + + + + + + link + + + + + link + + + + + + + list + + + + + + + + + + list + + + + + + + listbox + + + + + + + + + + + + + + + + + listbox + + + + + + + listitem + + + + + + + + + + + + + + + + + + + + + + listitem + + + + + + + log + + + + + + + + + + log + + + + + + + main + + + + + + + + + + main + + + + + + + + + + marquee + + + + + + + + + + marquee + + + + + + + math + + + + + + + + + + math + + + + + + + menu + + + + + + + + + + + + + menu + + + + + + + menubar + + + + + + + + + + + + + menubar + + + + + + + menuitem + + + + + menuitem + + + + + + + menuitemcheckbox + + + + + + + + + menuitemcheckbox + + + + + + + menuitemradio + + + + + + + + + + + + menuitemradio + + + + + + + navigation + + + + + + + + + + navigation + + + + + + + + + + note + + + + + + + + + + note + + + + + + + + + + option + + + + + + + + + + + + + + + option + + + + + + + presentation + + + + + + + + + + presentation + + + + + + + progressbar + + + + + + + + + + + + + + + + + + + + + + + progressbar + + + + + + + radio + + + + + + + + + + + + radio + + + + + + + radiogroup + + + + + + + + + + + + + radiogroup + + + + + + + region + + + + + + + + + + region + + + + + + + row + + + + + + + + + + + + + + + + + + + + + row + + + + + + + + search + + + + + + + + + + search + + + + + + + + + + separator + + + + + + + + + + separator + + + + + + + slider + + + + + + + + + + + slider + + + + + + + spinbutton + + + + + + + + + + + + + + spinbutton + + + + + + + status + + + + + + + + + + + + + status + + + + + + + tab + + + + + + + + + + + + + tab + + + + + + + tablist + + + + + + + + + + + + + tablist + + + + tabpanel + + + + + + + + + + tabpanel + + + + + + + textbox + + + + + + + + + + + + + + + + + + + textbox + + + + + + + timer + + + + + + + + + + + + + timer + + + + + + + toolbar + + + + + + + + + + + + + toolbar + + + + + + + tooltip + + + + + + + + + + tooltip + + + + + + + tree + + + + + + + + + + + + + + + + + tree + + + + + + + treegrid + + + + + + + + + + + + + + + + + + + + + + treegrid + + + + + + + treeitem + + + + + + + + + + + + + + + + + + + + + + + + + treeitem + + + + + + diff --git a/html5-syntax/block.rnc b/html5-syntax/block.rnc deleted file mode 100644 index 8bfb86abe..000000000 --- a/html5-syntax/block.rnc +++ /dev/null @@ -1,196 +0,0 @@ -datatypes w = "http://whattf.org/datatype-draft" - -# ##################################################################### -## RELAX NG Schema for HTML 5: Basic Prose Markup # -# ##################################################################### - -# ##################################################################### -## Paragraph-Level - -## Paragraph:

    - - p.elem = - element p { p.inner & p.attrs } - p.attrs = - ( common.attrs - & common.attrs.aria? - ) - p.inner = - ( common.inner.phrasing ) # REVISIT lists in span? - - common.elem.flow |= p.elem - -## Hint Transition:


    - - hr.elem = - element hr { hr.inner & hr.attrs } - hr.attrs = - ( common.attrs ) - hr.inner = - ( empty ) - - common.elem.flow |= hr.elem - -# ##################################################################### -## Preformatting Blocks - -## Preformatted Text:
    -
    -	pre.elem =
    -		element pre { pre.inner & pre.attrs }
    -	pre.attrs =
    -		(	common.attrs
    -		&	common.attrs.aria?
    -		)
    -	pre.inner =
    -		( common.inner.phrasing )
    -
    -	common.elem.flow |= pre.elem
    -
    -# #####################################################################
    -## Simple Lists
    -
    -## Unordered List: 
      - - ul.elem = - element ul { ul.inner & ul.attrs } - ul.attrs = - ( common.attrs - & ( common.attrs.aria - | common.attrs.aria.implicit.region - )? - ) - ul.inner = - ( li.elem* ) - - common.elem.flow |= ul.elem - -## Unordered List Item:
    • - - li.elem = - element li { li.inner & li.attrs } - li.attrs = - ( common.attrs - & ( common.attrs.aria - | common.attrs.aria.implicit.listitem - )? - ) - li.inner = - ( common.inner.flow ) - -## Ordered List:
        - - ol.elem = - element ol { ol.inner & ol.attrs } - ol.attrs = - ( common.attrs - & ol.attrs.start? - & ol.attrs.reversed? - & ( common.attrs.aria - | common.attrs.aria.implicit.region - )? - ) - ol.attrs.start = - attribute start { - common.data.integer - } - ol.attrs.reversed = - attribute reversed { - w:string "reversed" | w:string "" - } - ol.inner = - ( oli.elem* ) - - common.elem.flow |= ol.elem - -## Ordered List Item:
      1. - - oli.elem = - element li { oli.inner & oli.attrs } - oli.attrs = - ( common.attrs - & oli.attrs.value? - & ( common.attrs.aria - | common.attrs.aria.implicit.listitem - )? - ) - oli.attrs.value = - attribute value { - common.data.integer - } - oli.inner = - ( common.inner.flow ) - -# ##################################################################### -## Definition Lists - -## Definition List:
        - - dl.elem = - element dl { dl.inner & dl.attrs } - dl.attrs = - ( common.attrs - & common.attrs.aria? - ) - dl.inner = - ( ( dt.elem+ - , dd.elem+ - )* - ) - - common.elem.flow |= dl.elem - -## Definition Term:
        - - dt.elem = - element dt { dt.inner & dt.attrs } - dt.attrs = - ( common.attrs - & common.attrs.aria? - ) - dt.inner = - ( common.inner.phrasing ) - -## Definition Description:
        - - dd.elem = - element dd { dd.inner & dd.attrs } - dd.elem.phrasing = - element dd { dd.inner.phrasing & dd.attrs } - dd.attrs = - ( common.attrs - & common.attrs.aria? - ) - dd.inner = - ( common.inner.flow ) - dd.inner.phrasing = - ( common.inner.phrasing ) - -# ##################################################################### -## Miscellaneous Elements - -## Generic Container:
        - - div.elem = - element div { div.inner & div.attrs } - div.attrs = - ( common.attrs - & common.attrs.aria? - ) - div.inner = - ( style.elem.scoped* - , common.inner.flow - ) - - common.elem.flow |= div.elem - -## Title or Explanatory Caption: - - legend.elem = - element legend { legend.inner & legend.attrs } - legend.attrs = - ( common.attrs - & common.attrs.aria.implicit.region? - ) - legend.inner = - ( common.inner.phrasing ) diff --git a/html5-syntax/block.rng b/html5-syntax/block.rng new file mode 100644 index 000000000..1869112b2 --- /dev/null +++ b/html5-syntax/block.rng @@ -0,0 +1,337 @@ + + + + + RELAX NG Schema for HTML 5: Basic Prose Markup # + + + Paragraph-Level + Paragraph: <p> + + + + + + + + + + + + + + + + + + + + + + + + Hint Transition: <hr> + + + + + + + + + + + + + + + + + + + Preformatting Blocks + Preformatted Text: <pre> + + + + + + + + + + + + + + + + + + + + + + + + Simple Lists + Unordered List: <ul> + + + + + + + + + + + + + + + + + + + + + + + + + + + + Unordered List Item: <li> + + + + + + + + + + + + + + + + + + + + + + + Ordered List: <ol> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + reversed + + + + + + + + + + + + + + Ordered List Item: <li> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Definition Lists + Definition List: <dl> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Definition Term: <dt> + + + + + + + + + + + + + + + + + + + + Definition Description: <dd> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Miscellaneous Elements + Generic Container: <div> + + + + + + + + + + + + + + + + + + + + + + + + + + Title or Explanatory Caption: <legend> + + + + + + + + + + + + + + + + + + + diff --git a/html5-syntax/common.rnc b/html5-syntax/common.rnc deleted file mode 100644 index dada4b68d..000000000 --- a/html5-syntax/common.rnc +++ /dev/null @@ -1,393 +0,0 @@ -datatypes w = "http://whattf.org/datatype-draft" - -# ##################################################################### -## RELAX NG Schema for HTML 5: Common Definitions # -# ##################################################################### - - -# ##################################################################### -## Language Parameters - redefine in inclusion block as necessary # -# ##################################################################### - -## HTML vs. XHTML restrictions - - XMLonly = empty - HTMLonly = notAllowed - -## HTML 4 Compatibility - set to notAllowed to disallow markup introduced in HTML 5 -# (This only affects mixed-version modules; wholly HTML5 -# modules should simply be left out of the inclusion list.) - - v5only = empty - -## HTML Compatibility Switches - set to notAllowed to disallow - - ## XML features that can't be roundtripped HTML <-> XHTML - # (xml:base on elements other than ) - nonRoundtrippable = empty - - ## XML features that can't be serialized as HTML - nonHTMLizable = empty - -# ##################################################################### -## Wildcards # -# ##################################################################### - -## Any attribute from any namespace - - common.attr.anything = - attribute * { text }* - -## Any element from any namespace - - common.elem.anything = - element * { common.inner.anything & common.attr.anything } - -## Any content from any namespace - - common.inner.anything = - ( text - & common.elem.anything* - ) - -# ##################################################################### -## Common Element Classes # -# ##################################################################### - -## Metadata Elements - - common.elem.metadata = - ( notAllowed ) - -## Phrase Elements - - common.elem.phrasing = - ( notAllowed ) - -## Prose Elements - - common.elem.flow = - ( common.elem.phrasing ) - - -# ##################################################################### -## Common Content Models # -# ##################################################################### - -## Metadata Content - - common.inner.metadata = - ( common.elem.metadata* ) - -## Phrase Content - - common.inner.phrasing = - ( text & common.elem.phrasing* ) - -## Prose Content - - common.inner.flow = - ( text & common.elem.flow* ) # REVISIT