﻿<?xml version="1.0" encoding="UTF-8"?><?oxygen RNGSchema="tei-w3c.rnc" type="compact"?><TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:its="http://www.w3.org/2005/11/its" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns:spec="http://example.com/xmlspec"
    xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xml:lang="en">
  <header xmlns="http://example.com/xmlspec">
    <title>Internationalization Tag Set (ITS) Version 1.0</title>
    <w3c-designation>ITS</w3c-designation> 
    <w3c-doctype>W3C Recommendation</w3c-doctype>
    <pubdate>
      <day>03</day>
      <month>April</month>
      <year>2007</year>
    </pubdate>
    <publoc>
      <loc href="http://www.w3.org/TR/2007/REC-its-20070403/">
http://www.w3.org/TR/2007/REC-its-20070403/</loc>
    </publoc>
    <altlocs>
      <loc href="itstagset.xml">ODD/XML document</loc>
      <loc href="itstagset.zip">self-contained zipped  archive</loc>
      <loc href="itstagset-diff-20070226.html">XHTML Diff markup to publication from 26 February 2007</loc>
    </altlocs>
    <latestloc>
      <loc href="http://www.w3.org/TR/its/">http://www.w3.org/TR/its/</loc>
    </latestloc>
    <prevlocs>
      <loc href="http://www.w3.org/TR/2007/PR-its-20070226/">
http://www.w3.org/TR/2007/PR-its-20070226/</loc>
    </prevlocs>
    <authlist>
      <author>
        <name>Christian Lieske</name>
        <affiliation>SAP AG</affiliation>
      </author>
      <author>
        <name>Felix Sasaki</name>
        <affiliation>W3C</affiliation>
      </author>
    </authlist>
      <errataloc role="spec-conditional" href="http://www.w3.org/International/its/itstagset/its-errata.html"/>
      <translationloc role="spec-conditional" href="http://www.w3.org/2003/03/Translations/byTechnology?technology=its"/>
    <abstract>
      <p>This document defines data categories and their
      implementation as a set of elements and attributes called the
      <emph>Internationalization Tag Set (ITS)</emph>. ITS is designed
      to be used with schemas to support the internationalization and
      localization of schemas and documents. An implementation is
      provided for three schema languages: XML DTD, XML Schema and
      RELAX NG.</p>
    </abstract>
    <status>
      <p>
        <emph>This section describes the status of this document at
        the time of its publication. Other documents may supersede
        this document. A list of current W3C publications and the
        latest revision of this technical report can be found in the
        <loc href="http://www.w3.org/TR/">W3C technical reports
        index</loc> at http://www.w3.org/TR/.</emph>
      </p>
      <p>This document defines data categories and their implementation as a set of elements and attributes called the Internationalization Tag Set (ITS). ITS is designed to be used with schemas to support the internationalization and localization of schemas and documents. An implementation is provided for three schema languages: XML DTD, XML Schema and RELAX NG.</p>
        
        <p>This is a <loc href="http://www.w3.org/2004/02/Process-20040205/tr.html#RecsW3C">Recommendation</loc>
of the W3C. It has been
developed by the W3C <loc href="http://www.w3.org/International/its/">Internationalization Tag Set (ITS) Working Group</loc>, which is part of the <loc href="http://www.w3.org/International/">Internationalization
Activity</loc>.</p>

<p>This document has been reviewed by W3C Members, by software
developers, and by other W3C groups and interested parties, and is
endorsed by the Director as a W3C Recommendation. It is a stable
document and may be used as reference material or cited from
another document. W3C's role in making the Recommendation is to
draw attention to the specification and to promote its widespread
deployment. This enhances the functionality and interoperability of
the Web.</p>
      
     
      <p>Please make comments about this document using
      W3C's <loc href="http://www.w3.org/Bugs/Public/">public Bugzilla
      system</loc>. We recommend using Bugzilla for making comments
      (instructions can be found at <loc href="http://www.w3.org/International/its/its-bugzilla">How to
      use the Issues Tracking System for the ITS Tagset Working
      Draft</loc>). If this is not feasible, comments may also be sent
      to <loc href="mailto:www-i18n-comments@w3.org?subject=[Comment on ITS WD]">www-i18n-comments@w3.org</loc>. Use
      "[Comment on ITS WD]" in the subject line of your
      email. A list of <loc href="http://www.w3.org/Bugs/Public/buglist.cgi?query_format=advanced&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;product=ITS&amp;component=ITS+tagset&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;bug_file_loc_type=allwordssubstr&amp;bug_file_loc=&amp;status_whiteboard_type=allwordssubstr&amp;status_whiteboard=&amp;keywords_type=allwords&amp;keywords=&amp;bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;bug_status=CLOSED&amp;emailtype1=substring&amp;email1=&amp;emailtype2=substring&amp;email2=&amp;bugidtype=include&amp;bug_id=&amp;votes=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;cmdtype=doit&amp;order=Reuse+same+sort+as+last+time&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=">
ITS tagset related comments and issues in Bugzilla</loc> and
      the <loc href="http://lists.w3.org/Archives/Public/www-i18n-comments/">www-
      i18n-comments archives</loc> are publicly available.</p>

<p>This document incorporates minor changes made against the Proposed Recommendation of 21 November 2006; please see the <loc href="#changelog-since-20070226">Revision Log</loc> for details. The <loc href="http://www.w3.org/International/its/itstagset/ImpReport.html">implementation report</loc> and <loc href="http://www.w3.org/International/its/tests/">test suite</loc> provide further implementation information.</p>

           <p> This document was produced by a group operating under the
      <loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
      February 2004 W3C Patent Policy</loc>. W3C maintains a <loc href="http://www.w3.org/2004/01/pp-impl/37139/status">public
      list of any patent disclosures</loc> made in connection with the
      deliverables of the group; that page also includes instructions
      for disclosing a patent. An individual who has actual knowledge
      of a patent which the individual believes contains <loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
      Claim(s)</loc> must disclose the information in accordance with
      <loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
      6 of the W3C Patent Policy</loc>. </p>
    </status>
    <langusage>
      <language id="en">en</language>
    </langusage>
    <revisiondesc>
      <p>This is an updated version of this document.</p>
    </revisiondesc>
  </header>
  <text>
    <body>
      <div xml:id="introduction">
        <head>Introduction</head>
        <p>
          <emph>This section is informative.</emph>
        </p>

        <p>ITS is a technology to easily create XML which is internationalized and can be localized effectively. On the one hand, the ITS specification identifies concepts (such as "directionality") which are important for
internationalization and localization. On the other hand, the ITS specification defines implementations of these concepts (termed "ITS data categories") as a set of elements and attributes called the Internationalization Tag Set (ITS). The document provides implementations for three schema languages: XML DTD <ptr target="#xml10spec" type="bibref"/>, XML Schema <ptr target="#xmlschema1" type="bibref"/> and RELAX NG <ptr target="#relaxng" type="bibref"/>.</p>

        <p>This document aims to realize many of the ideas formulated in <ptr target="#reqlocdtd" type="bibref"/>.</p>
<p>Requirements for this document are formulated in <ptr target="#itsreq" type="bibref"/>. Not all requirements listed there
are addressed in this document. Those which are not addressed here
are either covered in <ptr type="bibref" target="#xml-i18n-bp"/> or may be addressed in a future
    version of this specification.</p>

<p>This document covers the following requirements:</p>
 <list type="unordered">
			<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#span">R002 -
span-like element</ref>, see <ref target="#span">span</ref>
			</item>
	<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#langlocale">R006 -
identifying language/locale</ref>, see <ptr target="#language-information" type="specref"/>
			</item>
	<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#termid">R007 -
identifying Terms</ref>, see <ptr target="#terminology" type="specref"/>
			</item>
	<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#mapping ">R008 -
purpose specification/mapping</ref>, see <ptr target="#associating-its-with-existing-markup" type="specref"/>
			</item>
	<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#bidi ">R011 -
bidirectional text support</ref>, see <ptr target="#directionality" type="specref"/>
			</item>
	<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#transinfo ">R012 -
indicator of translatability</ref>, see <ptr target="#trans-datacat" type="specref"/>
			</item>
	<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#impact ">R014 -
limited impact</ref>, see <ptr target="#associating-its-with-existing-markup" type="specref"/>
			</item>
	
	<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#locnotes ">R017 -
localization notes</ref>, see <ptr target="#locNote-datacat" type="specref"/>
			</item>
	<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#annomark ">R020 -
annotation markup</ref>, see <ptr target="#ruby-annotation" type="specref"/>
			</item>
	<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#elemseg ">R025 -
elements and segmentation</ref>, see <ptr target="#elements-within-text" type="specref"/>
			</item>
</list>
          
          <p>The following requirements will be addressed in <ptr target="#xml-i18n-bp" type="bibref"/>:</p>
             <list type="unordered">
			<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#cdata">R003 -
CDATA Section</ref>
			</item>
			<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#uid">R004 - Unique
Identifier</ref>
			</item>
			<item>				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#entities">R005 -
Handling of Entities</ref>
			</item>
			<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#transattr">R015 -
Attributes and Translatable Text</ref>
			</item>
			<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#naming">R016 -
Naming Scheme</ref>
			</item>
			<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#multilang">R019 -
Multilingual Documents</ref>
			</item>
			<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#nestedelems">R022
- Nested Elements</ref>
			</item>
		</list>
	<p> The Working Group decided not to cover the following
requirements
at this time to be able to focus on the most important ones.</p>
	<list type="unordered">
		<item>
			<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#constraints">R001
- Indicator of Constraints</ref>
		</item>
		<item>
			<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#contstyle">R009
- Content Style</ref>
		</item>
		<item>
			<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#linkedtext">R010
- Link to Internal/External Text</ref>
		</item>
			<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#metrics">R013 -
Metrics Count</ref>
			</item>
		<item>
			<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#whitespaces">R018
- Handling of White-Spaces</ref>
		</item>
		<item>
			<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#datetime">R021
- Identifying Date and Time</ref>
		</item>
		<item>
			<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#lingml">R023
- Linguistic   Markup<?Pub Caret?>
			</ref>
		</item>
		<item>
				<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#variables">R024 -
Variables</ref>
			</item>
		<item>
			<ref target="http://www.w3.org/TR/2006/WD-itsreq-20060518/#objects">R026 -
Associated
Objects</ref>
		</item>
	</list>




        <div xml:id="motivation-its">
          <head>Motivation for ITS</head>
          <p>Content or software that is authored in one language
          (so-called source language) is often made available in
          additional languages or adapted with regard to other
          cultural aspects. This is done through a process called
          localization, where the original material is translated and
          adapted to the target audience.</p>
          <p>In addition, document formats expressed by schemas may be
          used by people in different parts of the world, and these
          people may need special markup to support the local language
          or script. For example, people authoring in languages such
          as Arabic, Hebrew, Persian or Urdu need special markup to
          specify directionality in mixed direction text.</p>
          <p>From the viewpoints of feasibility, cost, and efficiency,
          it is important that the original material should be
          suitable for localization. This is achieved by appropriate
          design and development, and the corresponding process is
          referred to as internationalization. For a detailed
          explanation of the terms "localization" and
          "internationalization", see <ptr target="#geo-i18n-l10n" type="bibref"/>.</p>
          <p>The increasing usage of XML as a medium for
          documentation-related content (e.g. DocBook and DITA as
          formats for writing structured documentation, well suited to
          computer hardware and software manuals) and software-related
          content (e.g. the eXtensible User Interface Language <ptr target="#xul" type="bibref"/>) creates challenges and
          opportunities in the domain of XML internationalization and
          localization.</p>
          
           <div xml:id="motivation-its-issues">
           <head>Typical Problems</head>
           
          <p>The following examples sketch one of the issues that
          currently hinder efficient XML-related localization: the
          lack of a standard, declarative mechanism which identifies
          which parts of an XML document need to be translated. Tools often cannot automatically do this identification.</p>
          <exemplum>
            <head>Document with partially translatable content</head>
            <p>In this document it is difficult to make distinction between the <gi>string</gi> elements that are translatable and the ones that are not. Only the addition of flags could resolve the issue.</p>
            <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-motivation-its-1.xml"/>
          </exemplum>
          <exemplum>
            <head>Document with partially translatable content</head>
            <p>Even when metadata are available to identify non-translatable text, the conditions may be quite complex and not directly indicated with a simple flag. Here, for instance, only the text in the nodes matching the expression <code>//component[@type!='image']/data[@type='text']</code> is translatable.</p>
            <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-motivation-its-2.xml"/>
          </exemplum>
          </div>
        </div>
        <div xml:id="users-usage">
          <head>Users and Usages of ITS</head>
          <div xml:id="potential-users">
            <head>Potential Users of ITS</head>
            <p>The ITS specification aims to provide different types
            of users with information about what markup should be
            supported to enable worldwide use and effective
            internationalization and localization of content. The following paragraphs sketch
            these different types of users, and their usage of
            ITS.</p>
            <list>
              <item><p>Schema developers who start a schema from ground up </p><p>This type of user will find proposals for attribute
              and element names to be included in their new schema
              (also called "host vocabulary"). Using the attribute and
              element names proposed in the ITS specification may be
              helpful because it leads to easier recognition of the
              concepts represented by both schema users and
              processors. It is perfectly possible, however, for a
              schema developer to develop his own set of attribute and
              element names. The specification sets out, first and
              foremost, to ensure that the required markup is available,
              and that the behavior of that markup meets established
              needs.</p>
              </item>
              <item><p>Schema developers who work with an existing schema</p><p>This type of user will be
                  working with schemas such as DocBook, DITA, or perhaps a proprietary
                  schema. The ITS Working Group has sought input from experts developing
                  widely used formats such as the ones mentioned.</p>
                <note><p>The question 
                  "How to use ITS with existing popular markup schemes?" 
                  is covered in more details (including examples) in a separate document: <ptr target="#xml-i18n-bp" type="bibref"/>.</p></note><p>Developers working on existing schemas
                  should check whether their schemas support the
                  markup proposed in this specification, and, where
                  appropriate, add the markup proposed here to their
                  schema.</p><p>In some cases, an existing schema may
                  already contain markup equivalent to that
                  recommended in ITS. In this case it is not necessary
                  to add duplicate markup since ITS provides
                  mechanisms for associating ITS
                  markup with markup in the host vocabulary which
                  serves a similar purpose (see <ptr target="#associating-its-with-existing-markup" type="specref"/>). The developer should, however,
                  check that the behavior associated with the markup
                  in their own schema is fully compatible with the
                  expectations described in this specification.</p>
              </item>
              <item><p>Vendors of content-related tools</p><p>This type of
              user includes companies which provide tools for
              authoring, translation or other flavors of
              content-related software solutions. It is important to
              ensure that such tools enable worldwide use and
              effective localization of content. For example,
              translation tools should prevent content marked up as
              not for translation from being changed or translated. It
              is hoped that the ITS specification will make the job of
              vendors easier by standardizing the format and
              processing expectations of certain relevant markup
              items, and allowing them to more effectively identify
              how content should be handled.</p>
              </item>
              <item><p>Content producers</p><p>This type of user comprises
              authors, translators and other types of content
              author. The markup proposed in this specification may
              be used by them to mark up specific bits of
              content. Aside: The burden of inserting markup can be
              removed from content producers by relating the ITS
              information to relevant bits of content in a global
              manner (see <ref target="#selection-global">global,
              rule-based approach</ref>). This global work, however,
              may fall to information architects, rather than the
              content producers themselves.</p>
              </item>
            </list>
            <p>In order to support all of these users, the information
            about what markup should be supported to enable worldwide
            use and effective localization of content is provided in
            this specification in two ways:</p>
            <list>
              <item>abstractly in the data category descriptions: <ptr target="#datacategory-description" type="specref"/>
              </item>
              <item>concretely in the ITS schemas: <ptr target="#its-schemas" type="specref"/>
              </item>
            </list>
          </div>
          <div xml:id="ways-to-use-its">
            <head>Ways to Use ITS</head>
            <p>The ITS specification proposes several mechanisms for
            supporting worldwide use and effective internationalization and localization of
            content. We will sketch them below by looking at them from the
            perspectives of certain user types. For the purpose of
            illustration, we will demonstrate how ITS can
            indicate that certain parts of content should or should
            not be translated.</p>
            <list>
              <item>
                <p>A content author uses an attribute on a particular
                element to say that the text in the element should not
                be translated.</p>
              </item>
            </list>
            <exemplum xml:id="EX-ways-to-use-its-1">
              <head>Use of ITS by content author</head>
              <p>The <code>its:translate="no"</code> attributes indicate that the <gi>path</gi> and the <gi>cmd</gi> elements should not be translated.</p>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-ways-to-use-its-1.xml"/>
            </exemplum>
            <list>
              <item>
                <p>A content author or information architect uses
                markup at the top of the document to identify a
                particular type of element or context in which the
                content should not be translated.</p>
              </item>
            </list>
            <exemplum>
              <head>Use of ITS by information architect</head>
              <p>The <gi>translateRule</gi> element is used in the header of the document to indicate that none of the <gi>path</gi> or <gi>cmd</gi> elements should be translated.</p>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-ways-to-use-its-2.xml"/>
            </exemplum>
            <list>
              <item>
                <p>A processor may insert markup at the top of the
                document which links to ITS information outside of the
                document.</p>
              </item>
            </list>
            <exemplum>
              <head>Use of ITS by processor</head>
              <p>A <gi>rules</gi> element is inserted in the header of the document. It has a XLink <att>href</att> attribute used to link to an <ref target="#link-external-rules">ITS external rule</ref> document.</p>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-ways-to-use-its-3.xml"/>
            </exemplum>
            <exemplum>
              <head>ITS rule file shared by different documents</head>
              <p>The <gi>rules</gi> element contains several ITS rules that are common to different documents. One of them is a <gi>translateRule</gi> element that indicates that no <gi>path</gi> or <gi>cmd</gi> element should be translated.</p>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-ways-to-use-its-4.xml"/>
            </exemplum>
            <list>
              <item>
                <p>A schema developer integrates ITS markup
                declarations in his schema to allow users to indicate
                that specific parts of the content should not be
                translated.</p>
              </item>
            </list>
            <exemplum>
             <head>An XSD schema with ITS declaration</head>
             <p>The declarations for the <att type="class">translate</att> attribute is added to a group of common attributes <code>commonAtts</code>. This allows to use the <att type="class">translate</att> attribute within the documents like in <ptr target="#EX-ways-to-use-its-1" type="exref"/>.</p>
             <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-ways-to-use-its-5.xsd"/>
            </exemplum>
            <p>The first two approaches above can be likened to the
            use of CSS in <ptr target="#xhtml10" type="bibref"/>. Using a <att>style</att> attribute,
            an XHTML content author may assign a color to a
            particular paragraph. That author could also have used the
            <gi>style</gi> element at the top of the page to say that
            all paragraphs of a particular class or in a particular
            context would be colored red.</p>
          </div>
        </div>
        <div xml:id="out-of-scope">
          <head>Out of Scope</head>
          <p>This standard does not cover all mechanisms and data formats (sometimes called <term>Localization Properties</term>), which might be needed for configuring localization workflows or tools to process a specific format. However, these mechanisms and data formats may be implemented using the framework described in this standard.</p>
          <note>
            <p>"XML localization properties" is a generic term to
            name the mechanisms and data formats that allow
            localization tools to be configured in order to process a
            specific XML format. Examples of "XML localization
            properties" are the Trados "DTD Settings" file, and the
            SDLX "Analysis" file.</p>
          </note>
        </div>
        <div xml:id="design-decisions">
          <head>Important Design Principles</head>
          
          <p>Abstraction via <emph>data categories</emph>: ITS defines
          data categories as an abstract notion for information for
          internationalization and localization of XML schemas and
          documents. This abstraction is helpful in realizing
          independence from a particular implementation using for example an
          element or attribute. See <ptr target="#def-datacat" type="specref"/> for a definition of the term data
          categories, <ptr target="#datacategory-description" type="specref"/> for the definition of the various ITS data
          categories, and subsections in <ptr target="#datacategory-description" type="specref"/> for the data
          category implementations.</p>
          <p> Powerful <emph>selection mechanism:</emph> For ITS
          markup which appears in an XML instance, it has to be
          clearly defined to which XML nodes the ITS-related
          information pertains. Thus, ITS defines
          <ref target="#termdef-selection">selection</ref> mechanisms to specify to what parts
          of an XML document an ITS data category and its values
          should be applied. Selection relies on the information which is
          given in the XML Information Set <ptr target="#xmlinfoset" type="bibref"/>. ITS applications may implement inclusion mechanisms
          such as XInclude or DITA's <ptr type="bibref" target="#dita10"/> conref.</p>
          <p>Content authors need, for example, a simple way to work
          with the <ref target="#trans-datacat">Translate</ref> data category in order to express whether the content of an
          element or attribute should be translated or
          not. Localization coordinators, on the other hand, need an
          efficient way of managing translations of large document
          sets based on the same schema. This could by realized by a
          specification of defaults for the <ref target="#trans-datacat">Translate</ref> data category and exceptions
          from the defaults (e.g. all <gi>p</gi> elements should be
          translated, but not <gi>p</gi> elements inside of an
          <gi>index</gi> element). </p>
          <p>To meet these requirements this specification introduces mechanisms that add ITS information to XML documents, see <ptr target="#its-processing" type="specref"/>. These mechanisms also provide a means for specifying ITS
          information for attributes (a task for which no standard
          means yet exists).</p>
          <p>The ITS selection mechanisms allows you to provide information about content <ref target="#selection-local">locally</ref> (specified at the XML node to which it pertains) or <ref target="#selection-global">globally</ref> (specified in another part of the document). Global selection mechanisms can be in the same document, or in a separate file.</p>
          <p>
            <emph>No dedicated extensibility</emph>: It may be useful
            or necessary to extend the set of information available
            for internationalization or localization purposes beyond
            what is provided by ITS. This specification does not
            define a dedicated extension mechanism, since ordinary XML
            mechanisms (e.g. XML Namespaces <ptr target="#xmlns" type="bibref"/>) may be used.</p>
          <p>
            <emph>Ease of integration</emph>:</p>
          <list type="unordered">
            <item> ITS follows the example from <ref target="http://www.w3.org/TR/2001/REC-xlink-20010627/#att-method">section
            4</ref> of <ptr target="#xlink1" type="bibref"/>, by
            providing mostly global attributes for the implementation
            of ITS data categories. Avoiding elements for ITS purposes
            as much as possible ensures ease of integration into
            existing markup schemes, see <ref target="http://www.w3.org/TR/itsreq/#impact">section
            3.14</ref> in <ptr target="#itsreq" type="bibref"/>. Only
            for some requirements do additional child elements have to be
            used, see for example <ptr target="#ruby-annotation" type="specref"/>.</item>
            <item>ITS has no dependency on technologies which are
            still under development<?Pub Caret?></item>
            <item>ITS fits with existing work in the W3C architecture
            (e.g. use of <ptr target="#xpath" type="bibref"/> for the selection mechanism)</item>
          </list>
        </div>
        <div xml:id="spec-development">
          <head>Development of this Specification</head>
          <p>This specification has been developed using the ODD (<emph>One Document Does it
            all</emph>) language of the Text Encoding Initiative (<ptr target="#tei" type="bibref"/>). This is a literate programming language for writing XML schemas, with three characteristics:</p><list type="ordered"><item>The element and attribute set is specified using an XML vocabulary which includes support for macros (like DTD entities, or schema patterns), a hierarchical class system for attributes and elements, and creation of modules.</item><item>The content models for elements and attributes are written using embedded RELAX NG XML notation.</item><item>Documentation for elements, attributes, value lists etc. is written inline, along with examples and other supporting material.</item></list>
<p>XSLT transformations are provided by the TEI to create documentation into HTML, XSL FO or LaTeX forms, and to generate RELAX NG documents and DTD. From the RELAX NG documents, James Clark's <ref target="http://www.thaiopensource.com/relaxng/trang.html">trang</ref> can be used to create XML Schema documents.</p>
        </div>
      </div>
      <div xml:id="basic-concepts">
        <head>Basic Concepts</head>
        <p>
          <emph>This section is informative.</emph>
        </p>

        <div xml:id="basic-concepts-selection">
         <head>Selection</head>
        
        <p>Information (e.g. "translate this") captured by ITS markup
        (e.g. <code>its:translate='yes'</code>) always pertains to
        one or more XML nodes (mainly element and attribute nodes). In
        a sense, ITS markup "selects" the XML node(s). Selection may
        be explicit or implicit. ITS distinguishes two approaches to
        selection: local, and with global rules.</p>
        <p>The mechanisms defined for ITS selection resemble those
        defined in <ptr target="#css2-1" type="bibref"/>. The local
        approach can be compared to the <att>style</att> attribute in
        HTML/XHTML, and the approach with global rules is similar to the
        <gi>style</gi> element in HTML/XHTML. In contrast to CSS, ITS uses
        XPath for identifying nodes. Thus,</p>
        <list>
          <item>the local approach puts ITS markup in the relevant
          element of the host vocabulary (e.g. the <gi>author</gi>
          element in DocBook)</item>
          <item>the <ref target="#selection-global">rule-based, global
          approach</ref> puts the ITS markup in elements defined by
          ITS itself (namely the <gi>rules</gi> element)</item>
        </list>
        <p>ITS markup can be used with XML documents (e.g. a DocBook
        article), or schemas (e.g. an XML Schema document for a proprietary document
        format). Since each usage defines some specific requirements,
        ITS markup may take different shapes.</p>

        <p>The following two examples sketch the distinction between
        the local and global approaches.</p>

         <div xml:id="basic-concepts-selection-local">
          <head>Local Approach</head>
        
        <p>The document in <ptr target="#EX-basic-concepts-1" type="exref"/> shows how a content author may use the
        ITS <att type="class">translate</att> attribute to indicate
        that all content inside the <gi>author</gi> element should be protected from
        translation. Translation tools that are aware of the meaning
        of this attribute can then screen the relevant content from
        the translation process.</p>
        <exemplum xml:id="EX-basic-concepts-1">
          <head>ITS markup on elements in an XML document (local approach) </head>
          <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-basic-concepts-1.xml"/>
        </exemplum>
        <p>For this to work, the schema developer will need to add the
        <att type="class">translate</att> attribute to the schema as a common
        attribute or on all the relevant element definitions. Note
        how there is an expectation in this case that inheritance
        plays a part in identifying which content does have to be
        translated and which does not. Tools that process this content
        for translation will need to implement the expected
        inheritance.</p>

         </div>
         <div xml:id="basic-concepts-selection-global">
          <head>Global Approach</head>
        
        <p>The document in <ptr target="#EX-basic-concepts-2" type="exref"/> shows a different approach to identifying
         non-translatable content, similar to that used with a
        <gi>style</gi> element in <ptr type="bibref" target="#xhtml10"/>, but using an ITS-defined
        element called <gi>rules</gi>. It works as follows: A document
        can contain a <gi>rules</gi> element (placed where it does not impact the
        structure of the document, like in a "head" section). It contains one or more
        ITS rule elements (for example
        <gi>translateRule</gi>). Each of these specific elements
        contains a <att>selector</att> attribute. As its name
        suggests, this attribute selects the XML node
        or nodes to which a corresponding ITS information
        pertains. The values of ITS selector attributes are XPath
        absolute location paths. Information for the handling of
         namespaces in these path expressions is taken from namespace
         declarations <ptr target="#xmlns" type="bibref"/> at the current rules element.</p>
<note><p>Caveat Related to XSLT-based Processing of ITS Selector Attributes</p>
<p>
The values of ITS <att>selector</att> attributes are XPath absolute location paths.
Accordingly, the following is a legitimate value:</p>
<p>myElement/descendant-or-self::*/@*</p>
<p>Unfortunately, values like this cause trouble when they are used in
XSLT-based processing of ITS where the values of the ITS <att>selector</att> attributes are used as values
of <att>match</att> attributes of XSLT templates. The reason for this is the following: <att>match</att> attributes
may only contain a restriction/subset of XPath expressions, so-called
 <ref target="http://www.w3.org/TR/xslt#patterns">patterns</ref>.</p>
<p>Basically the following restrictions hold for patterns: </p>
<list>
<item>only axes "child" or "attribute" allowed</item>
<item>"//" or "/" possible</item>
<item>id() or key() function possible</item>
<item>predicates possible</item>
</list>
<p>Using only XSLT patterns in ITS <att>selector</att> attributes helps to avoid this
issue. In many cases, this is possible by using patterns with predicates. The value above
may for example be rewritten as follows:</p>
<p>*[self::myElement]/@* | myElement//*/@*</p>
</note>
        <exemplum xml:id="EX-basic-concepts-2">
          <head>ITS global markup in an XML document (rule-based approach) </head>
          <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-basic-concepts-2.xml"/>
        </exemplum>
        <p>For this approach to work, the schema developer needs to add the
        <gi>rules</gi> element and associated markup to the schema.</p>
        <p>In some cases this may allow the schema developer to avoid adding
        other ITS markup (such as an <att type="class">translate</att> attribute)
        to the elements in the schema. However, it is likely that
        authors will want to use attributes on markup from time to
        time to override the general rule.</p>
        <p>For specification of the
        <ref target="#trans-datacat">Translate</ref> data category information, the contents of the
        <gi>rules</gi> element would normally be designed by an
        information architect familiar with the document format and
        familiar with, or working with someone familiar with, the
        needs of the localization group.</p>
        
        <p>The global, rule-based approach has the following
        benefits:</p>
        <list>
          <item>Content authors do not have to concern themselves with
          creating additional markup or verifying that the markup was
          applied correctly. ITS data categories are associated with
          sets of XML nodes (for example all <gi>p</gi> elements in an
          XML instance)</item>
          <item>Changes can be done in a single location, rather than
          by searching and modifying the markup throughout a document
          (or documents, if the <gi>rules</gi> element is stored as an
          external entity)</item>
          <item>ITS data categories can designate attribute values as
          well as elements. </item>
          <item>It is possible to associate ITS markup with existing
          markup (for example the <gi scheme="DocBook">term</gi> element in DITA)</item>
        </list>


        <p>The commonality in both examples above is the markup
        <code>translate='no'</code>. This piece of ITS markup can
        be interpreted as follows:</p>
        <list>
          <item>it pertains to the <ref target="#trans-datacat">Translate</ref> data category
          </item>
          <item>the attribute <att>translate</att> holds a value of <val>no</val>
          </item>
        </list>
<!--        <p>To summarize: The examples with global and local usage of
        ITS markup show that ITS markup, in some cases, appears in
        elements defined by ITS itself (the <gi>translateRule</gi>
        element (embedded within a <gi>rules</gi> element)) and in
        other cases appears in elements of the host vocabulary. In
        addition to one or more ITS data category specific attributes,
        <gi>translateRule</gi> or other rule elements contain a
        corresponding <att>selector</att> attribute. As their name
        suggests, a <att>selector</att> selects (or designates) one or
        more XML nodes (namely those to which a corresponding ITS data
        category attribute pertains). The value of ITS selector
        attributes are XPath absolute location paths. Information for
        to the handling of namespaces in these path expression is
        contained in the ITS element <gi>ns</gi> which is a child of
        <gi>rules</gi>. </p>
-->

        <p>The ITS <att>selector</att> attribute allows:</p>
        <list>
          <item>ITS data category attributes to appear in global rules
          (even outside of an XML document or schema)</item>
          <item>ITS data categories attributes to pertain to sets of
          XML nodes (for example all <gi>p</gi> elements in an XML
          document)</item>
          <item>ITS markup to pertain to attributes</item>
          <item>ITS markup to <ref target="#associating-its-with-existing-markup">
associate with existing markup</ref> (for example the <code>term</code> element in DITA)</item>
        </list>

        </div>

        </div>
        <div xml:id="basic-concepts-overinher">
         <head>Overriding and Inheritance</head>

        <p>The power of the ITS selection mechanisms comes at
        a price: rules related to <ref target="#selection-precedence">overriding/precedence</ref>,
        and <ref target="#datacategories-defaults-etc">inheritance</ref>,
        have to be established.</p>
        <p>The document in <ptr target="#EX-basic-concepts-3" type="exref"/> shows how inheritance and overriding work for the
         <ref target="#trans-datacat">Translate</ref> data category. By default elements are translatable. Here, the <gi>translateRule</gi> element declared in the header overrides the default for the <gi>head</gi> element inside <gi>text</gi> and for all its children. Because the <gi>title</gi> element is actually translatable, the global rule needs to be overridden by a local <code>its:translate="yes"</code>. Note that the global rule is processed first, regardless of its position inside the document. In the main body of the document, the default applies, and here it is <code>its:translate="no"</code> that is used to set "faux pas" as non-translatable.</p>
        <exemplum xml:id="EX-basic-concepts-3">
          <head>Overriding and Inheritance</head>
          <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-basic-concepts-3.xml"/>
        </exemplum>
                
        </div>
        <div xml:id="basic-concepts-addingpointing">
         <head>Adding Information or Pointing to Existing Information</head>
        
        <p>For some data categories, special attributes add or point to information about the selected nodes. For example, the <ref target="#locNote-datacat">Localization Note</ref> data category can add information to selected nodes (using a <gi>locNote</gi> element), or point at existing information elsewhere in the document (using a <att>locNotePointer</att> attribute).</p>

        <p>The functionality of adding information to the selected
        nodes is available for each data category except <ref target="#language-information">Language Information</ref>. Pointing to
        existing information is not possible for data categories that
        express <emph>a closed set of values</emph>; that is: <ref target="#trans-datacat">Translate</ref>, <ref target="#directionality">Directionality</ref> and <ref target="#elements-within-text">Elements Within Text</ref>.</p>

        <p>The functionalities of adding information and pointing to
        existing information are <emph>mutually exclusive</emph>. That
        is to say, attributes for pointing and adding must not appear
        at the same rule element.</p>
        
        </div>
      </div>

      <div xml:id="notation-terminology">
        <head>Notation and Terminology</head>
        <p>
          <emph>This section is normative.</emph>
        </p>
        <div xml:id="notation">
          <head>Notation</head>
          <p xml:id="rfc-keywords">The keywords "MUST", "MUST NOT",
          "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT",
          "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to
          be interpreted as described in <ptr type="bibref" target="#rfc2119"/>.</p>
          <p>The namespace URI that <ref target="#rfc-keywords">MUST</ref>
          be used by implementations of this specification is:</p>
          <eg>http://www.w3.org/2005/11/its</eg>
          <p>The namespace prefix used in this specification for this
          URI is "its". It is recommended that implementations of this
          specification use this prefix.</p>
          <p>In addition, the following namespaces are used in this
          document:</p>
          <list type="unordered">
            <item><code>http://www.w3.org/2001/XMLSchema</code> for
            the XML Schema namespace, here used with the prefix
            "xs"</item>
            <item><code>http://relaxng.org/ns/structure/1.0</code> for
            the RELAX NG namespace, here used with the prefix
            "rng"</item>
<item><code>http://www.w3.org/1999/xlink</code> for the XLink namespace, here used with the prefix "xlink"</item>
          </list>
        </div>
        <div xml:id="def-schemalanguage">
          <head>Schema Language</head>
          <p>
            <termStruct term="schema" xml:id="t001">
              <term>Schema language</term> refers in this
              specification to an XML-related modeling or validation
              language such as XML DTD, XML Schema or RELAX
              NG.</termStruct>
          </p>

          <note>
            <p>This specification provides schemas in the format of
            XML DTD, XML Schema or RELAX NG. However, these schemas
            are only non-normative; <ref target="#conformance-product-schema">conformance for ITS
            markup declarations</ref> defines only mandatory positions
            of ITS declarations in schemas. This makes it possible to
            use ITS with any schema language that allows for using
            these positions.</p>
          </note>
        </div>
        <div xml:id="def-datacat">
          <head>Data category</head>
          <p><termStruct term="data category" xml:id="t002">ITS
          defines <term>data category</term> as an abstract concept
          for a particular type of information for
          internationalization and localization of XML schemas and
          documents.</termStruct> The concept of a data category is
          independent of its implementation in an XML environment
          (e.g. using an element or attribute).</p>
          <p>For each data category, ITS distinguishes between the
          following:</p>
          <list type="unordered">
            <item>the prose description, see <ptr target="#datacategory-description" type="specref"/>
            </item>
            <item>schema language independent formalization, see the
            "markup declarations" subsections in <ptr target="#datacategory-description" type="specref"/>
            </item>
            <item>schema language specific implementations, see <ptr target="#its-schemas" type="specref"/>
            </item>
          </list>
          <exemplum>
            <head>A data category and its implementation</head>
            <p>The <ref target="#trans-datacat">Translate</ref> data category conveys
            information as to whether a piece of content should be
            translated or not.</p>
            <p>The simplest formalization of this prose description on
            a schema language independent level is a
            <att type="class">translate</att> attribute with two possible values:
            <val>yes</val> and <val>no</val>. An implementation on a
            schema language specific level would be the declaration of
            the <att type="class">translate</att> attribute in, for example, an XML DTD, an
            XML Schema document or an RELAX NG document. A different implementation would be a <gi>translateRule</gi> element that allows for specifying <ref target="#selection-global">global rules</ref> about the <ref target="#trans-datacat">Translate</ref> data category.</p>

          </exemplum>
        </div>
        <div xml:id="def-selection">
          <head>Selection</head>
          <p><termStruct xml:id="termdef-selection" term="Selection"><term>selection</term> encompasses
          mechanisms to specify to what parts of an XML document an
          ITS data category and its values should be applied
          to.</termStruct> Selection is discussed in detail in <ptr type="specref" target="#its-processing"/>. Selection can be
          applied globally, see <ptr target="#selection-global" type="specref"/>, and locally, see <ptr target="#selection-local" type="specref"/>. As for global
          selection, ITS information can be <ref target="#def-adding-pointing">added</ref> to the selected
          nodes, or it can <ref target="#def-adding-pointing">point to
          existing information</ref> which is related to selected
          nodes. </p>
          <p xml:id="selection-and-inclusion-mechanisms">Selection relies on the information that is
          given in the XML Information Set <ptr target="#xmlinfoset" type="bibref"/>. ITS applications <ref target="#rfc-keywords">MAY</ref> implement inclusion mechanisms
          such as XInclude or DITA's <ptr type="bibref" target="#dita10"/> conref.</p>
<note>            <p xml:id="note-object-selection">The selection of the ITS data categories applies to textual values contained within element or attribute nodes. In
some cases these nodes form pointers to other resources; a well-known
example is the <att>src</att> attribute on the <gi>img</gi> element in
HTML. The ITS <ref target="#trans-datacat">Translate</ref> data category applies to the
text of the pointer itself, not the object to which it points. Thus in
the following example, the translation information specified via the <gi>translateRule</gi> element applies to the filename
<val>instructions.jpg</val>, and is not an instruction to open the
graphic and change the words therein.</p>
                <exemplum>
   <head>Selecting the text of a pointer to an external object</head>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-notation-terminology-1.xml"/>
    </exemplum></note>
        </div>
          <div xml:id="iri-usage">
              <head>Usage of Internationalized Resource Identifiers in ITS</head>
              <p>The
attributes <att>href</att>, <att type="element">locNoteRef</att> and <att type="element">termInfoRef</att> which contain resource identifiers <ref target="#rfc-keywords">MUST</ref> allow the usage of Internationalized Resource Identifiers (IRIs, <ptr target="#rfc3987" type="bibref"/> or its successor) to ease the adoption of ITS
in international application scenarios.</p>
<note><p>The ITS schemas in <ptr target="#its-schemas" type="specref"/> are not
normative. Hence this specification defines no validation requirements for IRI values in ITS markup. For processing of these values, relying on IRIs imposes no specific
requirements. The reason is that the processing happens on the info set level <ptr type="bibref" target="#xmlinfoset"/>, where no difference between IRIs and URIs exists.</p></note>
          </div>
      </div>
      <div xml:id="conformance">
        <head>Conformance</head>
        <p>
          <emph>This section is normative.</emph>
          
        </p>
        <p>The usage of the term <emph>conformance clause</emph> in
        this section is in compliance with <ptr target="#qa-framework" type="bibref"/>.</p>
        <p>This specification defines two types of conformance:
        conformance of <ref target="#conformance-product-schema">1)
        ITS markup declarations</ref> , and conformance of <ref target="#conformance-product-processing-expectations">2)
        processing expectations for ITS Markup</ref>. These
        conformance types complement each other. An implementation of
        this specification <ref target="#rfc2119">MAY</ref> use them
        separately or together.</p>
        <div xml:id="conformance-product-schema">
          <head>Conformance Type 1: ITS Markup Declarations</head>
          <p><emph>Description:</emph> ITS markup declarations
          encompass all declarations that are part of the
          Internationalization Tag Set. They do not concern the
          <emph>usage</emph> of the markup in XML documents. Such
          markup is subject to the conformance clauses in <ptr target="#conformance-product-processing-expectations" type="specref"/>.</p>
          <p><emph>Definitions related to this conformance
          type:</emph> ITS markup declarations are defined in various
          subsections in <ptr target="#its-processing" type="specref"/> and
          <ptr target="#datacategory-description" type="specref"/>
          (e.g. <ptr target="#locNote-markup" type="specref"/>) in a
          schema language independent manner, relying on the ODD
          language. Their occurrence in other sections of this
          document is typographically marked via bold face and
          color.</p>
          <p><emph>Who uses this conformance type:</emph> Schema
          designers integrating ITS markup declarations into a
          schema. All conformance clauses for this conformance type
          concern the position of ITS markup declarations in that
          schema, and their status as mandatory or optional.</p>
          <p>
            <emph>Conformance clauses:</emph>
          </p>
          <list type="unordered">
            <item><p xml:id="its-conformance-1-1"><emph>1-1:</emph> At least one of the following <ref target="#rfc-keywords">MUST</ref>
              be in the schema:</p><list>
                <item><gi>rules</gi> element</item>
                <item>one of the <ref target="#span.attributes">local
                ITS attributes</ref></item>
                <item><gi>span</gi> element</item>
                <item><gi>ruby</gi> element</item>
              </list></item>
            <item><p xml:id="its-conformance-1-2"><emph>1-2:</emph> If the <gi>rules</gi> element is
            used, it <ref target="#rfc-keywords">MUST</ref> be part of the
            content model of at least one element declared in the
            schema. It <ref target="#rfc-keywords">SHOULD</ref> be in a
            content model for meta information, if this is available
            in that schema (e.g. the <gi>head</gi> element in
            <ptr target="#xhtml10" type="bibref"/>).</p></item>
            <!-- <item diff="del"><emph>1-2: </emph> The
                 <gi>schemaRule</gi> element <ref
                 target="#rfc2119">MAY</ref> be used as part of a <ref
                 target="#termdef-schema-annotation">schema
                 annotation</ref> for elements and attributes.</item>
                 <item diff="del"><hi
                 diff="chg"><emph>1-2:</emph></hi> All <hi
                 diff="chg"><ref target="#span.attributes">local ITS
                 attributes</ref></hi> <ref
                 target="#rfc2119">SHOULD</ref> be declared at all
                 elements which are part of the<hi diff="del">
                 existing or new</hi> schema.</item>-->
            <item><p xml:id="its-conformance-1-3"><emph>1-3:</emph> If the <gi>ruby</gi> element is
            used, it <ref target="#rfc-keywords">SHOULD</ref> be declared
            as an inline element.</p></item>
            <item><p xml:id="its-conformance-1-4"><emph>1-4:</emph> If the <gi>span</gi> element is
            used, it <ref target="#rfc-keywords">SHOULD</ref> be declared
            as an inline element.</p></item>

          </list>
          <p xml:id="its-markup-conformance-claims">Full
          implementations of this conformance type will implement all
          markup declarations for ITS. Statements related to this
          conformance type <ref target="#rfc-keywords">MUST</ref> list all
          markup declarations they implement.</p>
          <p><emph>Examples: </emph> Examples of the usage of ITS
          markup declarations in various existing schemas are given in
          a separate document <ptr target="#xml-i18n-bp" type="bibref"/>.</p>
          <note>
            <p>Since the ITS markup declarations are schema language
            independent, each schema language can use its own,
            possibly multiple, mechanisms to implement the conformance
            clauses for ITS markup declarations. For example, an XML
            DTD can use parameter entities to encapsulate the <ref target="#span.attributes">ITS local attributes</ref>, or
            declare them directly for each element. The appropriate
            steps to integrate ITS into a schema depend on the design
            of this schema (e.g. whether it already has a
            customization layer that uses parameter entities). The
            ITS schemas in the format of XML DTD, XML Schema and RELAX
            NG in <ptr target="#its-schemas" type="specref"/> are only
            informative examples.</p>

            
          </note>

        </div>
        <div xml:id="conformance-product-processing-expectations">
          <head>Conformance Type 2: The Processing Expectations for ITS Markup</head>


          <p><emph>Description:</emph> Processors need to compute the
          ITS information that pertains to a node in an XML
          document. The ITS processing expectations define how the
          computation has to be carried out. Correct computation
          involves support for <ref target="#def-selection">selection
          mechanism</ref>, <ref target="#datacategories-defaults-etc">defaults / inheritance / overriding characteristics</ref>, and <ref target="#selection-precedence">precedence</ref>. The markup
          <ref target="#rfc-keywords">MAY</ref> be valid against a schema
          which conforms to the clauses in <ptr target="#conformance-product-schema" type="specref"/>.</p>
          <p><emph>Definitions related to this conformance
          type:</emph> The processing expectations for ITS markup make
          use of selection mechanisms defined in <ptr target="#its-processing" type="specref"/>. The individual data
          categories defined in <ptr target="#datacategory-description" type="specref"/> have <ref target="#datacategories-defaults-etc">defaults / inheritance / overriding characteristics</ref>,
          and allow for using ITS markup in various positions (<ref target="#selection-global">global</ref> and <ref target="#selection-local">local</ref>).</p>
          <p><emph>Who uses this conformance type:</emph> Applications
          that need to process for internationalization or
          localization the nodes captured by a data category. Examples
          of this type of application are: ITS markup-aware editors,
          or translation tools that make use of ITS markup to filter
          translatable text as an input to the localization
          process.</p>
          <note>
            <p> Application-specific processing (that is processing
            that goes beyond the computation of ITS information for a
            node) such as automated filtering of translatable content
            based on the <ref target="#trans-datacat">Translate</ref> data category is not covered by the conformance clauses
            below.</p>
          </note>
          <note>
          	<p>
          		The ITS Working group provides a
          		<ref target="http://www.w3.org/International/its/tests/">
          			 test suite
          		</ref>
          		to help implementers to write applications that
          		support the ITS specifications. The test suite
          		provides pairs of input and output files.
          	</p>
          </note>
          <p>
            <emph>Conformance clauses:</emph>
          </p>
          <list type="unordered">
            <item><p xml:id="its-conformance-2-1"><emph>2-1:</emph> A processor <ref target="#rfc-keywords">
MUST</ref> implement at least one <ref target="#def-datacat">data category</ref>.
              For each implemented <ref target="#def-datacat">data category</ref>, the following
                <ref target="#rfc-keywords">MUST</ref> be taken into account:</p><list>
                <item><p xml:id="its-conformance-2-1-1"><emph>2-1-1:</emph>
                processing of at least one selection mechanism (<ref target="#selection-global">global</ref> or <ref target="#selection-local">local</ref>).</p></item>
                <item><p xml:id="its-conformance-2-1-2"><emph>2-1-2:</emph> the
                <ref target="#datacategories-defaults-etc">default
                selections for the data category</ref>.</p></item>
                <item><p xml:id="its-conformance-2-1-3"><emph>2-1-3:</emph> the
                precedence definitions for selections defined in <ptr target="#selection-precedence" type="specref"/>, for
                the type of selections it processes.</p></item>
              </list></item>
        
            <item><p xml:id="its-conformance-2-2"><emph>2-2:</emph> If an application claims to
            process ITS markup for the global selection mechanism, it
            <ref target="#rfc-keywords">MUST</ref> process an XLink
            <att>href</att> attribute found on a <gi>rules</gi>
            elements.</p></item>
          </list>
          <p xml:id="its-processing-conformance-claims">Statements
          related to this conformance type <ref target="#rfc-keywords">MUST</ref> list all <ref target="#def-datacat">data categories</ref> they implement,
          and for each <ref target="#def-datacat">data category</ref>
          which type of selection they support.</p>
          

        </div>
      </div>

      <div xml:id="its-processing">
        <head>Processing of ITS information</head>

        <p>
          <emph>This section is normative.</emph>
        </p>

<div xml:id="its-version-attribute">
<head>Indicating the Version of ITS</head>

<p>The version of the ITS schema defined in this specification is
<val>1.0</val>. The version is indicated by the ITS
<att>version</att> attribute. This attribute is mandatory for the
<gi>rules</gi> element, where it <ref target="#rfc-keywords">MUST</ref> be in no namespace. If there is no <gi>rules</gi> element in an
XML document, a prefixed ITS <att>version</att> attribute
(e.g. <code>its:version</code>) <ref target="#rfc-keywords">MUST</ref> be provided at the
root element of the document. If there is both a <att>version</att>
attribute at the root element and a <gi>rules</gi> element in a
document, they <ref target="#rfc-keywords">MUST NOT</ref> specify
different versions.</p>

<p>Each XML document can have a different
version. That is: if external rules are linked via an XLink
<att>href</att> attribute on the <gi>rules</gi> element, they can
specify a different version than the <gi>rules</gi> element.</p>

</div>
        <div xml:id="datacategory-locations">
          <head>Locations of Data Categories</head>
          <p>ITS data categories can appear in two places:</p>
          <list type="unordered">

            <item><ref target="#selection-global">Global rules</ref>:
            the selection is realized within a <gi>rules</gi>
            element. It contains <ref target="#rules.content">rule
            elements</ref> for each data category. Each rule element
            has a <att>selector</att> attribute and possibly other
            attributes. The <att>selector</att> attribute contains an
            <ref target="http://www.w3.org/TR/xpath#NT-AbsoluteLocationPath">
AbsoluteLocationPath</ref> as described in <ref target="#xpath">XPath 1.0</ref> or its successor.</item>
            <item><ref target="#selection-local">Locally in a
            document</ref>: the selection is realized using <ref target="#span.attributes">ITS local attributes</ref>,
            which are attached to an element node, or the <gi>span</gi> or <gi>ruby</gi> element. There is no
            additional <att>selector</att> attribute. The default
            selection for each data category defines whether the
            selection covers attributes and child elements. See <ptr target="#datacategories-defaults-etc" type="specref"/>.</item>
          </list>

          <p>The two locations are described in detail below.</p>
          <div xml:id="selection-global">
            <head>Global, Rule-based Selection</head>
            <p>Global, rule-based selection is implemented using the
            <gi>rules</gi> element. It contains zero or more <ref target="#rules.content">rule elements</ref>. Each <ref target="#rules.content">rule element</ref> has a mandatory
            <att>selector</att> attribute. This attribute and all other possible attributes on <ref target="#rules.content">rule elements</ref> are in the empty namespace and used without a prefix.</p>
              <p>If there is more than one <gi>rules</gi> element in an XML document, the rules from each section are to be processed at the same precedence level. The <gi>rules</gi> sections are to be read in document order, and the ITS rules with them processed sequentially. The versions of these <gi>rules</gi> elements <ref target="#rfc-keywords">MUST NOT</ref> be different.</p>
            <p xml:id="def-adding-pointing">Depending on the data
            category and its usage, there are additional attributes
            for adding information to the selected nodes, or for
            pointing to existing information in the document. For
            example, the <ref target="#locNote-datacat">Localization Note</ref> data category can be used for adding notes to
            selected nodes, or for pointing to existing notes in
            the document. For the former purpose, a <gi>locNote</gi>
            element can be used. For the latter purpose, a
            <att>locNotePointer</att> attribute can be used.</p>

            <p>Each data category allows you to add information to the
             selected nodes except for <ref target="#language-information">language
            information</ref>. Pointing to existing information is not
            possible for data categories that express <emph>a closed
            set of values</emph>, that is: <ref target="#trans-datacat">Translate</ref>, <ref target="#directionality">Directionality</ref> and <ref target="#elements-within-text">Elements Within Text</ref>.</p>
            <p>The functionalities of adding information and pointing
            to existing information are <emph>mutually
            exclusive</emph>. That is: markup for pointing and adding
            <ref target="#rfc-keywords">MUST NOT</ref> appear in the same
            rule element. </p>
            <p>
              Another difference between adding and
              pointing is the usage of XPath:
            </p>
            <list>
              <item>
                
                <p>The value of the <att>selector</att> attribute <ref target="#rfc-keywords">MUST</ref> be an XPath expression
                which starts with "<code>/</code>". That is, it must
                be an <ref target="http://www.w3.org/TR/xpath#NT-AbsoluteLocationPath">
AbsoluteLocationPath</ref> as described in <ref target="#xpath">XPath 1.0</ref> or its successor. This ensures that
                the selection is not relative to a specific
                location. The resulting nodes <ref target="#rfc-keywords">MUST</ref> be either element or
                attribute nodes.</p>
              </item>
              <item>
                <p>Attributes that point to existing information in the document, i.e. attributes whose name ends in <code>...Pointer</code>, <ref target="#rfc-keywords">MUST</ref> use a RelativeLocationPath as described in <ref target="#xpath">XPath 1.0</ref> or its successor. The XPath expression is evaluated relative to the nodes selected by the selector attribute. The following attributes point to existing information: <att>locNotePointer</att>, <att>locNoteRefPointer</att>, <att>termInfoPointer</att>, <att>termInfoRefPointer</att>, <att>rubyPointer</att>, <att>rtPointer</att>, <att>rpPointer</att>, <att>rbcPointer</att>, <att>rtcPointer</att>, <att>rbspanPointer</att>, <att>langPointer</att>.</p>
              </item>
            </list>
            <p>If namespaces <ptr type="bibref" target="#xmlns"/> are
            used in XPath expressions in the <att>selector</att>
            attribute or the pointing attributes, the following rules
            <ref target="#rfc-keywords">MUST</ref> be applied while
            processing XPath:</p>
            <list type="ordered">
              <item>For each prefix, there <ref target="#rfc-keywords">MUST</ref> be an <att>xmlns</att> attribute at the same rule element which allows to resolve the namespace URI of the prefix.</item>
              <item>Element and attribute names without a prefix are
              interpreted as having no namespace.</item>
              <item>To avoid a conflict with rule 2., default
              namespaces <ref target="#rfc-keywords">MUST NOT</ref> be
              used in the XPath expressions.</item>
            </list>
            <exemplum>
              <head>XPath expressions with namespaces</head>
              <p>The <code>term</code> element from the TEI is in a
              namespace <code>http://www.tei-c.org/ns/1.0</code>. </p>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-selection-global-1.xml"/>
            </exemplum>
            <exemplum>
              <head>XPath expressions without namespaces</head>
              <p>The <gi>qterm</gi> element from DocBook is in no
              namespace.</p>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-selection-global-2.xml"/>
            </exemplum>         
            <p>Global rules can appear in the XML document they will
            be applied to, or in a separate XML document. The
            precedence of their processing depends on these
            variations. See also <ptr type="specref" target="#selection-precedence"/>.</p>

            <p>Markup for global, rule-based selection is defined as
            follows.</p>
            <specGrp xml:id="spec-its-global">
              <elementSpec ident="rules" ns="http://www.w3.org/2005/11/its">
		<desc>Container for global rules.</desc>
                <content>
		  <rng:group>		   
		    <rng:zeroOrMore>
		      <rng:choice>
			<rng:ref name="translateRule"/>
			<rng:ref name="locNoteRule"/>
			<rng:ref name="termRule"/>
			<rng:ref name="dirRule"/>
			<rng:ref name="rubyRule"/>
			<rng:ref name="langRule"/>
			<rng:ref name="withinTextRule"/>
		      </rng:choice>
		    </rng:zeroOrMore>
		  </rng:group>
                </content>
                <attList>
                  <attDef ident="version" usage="req">
		    <desc>Version of the ITS schema.</desc>
                    <datatype>
                      <rng:data type="float"/>
                    </datatype>
		    <defaultVal>1.0</defaultVal>
                  </attDef>
                  <attDef ident="xmlns" usage="req">
                    <desc>The ITS namespace.</desc>
                    <datatype>
                      <rng:text/>
                    </datatype>
                    <defaultVal>http://www.w3.org/2005/11/its</defaultVal>
                    <valDesc>A valid XML namespace</valDesc>
                  </attDef>
                  <attDef ident="xmlns:its" usage="req">
                    <desc>The ITS namespace.</desc>
                    <datatype>
                      <rng:text/>
                    </datatype>
                    <defaultVal>http://www.w3.org/2005/11/its</defaultVal>
                    <valDesc>A valid XML namespace</valDesc>
                  </attDef>
                  <attDef ident="href" ns="http://www.w3.org/1999/xlink">
		    <desc>Pointer to external rules files.</desc>
                    <datatype>
                      <rng:data type="anyURI"/>
                    </datatype>
                  </attDef>
                  <attDef ident="type" ns="http://www.w3.org/1999/xlink">
		    <desc>Type of pointer to external rules files.</desc>
                     <valList type="closed">
		      <valItem ident="simple"><desc>Simple link.</desc></valItem>
                   </valList>
                  </attDef>
                </attList>
              </elementSpec>
 
              <classSpec ident="att.selector" type="atts">
                <attList>
                  <attDef ident="selector" usage="req">
		    <desc>XPath expression identifying the nodes to be selected.</desc>
                    <datatype>
                      <rng:data type="string"/>
                    </datatype>
                  </attDef>
		</attList>
	      </classSpec>
              <classSpec ident="att.version" type="atts">
                <attList>
                  <attDef ns="http://www.w3.org/2005/11/its" ident="version" usage="req">
		    <desc>Version of the ITS schema.</desc>
                    <datatype>
                      <rng:data type="float"/>
                    </datatype>
		    <defaultVal>1.0</defaultVal>
                  </attDef>
		</attList>
	      </classSpec>
            </specGrp>
          </div>
          <div xml:id="selection-local">
            <head>Local Selection in an XML Document</head>
            <p>Local selection in XML documents is realized with <ref target="#att.local.with-ns.attributes">local ITS attributes</ref>, the
            <gi>ruby</gi> element, or the <gi>span</gi>
            element. <gi>span</gi> serves just as a carrier for the
            local ITS attributes and a container for <gi>ruby</gi>.</p>
            <p>The content model of <gi>span</gi> permits arbitrary nesting of ruby markup, since the <gi>rb</gi> and <gi>rt</gi> elements themselves can contain <gi>span</gi>. An application of ruby <ref target="#rfc-keywords">MUST</ref> not use such arbitrary nesting.</p>
            <p>The data category determines what is being selected.
            The necessary data category specific defaults
            are described in <ptr target="#datacategories-defaults-etc" type="specref"/>.</p>

            <exemplum xml:id="EX-selection-local-1">
              <head>Defaults for various data categories</head>

              <p>By default the content of all elements in a document is translatable. The attribute <code>its:translate="no"</code> in the <gi>head</gi> element means that the content of this element, including child elements, should not be translated. The attribute <code>its:translate="yes"</code> in the <gi>title</gi> element means that the content of this element, should be translated (overriding the <code>its:translate="no"</code> in <gi>head</gi>). Attribute values of the selected elements or their children are not affected by local <att type="class">translate</att> attributes. By default they are not translatable.</p>
              <p>The default directionality of a document is left-to-right. The <code>its:dir="rtl"</code> in
the <gi>quote</gi> element means that the directionality of the content of this element, including child elements and attributes, is right-to-left. Note that <att>xml:lang</att> indicates only the language, not the directionality.</p>              
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-selection-local-1.xml"/>
            </exemplum>
            <p>Markup for local selection is defined as follows. The attribute group <ref target="#att.local.no-ns.attributes">att.local.no-ns.attributes</ref> contains ITS attributes in no namespace and is used with the ITS elements <gi>span</gi>, <gi>locNote</gi>, <gi>ruby</gi>, <gi>rb</gi>, <gi>rt</gi>, <gi>rbc</gi>, <gi>rtc</gi> and <gi>rp</gi>. The attribute group <ref target="#att.local.with-ns.attributes">att.local.with-ns.attributes</ref> contains namespace qualified ITS attributes and is used with elements from different namespaces.</p>
            <specGrp xml:id="spec-its-local">                
                               
                <classSpec ident="att.local.no-ns" type="atts">
                    <attList>
                       <attDef ident="translate" usage="opt">
		<desc>The <ref target="#trans-datacat">Translate</ref> data category information to be attached to
		the current node.</desc> 
                  <valList type="closed">
		      <valItem ident="yes"><desc>The nodes need to be translated.</desc></valItem>
		      <valItem ident="no"><desc>The nodes must not be translated.</desc></valItem>
		    </valList>
                  </attDef>
  <attDef ident="locNote" usage="opt"><desc>Localization note.</desc>
                    <datatype>
                      <rng:data type="string"/>
                    </datatype>
                  </attDef>
                  <attDef ident="locNoteType" usage="opt"><desc>The type of localization note.</desc>
                   <valList type="closed">
		      <valItem ident="alert"><desc>Localization note is an alert.</desc></valItem>
		      <valItem ident="description"><desc>Localization note is a description.</desc></valItem>
                   </valList>
                  </attDef>
                  <attDef ident="locNoteRef" usage="opt"><desc>URI referring to the location of the localization note.</desc>
                    <datatype>
                      <rng:data type="anyURI"/>
                    </datatype>
                  </attDef>
 <attDef ident="termInfoRef" usage="opt">
		      <desc>Pointer to a resource containing
		      information about the term.</desc>
                    <datatype>
                      <rng:data type="anyURI"/>
                    </datatype>
                  </attDef>
                  <attDef ident="term" usage="opt"><desc>Indicates a term locally.</desc>
                   <valList type="closed">
             <valItem ident="yes"><desc>The value 'yes' means that this is a term.</desc></valItem>
		    <valItem ident="no"><desc>The value 'no' means that this is not a term.</desc></valItem>
                   </valList>
                  </attDef>
<attDef ident="dir" usage="opt">
		    <desc>The text direction for the context.</desc>
                     <valList type="closed">
		      <valItem ident="ltr"><desc>Left-to-right text.</desc></valItem>
		      <valItem ident="rtl"><desc>Right-to-left text.</desc></valItem>
		      <valItem ident="lro"><desc>Left-to-right override.</desc></valItem>
		      <valItem ident="rlo"><desc>Right-to-left override.</desc></valItem>
                   </valList>
                  </attDef> 
                    </attList>
                </classSpec>
                
                <classSpec ident="att.local.with-ns" type="atts">                    
                    <attList>
                       <attDef ident="translate" usage="opt" ns="http://www.w3.org/2005/11/its">
		<desc>The <ref target="#trans-datacat">Translate</ref> data category information to be attached to
		the current node.</desc> 
                  <valList type="closed">
		      <valItem ident="yes"><desc>The nodes need to be translated.</desc></valItem>
		      <valItem ident="no"><desc>The nodes must not be translated.</desc></valItem>
		    </valList>
                  </attDef>
  <attDef ident="locNote" usage="opt" ns="http://www.w3.org/2005/11/its"><desc>Localization note.</desc>
                    <datatype>
                      <rng:data type="string"/>
                    </datatype>
                  </attDef>
                  <attDef ident="locNoteType" usage="opt" ns="http://www.w3.org/2005/11/its"><desc>The type of localization note.</desc>
                   <valList type="closed">
		      <valItem ident="alert"><desc>Localization note is an alert.</desc></valItem>
		      <valItem ident="description"><desc>Localization note is a description.</desc></valItem>
                   </valList>
                  </attDef>
                  <attDef ident="locNoteRef" usage="opt" ns="http://www.w3.org/2005/11/its"><desc>URI referring to the location of the localization note.</desc>
                    <datatype>
                      <rng:data type="anyURI"/>
                    </datatype>
                  </attDef>
 <attDef ident="termInfoRef" usage="opt" ns="http://www.w3.org/2005/11/its">
		      <desc>Pointer to a resource containing
		      information about the term.</desc>
                    <datatype>
                      <rng:data type="anyURI"/>
                    </datatype>
                  </attDef>
                  <attDef ident="term" usage="opt" ns="http://www.w3.org/2005/11/its"><desc>Indicates a term locally.</desc>
                   <valList type="closed">
             <valItem ident="yes"><desc>The value 'yes' means that this is a term.</desc></valItem>
		    <valItem ident="no"><desc>The value 'no' means that this is not a term.</desc></valItem>
                   </valList>
                  </attDef>
<attDef ident="dir" usage="opt" ns="http://www.w3.org/2005/11/its">
		    <desc>The text direction for the context.</desc>
                     <valList type="closed">
		      <valItem ident="ltr"><desc>Left-to-right text.</desc></valItem>
		      <valItem ident="rtl"><desc>Right-to-left text.</desc></valItem>
		      <valItem ident="lro"><desc>Left-to-right override.</desc></valItem>
		      <valItem ident="rlo"><desc>Right-to-left override.</desc></valItem>
                   </valList>
                  </attDef> 
                    </attList>
                </classSpec>

              <elementSpec ident="span" ns="http://www.w3.org/2005/11/its">
		<desc>Inline element to contain ITS information.</desc>
                  <classes>
                      <memberOf key="att.local.no-ns"/>
                  </classes>
                <content>
                  <rng:zeroOrMore>
                    <rng:choice>
                      <rng:text/>
                      <rng:ref name="ruby"/>
                      <rng:ref name="span"/>
                    </rng:choice>
                  </rng:zeroOrMore>
                </content>
                <attList>
                  <attDef ident="xmlns" usage="req">
                    <desc>The ITS namespace.</desc>
                    <datatype>
                      <rng:text/>
                    </datatype>
                    <defaultVal>http://www.w3.org/2005/11/its</defaultVal>
                    <valDesc>A valid XML namespace</valDesc>
                  </attDef>
                  <attDef ident="xmlns:its" usage="req">
                    <desc>The ITS namespace.</desc>
                    <datatype>
                      <rng:text/>
                    </datatype>
                    <defaultVal>http://www.w3.org/2005/11/its</defaultVal>
                    <valDesc>A valid XML namespace</valDesc>
                  </attDef>
                </attList>
              </elementSpec>
            </specGrp>
          </div>
        </div>
        <div xml:id="link-external-rules">
          <head>Link to External Rules</head>

          <p>One way to associate a document with a set of external
          ITS rules is to use the optional XLink <ptr target="#xlink1" type="bibref"/><att>href</att> attribute in the
          <gi>rules</gi> element, accompanied by the XLink <att>type</att> attribute with the value <val>simple</val>. The referenced document must be a
          valid XML document containing at most one <gi>rules</gi>
          element. That <gi>rules</gi> element can be the root element
          or anywhere within the document tree (for example, the
          document could be an XML Schema).</p>

          <p>The rules contained in the referenced document <ref target="#rfc-keywords">MUST</ref> be processed as if they were
          at the top of the <gi>rules</gi> element with the XLink
          <att>href</att> attribute.</p>

          <exemplum xml:id="EX-link-external-rules-1">
            <head>External file EX-link-external-rules-1.xml with global rules:</head>
            <p>The example demonstrates how metadata can be added to
            ITS rules.</p>
            <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-link-external-rules-1.xml"/>
          </exemplum>

          <exemplum>
            <head>Document with a link to EX-link-external-rules-1.xml</head>
            <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-link-external-rules-2.xml"/>
          </exemplum>

          <p>The result of processing the two documents above is the
          same as processing the following document.</p>

          <exemplum>
            <head>Document with identical rules as in the case of included rules</head>
            <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-link-external-rules-3.xml"/>
          </exemplum>

          <p>Applications processing global ITS markup <ref target="#rfc-keywords">MUST</ref> recognize the XLink
          <att>href</att> attribute in the <gi>rules</gi> element;
          they <ref target="#rfc-keywords">MUST</ref> load the
          corresponding referenced document and process its rules
          element before processing the content of the <gi>rules</gi>
          element where the original XLink <att>href</att> attribute
          is.</p>

          <p>External rules may also have links to other external
          rules. The linking mechanism is recursive, the deepest rules
          being overridden by the top-most rules, if any.</p>
        </div>
        <div xml:id="selection-precedence">
          <head>Precedence between Selections</head>
          <p>The following precedence order is defined for selections
          of ITS information in various positions (the first item in
          the list has the highest precedence):</p>
          <list type="ordered">
            <item xml:id="precedence-local">Implicit local selection
            in documents (<ref target="#span.attributes">ITS local
            attributes</ref> on a specific element)</item>
            <item xml:id="precedence-global-in-doc"><p>Global selections
            in documents (using a <gi>rules</gi> element)</p>
	    <p>Inside each <gi>rules</gi> element the precedence order is:
	    <list type="ordered">
	      <item>Any rules inside the rules element</item>
	      <item>Any rules linked via the XLink <att>href</att> attribute</item>
	    </list>	    
	    </p>
        <note><p>If identical selections are defined in different rules elements
	    within  one document, the selection defined by the last takes
	    precedence.</p></note>
	    <note><p>ITS doesn't define precedence related to rules defined or linked
	    based on non-ITS mechanisms (such as processing instructions for linking
	    rules).</p></note>
	    </item>
            <item xml:id="precedence-defaults">Selections via defaults
            for data categories, see <ptr target="#datacategories-defaults-etc" type="specref"/></item>
          </list>
          <p>In case of conflicts between global selections via
          multiple <ref target="#selection-global">rule</ref>
          elements, the last selector has higher precedence.</p>
          <note>
            <p>The precedence order fulfills the same purpose as the
            built-in template rules of <ptr target="#xslt10" type="bibref"/>.</p>
          </note>
          <exemplum>
            <head>Conflicts between selections of ITS information which are resolved using the
              precedence order</head>
              
            <p>The two elements <gi>title</gi> and <gi>author</gi> of this document should be treated as separate content when inside a <gi>prolog</gi> element, but as part of the content of their parent element otherwise. In order to make this distinction two <gi>withinTextRule</gi> elements are used:</p>
            <p>The first rule specifies that <gi>title</gi> and <gi>author</gi> in general should be treated as an element within text. This overrides the default.</p>
            <p>The second rule indicates that when <gi>title</gi> or <gi>author</gi> are found in a <gi>prolog</gi> element their content should be treated separately. This is normally the default, but the rule is needed to override the first rule.</p>
              
<!--           <p>Due to the rules described above, the local
            translatability information from the <att type="class">translate</att>
            attribute on the <gi>p</gi> element has precedence over
            the translatability information on the first
            <gi>translateRule</gi> element. A conflict occurs for
            <gi>p</gi> elements inside of <gi>entry</gi> elements,
            because of the two <gi>translateRule</gi> elements. This
            conflict is resolved via the order of the
            <gi>translateRule</gi> elements. The last one has higher
            precedence.</p> -->
            
            <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-selection-precedence-1.xml"/>
          </exemplum>
        </div>
        <div xml:id="associating-its-with-existing-markup">
          <head>Associating ITS Data Categories with Existing Markup</head>
          <p>Some markup schemes provide markup which can be used to
          express ITS data categories. ITS data categories can be associated with such existing markup, using
          the global selection mechanism described in <ptr type="specref" target="#selection-global"/>.</p>
          <p>Associating existing markup with ITS data
          categories can be done only if the processing expectations of the host markup
          are the same as, or greater than, those of ITS.</p>
          <exemplum xml:id="EX-associating-its-with-existing-markup-1">
            <head>Association of the ITS data categories <ref target="#trans-datacat">
Translate</ref> and <ref target="#terminology">Terminology</ref> with DITA 1.0 markup</head>
            <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-associating-its-with-existing-markup-1.xml"/>
          </exemplum>

          <p>Global rules can be associated with a given XML document using different means:</p>
          <list type="unordered">
           <item><p>By using an <gi>rules</gi> element in the document itself:</p>
            <list type="unordered">
             <item>with the rules directly inside the document, as shown in <ptr target="#EX-associating-its-with-existing-markup-1" type="exref"/></item>
             <item>with a link to an external rules file using the XLink <att>href</att> attribute, as shown in <ptr target="#EX-link-external-rules-1" type="exref"/></item>
            </list>
           </item>
           <item>By associating the rules and the document through a tool-specific mechanism. For example, for a command-line tool: providing the paths of both the XML document to process and its corresponding external rules file.</item>
          </list>
          
        </div>
      </div>
      <div xml:id="datacategory-description">
        <head>Description of Data Categories</head>
        <p>
          <emph>This section is normative.</emph>
        </p>
            <schemaSpec start="" ident="its" ns="http://www.w3.org/2005/11/its"><desc>This schema has been developed using the ODD (<emph>One Document Does it
            all</emph>) language of the Text Encoding Initiative (<ptr target="#tei" type="bibref"/>). This is a literate programming language for writing XML schemas, with three
            characteristics: (1) The element and attribute set is specified using
              an XML vocabulary which includes support for macros
              (like DTD entities, or schema patterns), a hierarchical
              class system for attributes and elements, and creation
              of modules. (2) The content models for elements and attributes is
              written using embedded RELAX NG XML notation. (3) Documentation for elements, attributes, value
              lists etc. is written inline, along with examples and
              other supporting material. XSLT transformations
              are provided by the TEI to extract documentation in
              HTML, XSL FO or LaTeX forms, and to generate RELAX NG
              documents and DTD. From the RELAX NG documents, James
              Clark's <ref target="http://www.thaiopensource.com/relaxng/trang.html">trang</ref>
              can be used to create XML Schema documents.</desc>
              <specGrpRef target="#spec-its-global"/>
              <specGrpRef target="#spec-its-local"/>
              <specGrpRef target="#spec-its-translateRule"/>
              <specGrpRef target="#spec-its-locNoteRule"/>
              <specGrpRef target="#spec-its-termRule"/>
              <specGrpRef target="#spec-its-dirRule"/>
              <specGrpRef target="#spec-its-rubyRule"/>
              <specGrpRef target="#spec-its-langRule"/>
              <specGrpRef target="#spec-its-within-textRule"/>
            </schemaSpec>

        <div xml:id="datacategories-defaults-etc">
          <head>Position, Defaults, Inheritance and Overriding of Data Categories</head>

          <p>The following table summarizes for each data category which selection, default value, and inheritance and overriding behavior applies.</p>
          <list type="unordered">
                <item><emph>Default values</emph> apply if both local or global selection are absent.
The default value for the <ref target="#trans-datacat">Translate</ref> data category for example mandates that elements are translatable, and attributes are not translatable if there is no <gi>translateRule</gi> element and no <att type="class">translate</att> attribute available.</item>
                <item><emph>Inheritance</emph> describes whether ITS information is applicable to child elements of nodes and attributes related to these nodes or their child notes. The inheritance for the <ref target="#trans-datacat">Translate</ref> data category for example mandates that all child elements of nodes are translatable whereas all attributes related to these the nodes or their child notes are not translatable.</item>
                <item><emph>Overriding</emph> describes whether ITS information can be overridden or not. Overriding is only applicable for data categories with inheritance. Overriding thus is not applicable for the <ref target="#terminology">Terminology</ref> and the <ref target="#ruby-annotation">Ruby</ref> data category.</item>
            </list>
          <table border="1" width="100%" diff="chg">
            <row role="head">
              <cell>Data category</cell>

              <cell>Local Usage</cell>
              <cell>Global, rule-based selection</cell>
              <cell>Global adding of information</cell>
              <cell>Global pointing to existing information</cell>
              <cell>Default Values</cell>
              <cell>Inheritance</cell>
              <cell>Overriding</cell>
            </row>
            <row>
              <cell>
                <ref target="#trans-datacat">Translate</ref>
              </cell>

              <cell>Yes</cell>
              <cell>Yes</cell>
              <cell>Yes</cell>
              <cell>No</cell>
              <cell><code>translate="yes"</code> for elements, and <code>translate="no"</code> for attributes</cell>
              <cell>Textual content of element, <emph>including</emph> content of child elements,
                but <emph>excluding</emph> attributes</cell>
              <cell>Yes</cell>
            </row>
            <row>
              <cell>
                <ref target="#locNote-datacat">Localization Note</ref>
              </cell>

              <cell>Yes</cell>
              <cell>Yes</cell>
              <cell>Yes</cell>
              <cell>Yes</cell>
              <cell>None</cell>
              <cell>Textual content of element, <emph>including</emph> content of child elements,
                but <emph>excluding</emph> attributes</cell>
              <cell>Yes</cell>
            </row>
            <row>
              <cell>
                <ref target="#terminology">Terminology</ref>
              </cell>

              <cell>Yes</cell>
              <cell>Yes</cell>
              <cell>Yes</cell>
              <cell>Yes</cell>
              <cell><code>term="no"</code></cell>              
              <cell>None</cell>
<cell>Not applicable</cell>
            </row>
            <row>
              <cell>
                <ref target="#directionality">Directionality</ref>
              </cell>

              <cell>Yes</cell>
              <cell>Yes</cell>
              <cell>Yes</cell>
              <cell>No</cell>
              <cell><code>dir="ltr"</code></cell>
              <cell>Textual content of element, <emph>including</emph> attributes and child
              elements</cell>

              <cell>Yes</cell>
            </row>
            <row>
              <cell>
                <ref target="#ruby-annotation">Ruby</ref>
              </cell>

              <cell>Yes</cell>
              <cell>Yes</cell>
              <cell>Yes</cell>
              <cell>Yes</cell>
              <cell>None</cell>
              <cell>None</cell>
              <cell>Not applicable</cell>
            </row>
            <row>
              <cell>
                <ref target="#language-information">Language Information</ref>
              </cell>

              <cell>No</cell>
              <cell>Yes</cell>
              <cell>No</cell>
              <cell>Yes</cell>
              <cell>None</cell>
              <cell>Textual content of element, <emph>including</emph> attributes and child
              elements</cell>
              <cell>Yes</cell>
            </row>
            <row>
              <cell>
                <ref target="#elements-within-text">Elements Within Text</ref>
              </cell>

              <cell>No</cell>
              <cell>Yes</cell>
              <cell>Yes</cell>
              <cell>No</cell>
             <cell><code>withinText="no"</code></cell>
              <cell>None</cell>
              <cell>Not applicable</cell>
            </row>
          </table>       
            
<exemplum>
               <head>Defaults, inheritance and overriding behavior of data categories</head>
               <p>In this example, the content of all the <gi>data</gi> elements is translatable because the default for
the <ref target="#trans-datacat">Translate</ref> data category in elements is <val>yes</val>. The content of <gi>revision</gi> and <gi>locNote</gi> is not translatable because the default is overridden by the local <code>its:translate="no"</code> attribute in the <gi>prolog</gi> element, and that value is inherited by all the children of <gi>prolog</gi>.</p>
               <p>The localization note for the two first <gi>data</gi> elements is the text defined globally with the
<gi>locNoteRule</gi> element. And this note is overridden for the last <gi>data</gi> element by the local
<code>its:locNote</code> attribute.</p>
<egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-datacat-behavior-1.xml"/>
               <!--<eg><xi:include href="EX-datacat-behavior-1.xml" parse="text"/></eg>-->
           </exemplum>
          <note>
            <p>The data categories differ with respect to defaults. This is due to existing standards and practices. It is common practice for example that information about translation refers only to textual content of an element. Thus, the default selection for the <ref target="#trans-datacat">Translate</ref> data category is the textual content.</p>
          </note>
        </div>
        <div xml:id="trans-datacat">
          <head>Translate</head>
          <div xml:id="translatability-definition">
            <head>Definition</head>
            <p>The <ref target="#trans-datacat">Translate</ref> data category expresses information
            about whether the content of an element or attribute
            should be translated or not. The values of this data
            category are <val>yes</val> (translatable) or
            <val>no</val> (not translatable).</p>
          </div>
          <div xml:id="translatability-implementation">
            <head>Implementation</head>
            <p>The <ref target="#trans-datacat">Translate</ref> data category can be expressed with global rules, or locally on an individual element. The information applies to the textual content of the element, <emph>including</emph> child elements, but <emph>excluding</emph> attributes. The default is that elements are translatable and attributes are not.</p>


            <p>GLOBAL: The <gi>translateRule</gi> element contains the following:</p>
              <list type="unordered">
                 <item>A required <att>selector</att> attribute. It contains an XPath expression which selects the nodes to which this rule applies.</item>
                  <item>A required <att type="element">translate</att> attribute with the value <val>yes</val> or <val>no</val>.</item>
              </list>
            
                      <exemplum xml:id="EX-translate-selector-1">
              <head>The <ref target="#trans-datacat">Translate</ref> data category expressed globally</head>
              <p>The <gi>translateRule</gi> element specifies that the elements <gi>code</gi> must not be translated.</p>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-translate-selector-1.xml"/>
            </exemplum>
            <p>LOCAL: The following local markup is available for the <ref target="#trans-datacat">Translate</ref> data category:</p>
            <list type="unordered">
                 <item>A <att type="class">translate</att> attribute with the value <val>yes</val> or <val>no</val>.</item>
                 </list>
                 <note><p>It is not possible to override the <ref target="#trans-datacat">Translate</ref> data category settings of attributes using local markup. This limitation is consistent with the advised practice of not using translatable attributes.</p></note>
            <exemplum xml:id="EX-translate-selector-2">
              <head>The <ref target="#trans-datacat">Translate</ref> data category expressed locally</head>
              <p>The local <code>its:translate="no"</code> specifies that the content of <gi>panelmsg</gi> must not be translated.</p>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-translate-selector-2.xml"/>
            </exemplum>
          </div>
          <div xml:id="translatability-markup">
            <head>Markup Declarations for Translate</head>
            <specGrp xml:id="spec-its-translateRule">
              <elementSpec ident="translateRule" ns="http://www.w3.org/2005/11/its">
		<desc>Rule about the <ref target="#trans-datacat">Translate</ref> data category.</desc>
                <classes>
                  <memberOf key="att.selector"/>
                </classes>
                <content>
                  <rng:empty/>
                </content>
                <attList>
                  <attDef ident="translate" usage="req">
		    <desc>The <ref target="#trans-datacat">Translate</ref> data category information to be
		    applied to selected nodes.</desc>                   
                     <valList type="closed">
		      <valItem ident="yes"><desc>The nodes need to be translated.</desc></valItem>
		      <valItem ident="no"><desc>The nodes must not be translated.</desc></valItem>
		    </valList>                  
                  </attDef>
                </attList>
              </elementSpec>

              <classSpec ident="att.translate" type="atts">
                <attList>
                  <attDef ident="translate" ns="http://www.w3.org/2005/11/its" usage="opt">
		<desc>The <ref target="#trans-datacat">Translate</ref> data category information to be attached to
		the current node.</desc>
                  <valList type="closed">
		      <valItem ident="yes"><desc>The nodes need to be translated.</desc></valItem>
		      <valItem ident="no"><desc>The nodes must not be translated.</desc></valItem>
		    </valList>
                  </attDef>
                </attList>
              </classSpec>
            </specGrp>
          </div>
        </div>
        <div xml:id="locNote-datacat">
          <head>Localization Note</head>
          <div xml:id="locNote-definition">
            <head>Definition</head>
            <p>The <ref target="#locNote-datacat">Localization Note</ref> data category is used to
            communicate notes to localizers about a particular
            item of content.</p>
            <p>This data category can be used for several purposes, including, but
not limited to:</p>
            <list type="unordered">
              <item>Tell the translator how to translate parts of the
              content</item>
              <item>Expand on the meaning or contextual usage of a
              specific element, such as what a variable refers to or
              how a string will be used on the user interface</item>
              <item>Clarify ambiguity and show relationships between
              items sufficiently to allow correct translation (e.g. in
              many languages it is impossible to translate the word 
              <quote>enabled</quote> in isolation without knowing the
              gender, number and case of the thing it refers
              to.)</item>
              <item>Indicate why a piece of text is emphasized
              (important, sarcastic, etc.)</item>
            </list>
            <p>Two types of informative notes are needed:</p>
            <list type="unordered">
              <item>An alert contains information that the translator
              must read before translating a piece of text. Example:
              an instruction to the translator to leave parts of the
              text in the source language.</item>
              <item>A description provides useful background
              information that the translator will refer to only if
              they wish. Example: a clarification of ambiguity in the
              source text.</item>
            </list>
            <p>Editing tools may offer an easy way to create this type of information.
Translation tools can be made to recognize the difference between these two
types of localization notes, and present the information to translators
in different ways.</p>
          </div>
          <div xml:id="locNote-implementation">
            <head>Implementation</head>
            <p>The <ref target="#locNote-datacat">Localization Note</ref> data category can be expressed with global
            rules, or locally on an individual element. The information applies to the textual
            content of the element, <emph>including</emph> child elements,
            but <emph>excluding</emph> attributes.</p>

            <p xml:id="locNote-global">GLOBAL: The <gi>locNoteRule</gi> element contains the following:</p>
            
              <list type="unordered">
                  <item>A required <att>selector</att> attribute. It contains an XPath expression which selects the nodes to which this rule applies.</item>
                  <item>A required <att type="element">locNoteType</att> attribute with the value <val>description</val> or <val>alert</val>.</item>
                  <item><p>Exactly one of the following:</p>
                  <list type="unordered">
                  <item>A <gi>locNote</gi> element that contains the note itself and allows for <ref target="#selection-local">local ITS markup</ref>.</item>    
                  <item>A <att>locNotePointer</att> attribute that contains a relative XPath expression pointing to a node that holds the localization note.</item>
                  <item>A <att>locNoteRef</att> attribute that contains a URI referring to the location of the localization note.</item>
                   <item>A <att>locNoteRefPointer</att> attribute that contains a relative XPath expression pointing to a node that holds the URI referring to the location of the localization note.</item>
                  </list></item>
                 
              </list>
     <exemplum xml:id="EX-locNote-element-1">
              <head>The <gi>locNote</gi> element</head>
              <p>The <gi>locNoteRule</gi> element associates the content of the <gi>locNote</gi> element with the message with the identifier 'DisableInfo' and flags it as important. This would also work if the rule was in an external file, allowing to provide notes without modifying the source document.</p>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-locNote-element-1.xml"/>
     </exemplum> 

              <exemplum xml:id="EX-locNotePointer-attribute-1">
              <head>The <att>locNotePointer</att> attribute</head>
                            <p>The <att>locNotePointer</att> attribute is a relative XPath expression pointing to a node that holds the note.</p>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-locNotePointer-attribute-1.xml"/>
              </exemplum>      

             <exemplum xml:id="EX-locNoteRef-attribute-1">
              <head>The <att>locNoteRef</att> attribute</head>
                                          <p>The <gi>locNoteRule</gi> element specifies that the message with the identifier 'NotFound' has a corresponding explanation note in an
external file. The URI for the exact location of the note is stored in the <att type="element">locNoteRef</att> attribute.</p>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-locNoteRef-attribute-1.xml"/>
             </exemplum>       

                 <exemplum>
              <head>The <att>locNoteRefPointer</att> attribute</head>
                            <p>The <att>locNoteRefPointer</att> attribute contains a relative XPath expression pointing to a node that holds the URI referring to the location of the note.</p>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-locNoteRefPointer-attribute-1.xml"/>
              </exemplum>   

<p>LOCAL: The following local markup is available for the <ref target="#locNote-datacat">Localization Note</ref> data category:</p>
              <list type="unordered">
                  <item><p>One of the following:</p>
                      <list type="unordered">
                          <item>A <att type="class">locNote</att> attribute that contains the note itself.</item>
                          <item>A <att type="class">locNoteRef</att> attribute that contains a URI referring to the location of the localization note.</item>
                      </list>
                      </item>
                      <item>An optional <att type="class">locNoteType</att> attribute with the value <val>description</val> or <val>alert</val>. If the <att type="class">locNoteType</att> attribute is not present, the type of localization note will be assumed to be <val>description</val>. </item>
              </list>

               <exemplum>
              <head>The <ref target="#locNote-datacat">Localization Note</ref> data category expressed locally</head>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-locNote-selector-2.xml"/>
            </exemplum>
          <note><p>It is generally recommended to avoid using attributes to store text, however, in this specific case, the need to provide the notes without interfering with
the structure of the host document is outweighing the drawbacks of using an
attribute.</p></note>
          </div>

          <div xml:id="locNote-markup">
            <head>Markup Declarations for Localization Note</head>
            <specGrp xml:id="spec-its-locNoteRule">

              <elementSpec ident="locNoteRule" ns="http://www.w3.org/2005/11/its">
		<desc>Rule about the <ref target="#locNote-datacat">Localization Note</ref> data category.</desc>
                <classes>
                  <memberOf key="att.selector"/>
                </classes>
                <content>
                  <rng:optional>
                    <rng:ref name="locNote"/>
                  </rng:optional>
                </content>
		<attList>
                  <attDef ident="locNotePointer" usage="opt"><desc>Relative XPath expression pointing to a node that holds the localization note.</desc>
                    <datatype>
                      <rng:data type="string"/>
                    </datatype>
                  </attDef>
                  <attDef ident="locNoteType" usage="req"><desc>The type of localization note.</desc>
                    <valList type="closed">
		      <valItem ident="alert"><desc>Localization note is an alert.</desc></valItem>
		      <valItem ident="description"><desc>Localization note is a description.</desc></valItem>
                   </valList>
                  </attDef>
                  <attDef ident="locNoteRef" usage="opt"><desc>URI referring to the location of the localization note.</desc>
                    <datatype>
                      <rng:data type="anyURI"/>
                    </datatype>
                  </attDef>
                  <attDef ident="locNoteRefPointer" usage="opt"><desc>Relative XPath expression pointing to a node that holds the URI referring to the location of the localization note.</desc>
                    <datatype>
                      <rng:data type="string"/>
                    </datatype>
                  </attDef>
		</attList>
              </elementSpec>
              <elementSpec ident="locNote" ns="http://www.w3.org/2005/11/its">
		<desc>Contains a localization note.</desc>
                <classes>
                  <memberOf key="att.local.no-ns"/>
                </classes>
                <content>
                <rng:zeroOrMore>
                    <rng:choice>
                      <rng:text/>
                      <rng:ref name="ruby"/>
                      <rng:ref name="span"/>
                    </rng:choice>
                  </rng:zeroOrMore>
                </content>
              </elementSpec>

              <classSpec type="atts" ident="att.locNote">
                <attList>
                  <attDef ns="http://www.w3.org/2005/11/its" ident="locNote" usage="opt"><desc>Localization note.</desc>
                    <datatype>
                      <rng:data type="string"/>
                    </datatype>
                  </attDef>
                  <attDef ns="http://www.w3.org/2005/11/its" ident="locNoteType" usage="opt"><desc>The type of localization note.</desc>
                   <valList type="closed">
		      <valItem ident="alert"><desc>Localization note is an alert.</desc></valItem>
		      <valItem ident="description"><desc>Localization note is a description.</desc></valItem>
                   </valList>
                  </attDef>
                  <attDef ns="http://www.w3.org/2005/11/its" ident="locNoteRef" usage="opt"><desc>URI referring to the location of the localization note.</desc>
                    <datatype>
                      <rng:data type="anyURI"/>
                    </datatype>
                  </attDef> 
                </attList>
              </classSpec>
            </specGrp>
          </div>
        </div>
        <div xml:id="terminology">
          <head>Terminology</head>
          <div xml:id="terminology-definition">
            <head>Definition</head>
            <p>The <ref target="#terminology">Terminology</ref> data category is used to mark terms and optionally
associate them with information, such as definitions. This helps to increase consistency across different
            parts of the documentation. It is also helpful for translation.</p>
            <note>
             <p>Existing terminology standards such as <ptr target="#iso12200" type="bibref"/> and its derived formats are about coding terminology data, while the ITS <ref target="#terminology">Terminology</ref> data category simply allows to identify terms in XML documents and optionally to point to corresponding information.</p>
            </note>
          </div>
          <div xml:id="terminology-implementation">
            <head>Implementation</head>
            
                        <p>The <ref target="#terminology">Terminology</ref> data category can be expressed with global
            rules, or locally on an individual element. There is no inheritance. The default is that neither elements nor attributes are terms.</p>

            <p>GLOBAL: The <gi>termRule</gi> element contains the following:</p>
            
              <list type="unordered">
                  <item>A required <att>selector</att> attribute. It contains an XPath expression which selects the nodes to which this rule applies.</item>
                  <item>A required <att type="element">term</att> attribute with the value <val>yes</val> or <val>no</val>.</item>
                  <item><p>Exactly one of the following:</p>
                  <list type="unordered">

                  <item>A <att>termInfoPointer</att> attribute that contains a relative XPath expression pointing to a node that holds the terminology information.</item>
                  <item>A <att>termInfoRef</att> attribute that contains a URI referring to the resource providing information about the term.</item>
                   <item>A <att>termInfoRefPointer</att> attribute that contains a relative XPath expression pointing to a node that holds the URI referring to the location of the terminology information.</item>
                  </list></item>
                 
              </list>
            <exemplum>
              <head>Usage of the <att>termInfoPointer</att> attribute</head>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-terms-selector-1.xml"/>
            </exemplum>
            <exemplum>
              <head>Usage of the <att>termInfoRef</att> attribute</head>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-terms-selector-2.xml"/>
            </exemplum>
            <exemplum>
              <head>Usage of the <att>termInfoRefPointer</att> attribute</head>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-terms-selector-3.xml"/>
            </exemplum>
            
            <p>LOCAL: The following local markup is available for the <ref target="#terminology">Terminology</ref> data category:</p>
              <list type="unordered">
                  <item>A <att type="class">term</att> attribute with the value <val>yes</val> or <val>no</val>.</item>
                          <item>An optional <att type="class">termInfoRef</att> attribute that contains a URI referring to the resource providing information about the term.</item>
              </list>
            <exemplum>
              <head>The <ref target="#terminology">Terminology</ref> data category expressed locally</head>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-terms-selector-4.xml"/>
            </exemplum>
          </div>
          <div xml:id="terminology-markup">
            <head>Markup Declarations for Terminology</head>
            <specGrp xml:id="spec-its-termRule">
              <elementSpec ident="termRule" ns="http://www.w3.org/2005/11/its">
		<desc>Rule about the <ref target="#terminology">Terminology</ref> data category.</desc>
                <classes>
                  <memberOf key="att.selector"/>
                </classes>
                <content>
                  <rng:empty/>
                </content>
                <attList>
		  <attList>
		      <attDef ident="term" usage="req"><desc>Indicates whether the selection is a term or not.</desc>
                   <valList type="closed">
             <valItem ident="yes"><desc>The value 'yes' means that this is a term.</desc></valItem>
		    <valItem ident="no"><desc>The value 'no' means that this is not a term.</desc></valItem>
                   </valList>
                  </attDef>
		    <attDef ident="termInfoRef" usage="opt">
		      <desc>URI referring to the resource providing information about the term.</desc>
		      <datatype>
			<rng:data type="anyURI"/>
		      </datatype>
		    </attDef>
		    <attDef ident="termInfoRefPointer" usage="opt">
		      <desc>Relative XPath expression pointing to a node containing a URI referring to the resource providing information about the term.</desc>
		      <datatype>
			<rng:data type="string"/>
		      </datatype>
		    </attDef>
		    <attDef ident="termInfoPointer" usage="opt">
		      <desc>Relative XPath expression pointing to a node containing
		      information about the term.</desc>
		      <datatype>
			<rng:data type="string"/>
		      </datatype>
		    </attDef>
		  </attList>
                </attList>
              </elementSpec>
              <classSpec ident="att.term" type="atts">
                <attList>
                  <attDef ident="termInfoRef" ns="http://www.w3.org/2005/11/its" usage="opt">
		      <desc>Pointer to a resource containing
		      information about the term.</desc>
                    <datatype>
                      <rng:data type="anyURI"/>
                    </datatype>
                  </attDef>
                  <attDef ident="term" ns="http://www.w3.org/2005/11/its" usage="opt"><desc>Indicates a term locally.</desc>
                   <valList type="closed">
             <valItem ident="yes"><desc>The value 'yes' means that this is a term.</desc></valItem>
		    <valItem ident="no"><desc>The value 'no' means that this is not a term.</desc></valItem>
                   </valList>
                  </attDef>
                </attList>
              </classSpec>
            </specGrp>
          </div>
        </div>
        <div xml:id="directionality">
          <head>Directionality</head>
          <div xml:id="directionality-definition">
            <head>Definition</head>
            <p>The <ref target="#directionality">Directionality</ref> data category allows the user to specify the base writing direction of blocks, embeddings and overrides for the Unicode bidirectional
algorithm. It has four values: <val>ltr</val>, <val>rtl</val>, <val>lro</val> and <val>rlo</val>.</p>
            <note><p>ITS defines only the values of the <ref target="#directionality">Directionality</ref> data category and their inheritance. The behavior of text labeled in this way may vary, according
to the implementation. Implementers are encouraged, however, to model the
behavior on that described in the CSS 2.1 specification or its successor. In
such a case, the effect of the data category's values would correspond to
the following CSS rules:</p>
                <list type="unordered"><item><p>Data category value: <val>ltr</val> (left-to-right text)</p><p>CSS rule: <code>*[dir="ltr"] { unicode-bidi: embed; direction: ltr}</code></p></item>

    <item><p>Data category value: <val>rtl</val> (right-to-left text)</p><p>CSS rule: <code>*[dir="rtl"] { unicode-bidi: embed; direction: rtl}</code></p></item>


    <item><p>Data category value: <val>rlo</val> (left-to-right override)</p><p>CSS rule: <code>*[dir="lro"] { unicode-bidi: bidi-override; direction: ltr}</code></p></item>

   
    <item><p>Data category value: <val>rlo</val> (right-to-left text)</p><p>CSS rule: <code>*[dir="rlo"] { unicode-bidi: bidi-override; direction: rtl}</code></p></item></list>                  
            
            <p>More information about how to use this data category is provided by <ptr target="#bidiarticle" type="bibref"/>.</p></note> 
          </div>
          <div xml:id="directionality-implementation">
            <head>Implementation</head>
             <p>The <ref target="#directionality">Directionality</ref> data category can be expressed with global rules, or locally on an individual element. The information applies to the textual content of the element, <emph>including</emph> child elements and attributes. The default is that both elements and attributes have the directionality of left-to-right.</p>
            <p>GLOBAL: The <gi>dirRule</gi> element contains the following:</p>
              <list type="unordered">
                 <item>A required <att>selector</att> attribute. It contains an XPath expression which selects the nodes to which this rule applies.</item>
                  <item>A required <att type="element">dir</att> attribute with the value <val>ltr</val>, <val>rtl</val>, <val>lro</val> or <val>rlo</val>.</item>
              </list>
           
            <exemplum xml:id="EX-dir-selector-1.xml">
              <head>Document which needs global rules for directionality</head>
              <p>In this document the right-to-left directionality is marked using a <att>direction</att> attribute with a value <val>rtlText</val>.</p>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-dir-selector-1.xml"/>
            </exemplum>
             <exemplum xml:id="EX-dir-selector-2.xml">
              <head>The <ref target="#directionality">Directionality</ref> data category expressed with global rules</head>
              <p>The <gi>dirRule</gi> element indicates that all elements with an attribute <code>direction="rtlText"</code> have right-to-left content.</p>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-dir-selector-2.xml"/>
            </exemplum>
            
             <p>LOCAL: The following local markup is available for the <ref target="#directionality">Directionality</ref> data category:</p>
            <list type="unordered">
                 <item>A <att type="class">dir</att> attribute with the value <val>ltr</val>, <val>rtl</val>, <val>lro</val> or <val>rlo</val>.</item>
                 </list>
            <exemplum>
              <head>The <ref target="#directionality">Directionality</ref> data category expressed locally</head>
              <p>On the first <gi>quote</gi> element, the <code>its:dir="rtl"</code> attribute indicates a right-to-left content.</p>
              <egXML xmlns="http://www.tei-c.org/ns/Examples" target="EX-dir-selector-3.xml"/>
            </exemplum>
          </div>
          <div xml:id="directionality-markup">
            <head>Markup Declarations for Directionality</head>
            <specGrp xml:id="spec-its-dirRule">

              <elementSpec ident="dirRule" ns="http://www.w3.org/2005/11/its">
		<desc>Rule about the <ref target="#directionality">Directionality</ref> data category.</desc>
                <classes>
                  <memberOf key="att.selector"/>
                </classes>
                <content>
                  <rng:empty/>
                </content>
		<attList>
		  <attDef ident="dir" usage="req">
		    <desc>The text direction for the selection.</desc>
                     <valList type="closed">
		      <valItem ident="ltr"><desc>Left-to-right text.</desc></valItem>
		      <valItem ident="rtl"><desc>Right-to-left text.</desc></valItem>
		      <valItem ident="lro"><desc>Left-to-right override.</desc></valItem>
		      <valItem ident="rlo"><desc>Right-to-left override.</desc></valItem>
                   </valList>
                 </attDef>
                </attList>
	      </elementSpec>

              <classSpec ident="att.dir" type="atts">
                <attList>
                  <attDef ident="dir" ns="http://www.w3.org/2005/11/its" usage="opt">
		    <desc>The text direction for the context.</desc>
                     <valList type="closed">
		      <valItem ident="ltr"><desc>Left-to-right text.</desc></valItem>
		      <valItem ident="rtl"><desc>Right-to-left text.</desc></valItem>
		      <valItem ident="lro"><desc>Left-to-right override.</desc></valItem>
		      <valItem ident="rlo"><desc>Right-to-left override.</desc></valItem>
                   </valList>
                  </attDef>
                </attList>
              </classSpec>
            </specGrp>
          </div>
        </div>
        <div xml:id="ruby-annotation">
          <head>Ruby</head>
          <div xml:id="ruby-definition">
            <head>Definition</head>
            <p>The <ref target="#ruby-annotation">Ruby</ref> data category is used for a run of text that
            is associated with another run of text, referred to as the
            base text. Ruby text is used to provide a short annotation
            of the associated base text. It is most often used to
            provide a reading (pronunciation) guide.</p>
          </div>
          <div xml:id="ruby-implementation">
            <head>Implementation</head>
            <p>The <ref target="#ruby-annotation">Ruby</ref> data category can be expressed with global rules, or locally. There is no inheritance.</p>
            
             <p>GLOBAL: The <gi>rubyRule</gi> element contains the following:</p>
            <list type="unordered">
                <item>A required <att>selector</att> attribute. It contains an XPath expression which selects the nodes to which this rule applies. This is the ruby base text.</item>
                <item>An optional <att>rubyPointer</att> attribute that contains a relative XPath expression pointing to a node that corresponds to the ruby element.</item>               
                <item>An optional <att>rpPointer</att> attribute that contains a relative XPath expression pointing to a node that corresponds to the ruby parenthesis.</item>
                <item>An optional <att>rbcPointer</att> attribute that contains a relative XPath expression pointing to a node 