<grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" ns="http://www.daisy.org/ns/z3998/authoring/" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> <info xmlns="http://docbook.org/ns/docbook" xml:lang="en"> <title>The datatypes module </title> <annotation annotates="/"> <para>This module defines a set of core datatypes for reference globally. </para> <para>More information about this module is available at http://www.daisy.org/z3998/2012/auth/cm/#z3998.datatypes.module</para> </annotation> <author> <personname>Markus Gylling</personname> <email>mgylling@daisy.org</email> </author> <copyright> <year>2009</year> <year>2010</year> <year>2011</year> <year>2012</year> <holder>DAISY Consortium</holder> </copyright> <legalnotice> <para>This module is licensed under a Creative Commons Attribution 3.0 license, a copy of which is available at <link xlink:href="http://creativecommons.org/licenses/by/3.0/">http://creativecommons.org/licenses/by/3.0/</link> </para> <para>For complete licensing information, please refer to the LICENSE file that came with this distribution, a copy of which is also available from the DAISY web site at <link xlink:href="http://www.daisy.org">www.daisy.org</link> </para> </legalnotice> <revhistory> <revision> <date>2012-12-19</date> <authorinitials>MGy</authorinitials> <revdescription> <para>Initial version</para> </revdescription> </revision> </revhistory> </info> <div> <a:documentation>Datatypes defined in XML 1.0 </a:documentation> <define name="ID.datatype"> <a:documentation>An ID TokenizedType, as defined in section 3.3.1 of refXML . </a:documentation> <data type="ID"/> </define> <define name="IDREF.datatype"> <a:documentation>An IDREF TokenizedType, as defined in section 3.3.1 of refXML . </a:documentation> <data type="IDREF"/> </define> <define name="IDREFS.datatype"> <a:documentation>A space-separated list of IDREF TokenizedTypes. </a:documentation> <data type="IDREFS"/> </define> <define name="NMTOKEN.datatype"> <a:documentation>An NMTOKEN TokenizedType, as defined in section 3.3.1 of refXML . </a:documentation> <data type="NMTOKEN"/> </define> <define name="NMTOKENS.datatype"> <a:documentation>A space-separated list of NMTOKEN.datatype TokenizedTypes. </a:documentation> <data type="NMTOKENS"/> </define> <define name="NCName.datatype"> <a:documentation>An XML non-colonized Name, as defined in section 3.3.7 of refXML . </a:documentation> <data type="NCName"/> </define> <define name="Character.datatype"> <a:documentation>A single character, as per section 2.2 of refXML . </a:documentation> <data type="string"> <param name="length">1</param> </data> </define> <define name="Characters.datatype"> <a:documentation>A range (0..n) of characters, as per section 2.2 of refXML . </a:documentation> <text/> </define> <define name="LanguageIdentifier.datatype"> <a:documentation>A language identifier, as per Language Identification in refXML . </a:documentation> <choice> <data type="language"/> <data type="string"> <param name="length">0</param> </data> </choice> </define> </div> <div> <a:documentation>Datatypes defined in or derived from XSD datatypes </a:documentation> <define name="NonEmptyString.datatype"> <a:documentation>Specifies a value that must contain at least one non-whitespace character after whitespace normalization rules have been applied to the attribute value, as expressed through the XSD normalizedString datatype. </a:documentation> <data type="token"> <param name="minLength">1</param> </data> </define> <define name="Time.datatype"> <a:documentation>A date and/or time statement, expressed using any of the XSD gYear, gYearMonth, gMonthDay, gDay, gMonth, date, time or dateTime datatypes, or the Z39.98-defined TimeNoSeconds.datatype datatype. </a:documentation> <choice> <data type="gYear"/> <data type="gYearMonth"/> <data type="gMonthDay"/> <data type="gDay"/> <data type="gMonth"/> <data type="date"/> <data type="time"/> <data type="dateTime"/> <ref name="TimeNoSeconds.datatype"/> </choice> </define> <define name="TimeNoSeconds.datatype"> <a:documentation>A derivation of the XSD time datatype that only includes hour and minute specifications. The lexical expression is hh:mm. </a:documentation> <data type="string"> <param name="pattern">\d\d:\d\d</param> </data> </define> <define name="Datetime.datatype"> <a:documentation>Date and time information, as defined by the dateTime type in refXMLSchemaPart2 . </a:documentation> <data type="dateTime"/> </define> <define name="NonNegativeInteger.datatype"> <a:documentation>A non-negative integer. </a:documentation> <data type="nonNegativeInteger"> <param name="pattern">[0-9]+</param> </data> </define> <define name="PositiveInteger.datatype"> <a:documentation>A positive integer. </a:documentation> <data type="positiveInteger"> <param name="pattern">[0-9]+</param> </data> </define> <define name="Integer.datatype"> <a:documentation>An integer. </a:documentation> <data type="integer"/> </define> <define name="URI.datatype"> <a:documentation>A Uniform Resource Identifier Reference, as defined by the anyURI type in refXMLSchemaPart2 . </a:documentation> <data type="anyURI"/> </define> <define name="URIs.datatype"> <a:documentation>A space-separated list of URI.datatype s. </a:documentation> <list> <oneOrMore> <ref name="URI.datatype"/> </oneOrMore> </list> </define> </div> <div> <define name="QName.datatype"> <a:documentation>A namespace qualified name as per refXMLNamespaces . </a:documentation> <data type="QName"/> </define> <define name="QNames.datatype"> <a:documentation>One or more whitespace separated QName.datatype s. </a:documentation> <list> <oneOrMore> <data type="QName"/> </oneOrMore> </list> </define> <define name="prefixedQName.datatype"> <a:documentation>A prefixed QName.datatype . </a:documentation> <data type="QName"> <param name="pattern">[\i-[:]][\c-[:]]*:[\i-[:]][\c-[:]]*</param> </data> </define> </div> <div> <a:documentation>ContentType and MediaType Datatypes </a:documentation> <define name="MediaType.datatype"> <a:documentation>Media type, as per refRFC2046 . </a:documentation> <data type="string"> <param name="pattern">[a-zA-Z0-9!#$&+\-\^_]+/[a-zA-Z0-9!#$&+\-\^_]+.*</param> </data> </define> </div> <div> <a:documentation>CSS Datatypes </a:documentation> <define name="CSS.TimeValue.datatype"> <a:documentation>A time value as defined in CSS 2.1 Times , e.g. 250ms, 3s. </a:documentation> <data type="string"> <param name="pattern">([0-9]+\.)?[0-9]+m?s</param> </data> </define> </div> <div> <a:documentation>CURIE Datatypes </a:documentation> <define name="CURIE.datatype"> <a:documentation>A single CURIE, as defined in refRDFa11 . </a:documentation> <data type="string"> <param name="pattern">(([\i-[:]][\c-[:]]*)?:)?[\i-[:]][\c-[:]]*</param> </data> </define> <define name="CURIEs.datatype"> <a:documentation>A whitespace separated list of CURIE.datatype s. </a:documentation> <list> <oneOrMore> <ref name="CURIE.datatype"/> </oneOrMore> </list> </define> <define name="SafeCURIE.datatype"> <a:documentation>A single safe CURIE, as defined in refRDFa11 . </a:documentation> <data type="string"> <param name="pattern">\[(([\i-[:]][\c-[:]]*)?:)?.+\]</param> <param name="minLength">3</param> </data> </define> <define name="SafeCURIEs.datatype"> <a:documentation>A whitespace separated list of SafeCURIE.datatype s. </a:documentation> <list> <oneOrMore> <ref name="SafeCURIE.datatype"/> </oneOrMore> </list> </define> <define name="URIorSafeCURIE.datatype"> <a:documentation>A URI.datatype or a SafeCURIE.datatype . </a:documentation> <choice> <ref name="URI.datatype"/> <ref name="CURIE.datatype"/> </choice> </define> <define name="URIorSafeCURIEs.datatype"> <a:documentation>A whitespace separated list of URIorSafeCURIE.datatype s. </a:documentation> <list> <oneOrMore> <ref name="URIorSafeCURIE.datatype"/> </oneOrMore> </list> </define> </div> <define name="PositiveNumberOrRange.datatype"> <a:documentation>A single positive number or range. </a:documentation> <data type="token"> <param name="pattern">([0-9]|[1-9][0-9]+)(-[1-9][0-9]*)?</param> </data> </define> </grammar>