RELAX NG Schema for Internationalisation Additions
Author: Hugh Field-Richards
Date: 2006-08-17T11:30

The Internationalisation tags provide a mechanism for adding multi-language support. These tags can appear anywhere within horizontal content (text etc). For example:

<work:description>
   <t:p>
      <i18n:text i18n:key="para-1">Schneider was employed as court
      musician in 1787 at the Darmstadt Court Orchestra.</i18n:text>
   </t:p>
</work:description>
i18n.text — Warning! not used within this schema file. (Combine: choice)
define : i18n.text
Schematron
No nested i18n namespace tags:
Context : “i18n:text
If condition “ancestor::i18n:text
then output: No nested i18n:text tags
element
nsName "http://apache.org/cocoon/i18n/2.1"
zeroOrMore
attribute
nsName "http://apache.org/cocoon/i18n/2.1"
refcommon.commonAttributes
zeroOrMore
reftext.horizontalContent
<define name="i18n.text" combine="choice">
   <sch:pattern name="No nested i18n namespace tags:">
      <sch:rule context="i18n:text">
         <sch:report test="ancestor::i18n:text">No nested i18n:text tags</sch:report>
      </sch:rule>
   </sch:pattern>
   <element>
      <nsName ns="http://apache.org/cocoon/i18n/2.1"/>
      <zeroOrMore>
         <attribute>
            <nsName ns="http://apache.org/cocoon/i18n/2.1"/>
         </attribute>
      </zeroOrMore>
      <ref name="common.commonAttributes"/>
      <zeroOrMore>
         <ref name="text.horizontalContent"/>
      </zeroOrMore>
   </element>
</define>