<grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:z="http://www.daisy.org/ns/z3998/annotations/#" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:sch="http://purl.oclc.org/dsdl/schematron" xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" ns="http://www.daisy.org/ns/z3998/authoring/"> <info xmlns="http://docbook.org/ns/docbook" xml:lang="en"> <title>The word module </title> <annotation annotates="/"> <para>This module defines the w element for marking the component words that compose the document text. </para> <para>More information about this module is available at http://www.daisy.org/z3998/2012/auth/cm/#z3998.w.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> <define name="z3998.w"> <element name="w"> <a:documentation>The w element represents a single, possibly compound, lexical word. The role attribute optionally expresses the semantic nature of the word. No implicit value is associated with the w element. </a:documentation> <ref name="z3998.w.attlist"/> <ref name="z3998.w.content"/> <sch:rule context="default:w"> <sch:assert test="normalize-space(.) or *">The word element must neither be empty nor contain only whitespace. </sch:assert> </sch:rule> </element> </define> <define name="z3998.w.attlist" combine="interleave"> <ref name="z3998.global.core.attrib"/> <optional> <ref name="z3998.w.role.attrib"/> </optional> <ref name="z3998.Phrase.extern.attrib"/> </define> <define name="z3998.w.role.attrib"> <attribute name="role"> <list> <oneOrMore> <ref name="z3998.w.role.attrib.content.enum"/> </oneOrMore> </list> </attribute> </define> <define name="z3998.w.role.attrib.content.enum" combine="choice"> <ref name="CURIE.datatype"/> </define> <define name="z3998.w.content"> <oneOrMore> <choice> <ref name="Characters.datatype"/> <ref name="z3998.w.class"/> <ref name="z3998.wpart"/> </choice> </oneOrMore> </define> <define name="z3998.w.class" combine="choice"> <ref name="z3998.Text.class"/> </define> </div> <div> <define name="z3998.wpart"> <element name="wpart"> <a:documentation>The wpart element represents a segment of a word. The wpart element is typically used to distinguish the parts of a word (root, stem and affix), compound word, portmanteau or homograph. It can also be used in grammatical contexts to identify morphemes, graphemes and other divisions and boundaries within a word. The wpart element additionally can be used in place of soft hyphens to identify line ending break locations, if external formatting options are limited. The role attribute optionally expresses the semantic nature of the word part. No implicit value is associated with the wpart element. </a:documentation> <ref name="z3998.wpart.attlist"/> <ref name="z3998.wpart.content"/> <sch:rule context="default:wpart"> <sch:assert test="normalize-space(.) or *">The wpart element must neither be empty nor contain only whitespace. </sch:assert> </sch:rule> </element> </define> <define name="z3998.wpart.attlist"> <ref name="z3998.Phrase.attrib"/> </define> <define name="z3998.wpart.content"> <oneOrMore> <choice> <ref name="z3998.Text.model"/> <ref name="z3998.wpart"/> </choice> </oneOrMore> </define> </div> <div> <a:documentation>w - default content model contribution </a:documentation> <define name="z3998.Phrase.core.class" combine="choice"> <ref name="z3998.w"/> </define> <define name="z3998.Phrase.core.class" combine="choice"> <ref name="z3998.w"/> </define> </div> </grammar>