All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.adobe.epubcheck.schema.30.mod.html5.applications.rnc Maven / Gradle / Ivy

Go to download

EPUBCheck is a tool to validate the conformance of EPUB publications against the EPUB specifications. EPUBCheck can be run as a standalone command-line tool or used as a Java library.

There is a newer version: 5.1.0
Show newest version


# #####################################################################
##  RELAX NG Schema for HTML 5: Web Application Features              #
# #####################################################################

## Additions to Common Attributes

	common.attrs.interact &=
		(	common.attrs.contenteditable?
		&	common.attrs.draggable?
		&	common.attrs.hidden?
		&	common.attrs.spellcheck?
		&	common.attrs.autocapitalize?
		)
		
	common.attrs.other &= common.attrs.interact

## Editable Content: contenteditable

	common.attrs.contenteditable =
		attribute contenteditable {
			 "true" |  "false" |  ""
		}

## Draggable Element: draggable

	common.attrs.draggable =
		attribute draggable {
			 "true" |  "false"
		}

## Hidden Element: hidden

	common.attrs.hidden =
		attribute hidden {
			 "hidden" |  ""
		}

## Spellchecking and grammar checking: spellcheck

	common.attrs.spellcheck =
		attribute spellcheck{
			 "true" |  "false" |  ""
		}

## Autocapitalization

	common.attrs.autocapitalize =
		attribute autocapitalize {
			(	 "off"
			|	 "none"
			|	 "on"
			|	 "sentences"
			|	 "words"
			|	 "characters"
			)
		}

## Application Cache: manifest

	html.attrs.manifest =
		attribute manifest {
			common.data.uri.non-empty
		}
		
	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?
		&	(	common.attrs.aria.implicit.progressbar
			|	common.attrs.aria.role.progressbar
			)?
		)
		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

## Dialog box, inspector, or window: 
	dialog.elem =
		element dialog { dialog.inner & dialog.attrs }
	dialog.attrs =
		(	common.attrs
		&	dialog.attrs.open?
		&	(	common.attrs.aria.implicit.dialog
			|	common.attrs.aria.role.alertdialog
			)?
		)
		dialog.attrs.open =
			attribute open {
				 "open" |  ""
			}
	dialog.inner =
		( common.inner.flow )
	common.elem.flow |= dialog.elem

## Toolbar: 

	menu.elem =
		element menu { menu.inner & menu.attrs }
	menu.attrs =
		(	common.attrs
		&	(	common.attrs.aria.implicit.list
			|	common.attrs.aria.role.directory
			|	common.attrs.aria.role.group
			|	common.attrs.aria.role.list
			|	common.attrs.aria.role.listbox
			|	common.attrs.aria.role.menu
			|	common.attrs.aria.role.menubar
			|	common.attrs.aria.role.radiogroup
			|	common.attrs.aria.role.tablist
			|	common.attrs.aria.role.toolbar
			|	common.attrs.aria.role.tree
			|	common.attrs.aria.role.presentation
			)?
		)
	menu.inner =
		(	mli.elem*
		&	common.elem.script-supporting*
		)
	common.elem.flow |= menu.elem

## Toolbar item: 
  • mli.elem = element li { mli.inner & mli.attrs } mli.attrs = ( common.attrs & ( ( common.attrs.aria.role.listitem | common.attrs.aria.role.menuitem | common.attrs.aria.role.menuitemcheckbox | common.attrs.aria.role.menuitemradio | common.attrs.aria.role.option | common.attrs.aria.role.tab | common.attrs.aria.role.treeitem | common.attrs.aria.role.presentation ) )? ) 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.transparent.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.group # aria-expanded must be true if open attr present; check by assertions | common.attrs.aria.role.group )? ) details.attrs.open = attribute open { "open" | "" } 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 & ( common.attrs.aria.implicit.button | common.attrs.aria.role.button )? ) summary.inner = ( common.inner.phrasing & h1.elem? & h2.elem? & h3.elem? & h4.elem? & h5.elem? & h6.elem? & hgroup.elem? )




  • © 2015 - 2024 Weber Informatics LLC | Privacy Policy