Introduction
This section is informative.
ITS 2.0 is a technology to add metadata to Web content, for the benefit of
localization, language technologies, and internationalization. The ITS 2.0
specification both identifies concepts (such as Translate
) that are
important for internationalization and localization, and 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 HTML5, serializations in [NIF](http://nlp2rdf.org/nif-1-0), and provides definitions
of ITS elements and attributes in the form of XML Schema and RELAX NG .
This document aims to realize many of the ideas formulated in the [ITS 2.0 Requirements
document](http://www.w3.org/TR/2012/WD-its2req-20120524/), in and .
Not all requirements listed there are addressed in this document. Those which are
not addressed here are either covered in (potentially in an as yet unwritten best practice
document on multilingual Web content), or may be addressed in a future version
of this specification.
Relation to ITS 1.0 and New Principles
Relation to ITS 1.0
ITS 2.0 has the following relations to ITS 1.0:
It adopts and maintains the following principles from ITS 1.0:
- It adopts the use of data categories to define discrete
units of functionality
- It adopts the separation of data category definition from
the mapping of the data category to a given content
format
- It adopts the conformance principle of ITS1.0 that an
implementation only needs to implement one data category to
claim conformance to ITS 2.0
- ITS 2.0 supports all ITS 1.0 data category definitions and adds
new definitions.
- ITS 2.0 adds a number of new data categories not found in ITS
1.0.
- While ITS 1.0 addressed only XML, ITS 2.0 specifies
implementations of data categories in both XML
and HTML5.
- Where ITS 1.0 data categories are implemented in XML, the
implementation must be conformant with the ITS 1.0 approach to XML
to claim conformance to ITS 2.0.
New Principles
ITS 2.0 also adds the following principles and features not found in ITS
1.0:
- ITS 2.0 data categories are intended to be format neutral, with
support for XML, HTML5, and NIF: a data category
implementation only needs to support a single content format mapping
in order to support a claim of ITS 2.0 conformance.
- ITS 2.0 provides algorithms to generate NIF out of HTML5
or XML with ITS 2.0 metadata.
- A global implementation of ITS 2.0 requires at least the XPath
version 1.0. Other versions of XPath or other query languages (e.g.,
CSS selectors) can be expressed via a dedicated
[queryLanguage](#queryLanguage) attribute.
As of the time of this writing, the new data categories included in ITS
2.0 are:
Below needs to be updated before each publication before last call.
[Domain](#domain)
[Disambiguation](#Disambiguation)
[Locale Filter](#LocaleFilter)
[Translation Agent Provenance](#translation-agent-provenance)
[Text Analysis
Annotation](#TextAnalyisAnnotation)
[External Resource](#externalresource)
[Target Pointer](#target-pointer)
[Id Value](#idvalue)
[Preserve Space](#preservespace)
[Localization Quality Issue](#lqissue)
[Localization Quality Précis](#lqprecis)
[MT Confidence](#mtconfidence)
[Allowed Characters](#allowedchars)
[Storage Size](#storagesize)
Motivation for ITS
Content or software that is authored in one language (the 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.
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.
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 .
Note: This should refer to the best practice document as well,
when ready.
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 ) creates challenges and opportunities in the domain of
XML internationalization and localization.
Typical Problems
The following examples sketch one of the issues that currently hinder
efficient XML-related localization: the lack of a standard, declarative
mechanism that identifies which parts of an XML document need to be
translated. Tools often cannot automatically perform this
identification.
Document with partially translatable content
In this document it is difficult to distinguish between those
string elements that are translatable and those that
are not. Only the addition of an explicit flag could resolve the
issue.
Document with partially translatable content
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
//component[@type!='image']/data[@type='text'] is
translatable.
Users and Usages of ITS
Potential Users of ITS
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. 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:
- abstractly in the data category descriptions:
- concretely in the ITS schemas:
Schema developers starting a schema from the ground up
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.
Schema developers working with an existing schema
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.
The question "How to use ITS with existing popular markup
schemes?" is covered in more details (including examples) in a
separate document: .
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.
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 ). 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.
Vendors of content-related tools
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.
Content producers
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 [global, rule-based
approach](#selection-global)). This global work, however, may fall to
information architects, rather than the content producers
themselves.
Machine Translation Systems
This type of service is intended for a broad user community ranging from developers and integrators through translation companies and agencies, freelance translators and post-editors to ordinary translation consumers and other types of MT employment. Data categories are envisaged for supporting and guiding the different automated backend processes of this service type, thereby adding substantial value to the service results as well as possible subsequent services. These processes include basic tasks, like parsing constraints and markup, and compositional tasks, such as disambiguation. These tasks consume and generate valuable metadata from and for third party users, for example, provenance information and quality scoring, and add relevant information for follow-on tasks, processes and services, such as MT post-editing, MT training and MT terminological enhancement.
Text Analytics
These types of users fulfil the role of providing services for automatic generation of metadata for improving localization, data integration or knowledge management workflows. This class of users comprises of developers and integrators of services that automate language technology tasks such as domain classification, named entity recognition and disambiguation, term extraction, language identification and others. Text analytics services generate data that contextualizes the raw content with more explicit information. This can be used to improve the output quality in machine translation systems, search result relevance in information retrieval systems, as well as management and integration of unstructured data in knowledge management systems.
Ways to Use ITS
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.
-
A content author uses an attribute on a particular element to say
that the text in the element should not be translated.
Use of ITS by content author
The its:translate="no" attributes indicate that the
path and the cmd elements should not be
translated.
-
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.
Use of ITS by information architect
The translateRule element is used in the header of the
document to indicate that none of the path or cmd
elements should be translated.
-
A processor may insert markup at the top of the document which
links to ITS information outside of the document.
Use of ITS by processor
A rules element is inserted in the header of the document.
It has a XLink href attribute used to link to an [ITS external rule](#link-external-rules)
document.
ITS rule file shared by different documents
The rules element contains several ITS rules that are common
to different documents. One of them is a translateRule
element that indicates that no path or cmd element
should be translated.
-
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.
Following schema example has to updated once we have final XSD schema for ITS 2.0
An XSD schema with ITS declaration
The declarations for the translate attribute
is added to a group of common attributes commonAtts.
This allows to use the translate attribute
within the documents like in .
The first two approaches above can be likened to the use of CSS in . Using a style
attribute, an XHTML content author may assign a color to a particular
paragraph. That author could also have used the style 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.
Usage in HTML5
ITS 2.0 adds support for usage in HTML5. In HTML5, ITS local selection is
realized via dedicated, [data category
specific attributes](#html5-local-attributes).
Add example of HTML5 with local attributes for illustartion purposes
For the so-called “[global
approach](#basic-concepts-selection-global)” in HTML5, this specification defines a link type for
referring to files with global rules in .
Using ITS global rules in HTML5
The link element points to the rules file
EX-translateRule-html5-1.xml The rel
attribute identifies the ITS specific link relation
its-rules.
ITS rules file linked from HTML5
The rules file linked in .
Support for legacy HTML content
ITS 2.0 does not define how to use ITS in HTML versions prior version 5.
Users are encouraged to migrate their content to HTML5 or XHTML. While
it is possible to use its-* attributes introduced for HTML5
in older versions of HTML (such as 3.2 or 4.01) and pages using these
attributes will work without any problems, its-* attributes
will be marked as invalid in validators.
Out of Scope
The definition of what a localization process or localization parameters must
address is outside the scope of this standard and it does not address all of
the mechanisms or data formats (sometimes called Localization Properties)
that may be needed to configure localization workflows or process specific
formats. However, it does define standard data categories that may be used
in defining localization workflows or processing specific formats.
“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.
Important Design Principles
Abstraction via data categories: ITS defines data
categories as an abstract notion for information needed for the
internationalization and localization of XML schemas and documents and HTML5
documents. This abstraction is helpful in realizing independence from any
one particular implementation (e.g., as an element or attribute). (See for a definition of the term data
categories, for the
definition of the various ITS data categories, and subsections in for the data
category implementations.)
Powerful selection mechanism: For ITS markup that appears in an
XML instance, which XML nodes the ITS-related information pertains to must
be clearly defined. Thus, ITS defines [selection](#termdef-selection) 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 . ITS applications may implement
inclusion mechanisms such as XInclude or DITA's conref.
Content authors, for example, need a simple way to work with the [Translate](#trans-datacat) data category in order to
express whether the content of an element or attribute should be translated
or not. Localization managers, on the other hand, need an efficient way to
manage translations of large document sets based on the same schema. These
needs could by realized by a specification of defaults for the [Translate](#trans-datacat) data category along with
exceptions to those defaults (e.g. all p elements should be
translated, but not p elements inside of an index
element).
To meet these requirements this specification introduces mechanisms that add
ITS information to XML documents, see . These mechanisms also provide a means for specifying
ITS information for attributes (a task for which no standard means
previously existed).
The ITS selection mechanisms allows you to provide information about content
[locally](#selection-local) (specified at the XML or
HTML element to which it pertains) or [globally](#selection-global) (specified in another part of the document). Global
selection mechanisms can be in the same document, or in a separate file.
No dedicated extensibility: 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 ) may be
used.
Ease of integration:
- ITS follows the example from
[section 4](http://www.w3.org/TR/2001/REC-xlink-20010627/#att-method) of , 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 [section 3.14](http://www.w3.org/TR/itsreq/#impact) in
. Only for some requirements do
additional child elements have to be used, see for example .
- ITS has no dependency on technologies which are still under
development.
- ITS fits with existing work in the W3C architecture (e.g. use of for the selection mechanism).
Basic Concepts
This section is informative.
Selection
Information (e.g. "translate this") captured by ITS markup (e.g.
its:translate='yes') always pertains to one or more XML or
HTML nodes (primarily element and attribute nodes). In a sense, ITS markup
“selects” the relevant node(s). Selection may be explicit or implicit. ITS
distinguishes two approaches to selection: (1) local, and (2) using global
rules.
The mechanisms defined for ITS selection resemble those defined in . The local approach can be compared to
the style attribute in HTML/XHTML, and the approach with global
rules is similar to the style element in HTML/XHTML. ITS usually
uses XPath for identifying nodes although CSS and other query languages can
be used if supported by application. Thus,
- the local approach puts ITS markup in the relevant element of the host
vocabulary (e.g. the author element in DocBook)
- the
[rule-based, global approach](#selection-global)
puts the ITS markup in elements defined by ITS itself (namely the
rules element)
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).
The following two examples sketch the distinction between the local and
global approaches, using the translate as one
example of ITS markup.
Local Approach
The document in shows
how a content author may use the ITS translate
attribute to indicate that all content inside the author
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.
ITS markup on elements in an XML document (local approach)
For this example to work, the schema developer will need to add the translate 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.
Global Approach
The document in shows a
different approach to identifying non-translatable content, similar to
that used with a style element in , but using an ITS-defined element called
rules. It works as follows: A document can contain a
rules element (placed where it does not impact the
structure of the document, e.g., in a “head” section). It contains one
or more ITS rule elements (for example translateRule). Each of
these specific elements contains a selector attribute. As its
name suggests, this attribute selects the node or nodes to which a
corresponding ITS information pertains. The values of ITS selector
attributes are XPath absolute location paths (or CSS selectors if [queryLanguage](#queryLanguage) is set to "css").
Information for the handling of namespaces in these path expressions is
taken from namespace declarations
at the current rule element.
Caveat Related to XSLT-based Processing of ITS Selector
Attributes
The values of ITS selector attributes are XPath absolute
location paths. Accordingly, the following is a legitimate
value:
myElement/descendant-or-self::*/@*
Unfortunately, values like this cause trouble when they are used in
XSLT-based processing of ITS where the values of the ITS
selector attributes are used as values of
match attributes of XSLT templates. The reason for
this is the following: match attributes may only contain
a restriction/subset of XPath expressions, so-called [patterns](http://www.w3.org/TR/xslt#patterns).
Basically the following restrictions hold for patterns:
- only axes "child" or "attribute" allowed
- "//" or "/" possible
- id() or key() function possible
- predicates possible
Using only XSLT patterns in ITS selector 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:
*[self::myElement]/@* | myElement//*/@*
ITS global markup in an XML document (rule-based approach)
For this approach to work, the schema developer needs to add the
rules element and associated markup to the schema. In some
cases global rules may be sufficient to allow the schema developer to
avoid adding other ITS markup (such as an translate attribute) to the elements and attributes 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.
For specification of the [Translate](#trans-datacat)
data category information, the contents of the rules 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.
The global, rule-based approach has the following benefits:
- 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 nodes
(for example all p elements in an XML instance)
- Changes can be made in a single location, rather than by searching
and modifying local markup throughout a document (or documents, if
the rules element is stored as an external entity)
- ITS data categories can designate attribute values as well as
elements.
- It is possible to associate ITS markup with existing markup (for
example the term element in DITA)
The commonality in both examples above is the markup
translate='no'. This piece of ITS markup can be
interpreted as follows:
- it pertains to the
[Translate](#trans-datacat)
data category
- the attribute translate holds a value of no
The ITS selector attribute allows:
- ITS data category attributes to appear in global rules (even
outside of an XML document or schema)
- ITS data categories attributes to pertain to sets of XML nodes
(for example all p elements in an XML document)
- ITS markup to pertain to attributes
- ITS markup to
[
associate with existing markup](#associating-its-with-existing-markup) (for example the
term element in DITA)
Overriding and Inheritance
The power of the ITS selection mechanisms comes at a price: rules related to
[overriding/precedence](#selection-precedence), and
[inheritance](#datacategories-defaults-etc), have to be
established.
The document in shows how
inheritance and overriding work for the [Translate](#trans-datacat) data category. By default elements are translatable.
Here, the translateRule element declared in the header overrides
the default for the head element inside text and for all
its children. Because the title element is actually translatable,
the global rule needs to be overridden by a local
its:translate="yes". 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
its:translate="no" that is used to set “faux pas” as
non-translatable.
Overriding and Inheritance
Adding Information or Pointing to Existing Information
For some data categories, special attributes add or point to information
about the selected nodes. For example, the [Localization Note](#locNote-datacat) data category can add information to selected
nodes (using a locNote element), or point to existing information
elsewhere in the document (using a locNotePointer attribute).
The functionality of adding information to the selected nodes is available
for each data category except [Language
Information](#language-information). Pointing to existing information is not possible for
data categories that express a closed set of values; that is:
[Translate](#trans-datacat), [Directionality](#directionality), [Locale Filter](#LocaleFilter) and [Elements Within Text](#elements-within-text).
The following statement is not correct anymore, e.g. [Localization Quality Issue, applied globally](#lqissue-global) allows for something like locQualityIssuesRef and locQualityIssuesTypePointer at the same locQualityIssueRule element. Should this be changed or should the statement be dropped?
The functionalities of adding information and pointing to existing
information are mutually exclusive. That is to say, attributes
for pointing and adding must not appear at the same rule element.
Notation and Terminology
This section is normative.
Notation
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 .
The namespace URI that [MUST](#rfc-keywords) be used by
implementations of this specification is:
http://www.w3.org/2005/11/its
The namespace prefix used in this specification for this URI is “its”. It is
recommended that implementations of this specification use this prefix.
In addition, the following namespaces are used in this document:
http://www.w3.org/2001/XMLSchema for the XML Schema
namespace, here used with the prefix “xs”
http://relaxng.org/ns/structure/1.0 for the RELAX NG
namespace, here used with the prefix “rng”
http://www.w3.org/1999/xlink for the XLink namespace,
here used with the prefix “xlink”
Schema Language
Schema language refers in this specification to an
XML-related modeling or validation language such as XML Schema
or RELAX NG.
This specification provides schemas in the format of XML Schema and
RELAX NG. However, these schemas are only non-normative; [conformance for ITS markup
declarations](#conformance-product-schema) 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.
Data category
ITS defines data
category as an abstract concept for a particular type of
information for internationalization and localization of XML schemas and
documents. The concept of a data category is independent of
its implementation in an XML environment (e.g. using an element or
attribute).
For each data category, ITS distinguishes between the following:
- the prose description, see
- schema language independent formalization, see the "implementation" subsections in
- schema language specific implementations, see
A data category and its implementation
The [Translate](#trans-datacat) data category conveys
information as to whether a piece of content should be translated or
not.
The simplest formalization of this prose description on a schema language
independent level is a translate attribute with
two possible values: yes and no. An implementation
on a schema language specific level would be the declaration of the translate attribute in, for example,
an XML Schema document or an RELAX NG document. A different
implementation would be a translateRule element that allows for
specifying [global rules](#selection-global) about the
[Translate](#trans-datacat) data category.
Selection
selection encompasses mechanisms to specify to what
parts of an XML document an ITS data category and its values should be
applied to. Selection is discussed in detail in . Selection can be applied
globally, see , and locally,
see . As for global
selection, ITS information can be [added](#def-adding-pointing) to the selected nodes, or it can [point to existing information](#def-adding-pointing) which
is related to selected nodes.
Selection relies on the
information that is given in the XML Information Set . ITS applications [MAY](#rfc-keywords) implement inclusion mechanisms such as
XInclude or DITA's conref.
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 src attribute on the img element in
HTML. The ITS [Translate](#trans-datacat) 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 translateRule element applies to the filename
instructions.jpg, and is not an instruction to open the
graphic and change the words therein.
Selecting the text of a pointer to an external object
ITS Local Attributes
ITS Local Attributes are all attributes defined in as a local markup.
Rule Elements
Rule Elements are all elements defined in as elements for global rules.
Usage of Internationalized Resource Identifiers in ITS
The attributes href, locNoteRef and termInfoRef which contain resource identifiers [MUST](#rfc-keywords) allow the usage of Internationalized
Resource Identifiers (IRIs, or its
successor) to ease the adoption of ITS in international application
scenarios.
The ITS schemas in 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 ,
where no difference between IRIs and URIs exists.
Conformance
This section is normative.
The usage of the term conformance clause in this section is in
compliance with .
This specification defines three types of conformance: conformance of [1) ITS markup declarations](#conformance-product-schema) , conformance of
[2) processing expectations
for ITS Markup](#conformance-product-processing-expectations) and conformance of [3)
processing expectations for ITS Markup in HTML](#conformance-product-html-processing-expectations). Also special [conformance class](#conformance-class-html5-its) is defined for using ITS markup in
HTML5 document which servers as an applicable specification for HTML5+ITS. These conformance types
and classes complement each other. An implementation of this specification [MAY](#rfc2119) use them separately or together.
Conformance Type 1: ITS Markup Declarations
Description: ITS markup declarations encompass all declarations
that are part of the Internationalization Tag Set. They do not concern the
usage of the markup in XML documents. Such markup is
subject to the conformance clauses in .
Definitions related to this conformance type: ITS markup
declarations are defined in various subsections in in a schema language
independent manner.
Who uses this conformance type: 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.
Conformance clauses:
1-1: At least one of the
following [MUST](#rfc-keywords) be in the
schema:
- rules element
- one of the local ITS attributes
- span element
- ruby element
1-2: If the
rules element is used, it [MUST](#rfc-keywords) be part of the content model of at least one element
declared in the schema. It [SHOULD](#rfc-keywords)
be in a content model for meta information, if this is available in
that schema (e.g. the head element in ).
1-3: If the ruby
element is used, it [SHOULD](#rfc-keywords) be
declared as an inline element.
1-4: If the span
element is used, it [SHOULD](#rfc-keywords) be
declared as an inline element.
Full implementations of this
conformance type will implement all markup declarations for ITS. Statements
related to this conformance type [MUST](#rfc-keywords) list
all markup declarations they implement.
Examples: Examples of the usage of ITS markup declarations in
various existing schemas are given in a separate document .
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 [ITS local attributes](#local-attributes), 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 Schema and RELAX NG in are only informative
examples.
Conformance Type 2: The Processing Expectations for ITS Markup
All traces of HTML has to be removed if we will proceed with CT 3 and HTML+ITS CC.
Description: Processors need to compute the ITS information that
pertains to a node in an XML or HTML5 document. The ITS processing
expectations define how the computation has to be carried out. Correct
computation involves support for [selection
mechanism](#def-selection), [defaults /
inheritance / overriding characteristics](#datacategories-defaults-etc), and [precedence](#selection-precedence). The markup [MAY](#rfc-keywords) be valid against a schema which
conforms to the clauses in .
Definitions related to this conformance type: The processing
expectations for ITS markup make use of selection mechanisms defined in . The individual data
categories defined in have [defaults / inheritance /
overriding characteristics](#datacategories-defaults-etc), and allow for using ITS markup in
various positions ([global](#selection-global) and [local](#selection-local)).
Who uses this conformance type: Applications that need to
process the nodes captured by a data category for internationalization or
localization. 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.
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 [Translate](#trans-datacat) data category is not covered by the conformance
clauses below.
Conformance clauses:
2-1: A processor [ MUST](#rfc-keywords) implement at least
one
[data category](#def-datacat). For each implemented
[data category](#def-datacat), the following
[MUST](#rfc-keywords) be taken into
account:
2-1-1:
processing of at least one selection mechanism ([global](#selection-global) or [local](#selection-local)).
2-1-2: the [default selections
for the data category](#datacategories-defaults-etc).
2-1-3: the
precedence definitions for selections defined in , for the
type of selections it processes.
2-2: If an application
claims to process ITS markup for the global selection mechanism, it
[MUST](#rfc-keywords) process an XLink
href attribute found on a rules elements. If
he application processes HTML5 documents, it [MUST](#rfc-keywords) process an HTML
href attribute found on an HTML link
element. The link element [MUST](#rfc-keywords) also have a rel attribute with the
value its-rules.
2-3: If an application
claims to process ITS markup implementing the conformance clauses
2-1, 2-2 and 2-3, it [MUST](#rfc-keywords) process
that markup with HTML5 or with XML documents.
2-4: After processing ITS information on the basis of conformance clauses [2-1](#its-conformance-2-1) and [2-2](#its-conformance-2-2), an application [MAY](#rfc-keywords) convert an XML or HTML document (or its DOM representation) to NIF, using the algorithm described in .
The conformance clause [2-4](#its-conformance-2-4) essentially means that the conversion to NIF is an optional feature of ITS 2.0, and that the conversion is independent of whether ITS information has been made available via the global or local selection mechanisms, see conformance clause [2-1-1](#its-conformance-2-1-1).
Statements related to this
conformance type [MUST](#rfc-keywords) list all [data categories](#def-datacat) they implement, and for each
[data category](#def-datacat) which type of selection
they support, whether they support processing of XML and / or HTML5. If the implementation provides the conversion to NIF (see conformance clause [2-4](#its-conformance-2-4)), this [MUST](#rfc-keywords) be stated.
The above conformance clauses are directly reflected in the [ITS
2.0 test suite](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#). All tests specify which data category is
processed (clause 2-1); they are relevant for (clause 2-1-1) global or
local selection, or both; they require the processing of defaults and
precedence of selections (clauses 2-1-2 and 2-1-3); for each data
category there are tests with linked rules (2-2); and all types of tests
are given for XML and HTML5 content (clause 2-3). In addition, there are test cases for conversion to NIF (clause 2-4). Implementors are
encouraged to organize their documentation in a similar way, so that
users of ITS 2.0 easily can understand the processing capabilities
availably.
Need to update link to test suite once the test suite is
moved.
Conformance Type 3: Processing Expectations for ITS Markup in HTML
Description: Processors need to compute the ITS information that
pertains to a node in a HTML5 document. The ITS processing
expectations define how the computation has to be carried out. Correct
computation involves support for [selection
mechanism](#def-selection), [defaults /
inheritance / overriding characteristics](#datacategories-defaults-etc), and [precedence](#html5-selection-precedence).
Definitions related to this conformance type: The processing expectations
for ITS markup make use of selection mechanisms defined in . The individual data categories defined in have [defaults / inheritance / overriding
characteristics](#datacategories-defaults-etc), and allow for using ITS markup in various positions ([local](#html5-local-attributes), [external global](#html5-external-global-rules) and [inline global](#html5-inline-global-rules)).
Who uses this conformance type: Applications that need to
process the nodes captured by a data category for internationalization or
localization. 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.
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 [Translate](#trans-datacat) data category is not covered by the conformance
clauses below.
Conformance clauses:
3-1: A processor [ MUST](#rfc-keywords) implement at least
one
[data category](#def-datacat). For each implemented
[data category](#def-datacat), the following
[MUST](#rfc-keywords) be taken into
account:
3-1-1:
processing of at least one selection mechanism ([global](#selection-global) or [local](#selection-local)).
3-1-2: the [default selections
for the data category](#datacategories-defaults-etc).
3-1-3: the
precedence definitions for selections defined in , for the
type of selections it processes.
3-2: If an application claims to
process ITS markup for the global selection mechanism, it [MUST](#rfc-keywords) process a href attribute found on a
link elements which has a rel attribute with the value
its-rules.
3-3: If an application
claims to process ITS markup implementing the conformance clauses
3-1, 3-2 and 3-3, it [MUST](#rfc-keywords) process
that markup within HTML5 documents.
Statements related to this
conformance type [MUST](#rfc-keywords) list all [data categories](#def-datacat) they implement, and for each
[data category](#def-datacat) which type of selection
they support.
Conformance Class for HTML5+ITS documents
Conforming HTML5+ITS documents are those that comply with all the conformance criteria
for documents as defined in with the following exception:
[Global attributes](http://dev.w3.org/html5/spec/single-page.html#global-attributes) which can be used on all HTML elements are extended by
attributes for local data categories as defined in .
Processing of ITS information
This section is normative.
Indicating the Version of ITS
The version of the ITS schema defined in this specification is
2.0. The version is indicated by the ITS version
attribute. This attribute is mandatory for the rules element, where
it [MUST](#rfc-keywords) be in no namespace. If there is no
rules element in an XML document, a prefixed ITS
version attribute (e.g. its:version) [MUST](#rfc-keywords) be provided at the root element of the
document. If there is both a version attribute at the root
element and a rules element in a document, they [MUST NOT](#rfc-keywords) specify different versions.
External, linked rules can have different versions than internal rules.
Locations of Data Categories
ITS data categories can appear in two places:
[Global rules](#selection-global): the selection is
realized within a rules element. It contains [rule elements](#rule-elements) for each data category.
Each rule element has a selector attribute and possibly other
attributes. The selector attribute contains an absolute
selector as defined in .
[Locally in a document](#selection-local): the
selection is realized using ITS local
attributes, which are attached to an element node, or the
span or ruby element. There is no additional
selector attribute. The default selection for each data
category defines whether the selection covers attributes and child
elements. See .
The two locations are described in detail below.
Global, Rule-based Selection
Global, rule-based selection is implemented using the rules
element. It contains zero or more [rule
elements](#rule-elements). Each [rule element](#rule-elements)
has a mandatory selector attribute. This attribute and all
other possible attributes on [rule
elements](#rule-elements) are in the empty namespace and used without a
prefix.
If there is more than one rules element in an XML document, the
rules from each section are to be processed at the same precedence
level. The rules sections are to be read in document order, and
the ITS rules with them processed sequentially. The versions of these
rules elements [MUST NOT](#rfc-keywords)
be different.
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 [Localization Note](#locNote-datacat)
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
locNote element can be used. For the latter purpose, a
locNotePointer attribute can be used.
Each data category allows users to add information to the selected nodes
except for [language
information](#language-information). Pointing to existing information is not possible
for data categories that express a closed set of values,
that is: [Translate](#trans-datacat), [Directionality](#directionality), [Locale Filter](#LocaleFilter), and [Elements Within Text](#elements-within-text).
The functionalities of adding information and pointing to existing
information are mutually exclusive. That is: markup for
pointing and adding [MUST NOT](#rfc-keywords) appear in
the same rule element.
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 .
Local Selection in an XML Document
Local selection in XML documents is realized with [ITS local attributes](#local-attributes),
the ruby element, or the span element. span
serves just as a carrier for the local ITS attributes and a container
for ruby.
The content model of span permits arbitrary nesting of ruby
markup, since the rt element can contain span. An
application of ruby, however, [MUST](#rfc-keywords) not
use such arbitrary nesting.
The data category determines what is being selected. The necessary data
category specific defaults are described in .
Defaults for various data categories
By default the content of all elements in a document is translatable.
The attribute its:translate="no" in the head
element means that the content of this element, including child
elements, should not be translated. The attribute
its:translate="yes" in the title element
means that the content of this element, should be translated
(overriding the its:translate="no" in head).
Attribute values of the selected elements or their children are not
affected by local translate attributes. By
default they are not translatable.
The default directionality of a document is left-to-right. The
its:dir="rtl" in the quote element means
that the directionality of the content of this element, including
child elements and attributes, is right-to-left. Note that
xml:lang indicates only the language, not the
directionality.
The dir and translate attributes are not
listed in the ITS attributes to be used in HTML5. The reason is that
these two attributes are available in HTML5 natively, so there is no
need to provide them as its- attributes. The definition
of the two attributes in HTML5 is compatibly, that is it provides
the same values and interpretation, as the definition for the two
data categories [Translate](#trans-datacat) and
[Directionality](#directionality).
Query Language of Selectors
Choosing Query Language
[Rule elements](#rule-elements) have attributes which
contain asbolute and relative selectors. Interpretation of these
selectors depends on the actual query languge. The query language is set
by queryLanguage attribute on rules element. If
queryLanguge is not specified XPath 1.0 is used as a
default query language.
XPath 1.0
XPath 1.0 is identified by xpath value in
queryLanguage attribute.
Absolute selector
The absolute selector [MUST](#rfc-keywords) be an
XPath expression which starts with "/". That is, it
must be an [
AbsoluteLocationPath](http://www.w3.org/TR/xpath/#NT-AbsoluteLocationPath) or union of [
AbsoluteLocationPath](http://www.w3.org/TR/xpath/#NT-AbsoluteLocationPath)s as described in [XPath 1.0](#xpath). This ensures that the selection is not
relative to a specific location. The resulting nodes [MUST](#rfc-keywords) be either element or attribute
nodes.
Context for evaluatiation of the XPath expression is as follows:
-
Context node is set to [Root
Node](http://www.w3.org/TR/xpath/#root-node).
-
Both context position and context size are 1.
-
All variables defined by param elements are
bind.
-
All functions defined in the [XPath Core
Function Library](http://www.w3.org/TR/xpath/#corelib) are available. It is an error for
an expression to include a call to any other function.
-
The set of namespace declarations are those in scope on the
element which has the attribute in which the expression
occurs. This includes the implicit declaration of the prefix
xml required by the the [XML Namespaces Recommendation](#xmlns); the
default namespace (as declared by xmlns) is not
part of this set.
XPath expressions with namespaces
The term element from the TEI is in a namespace
http://www.tei-c.org/ns/1.0.
XPath expressions without namespaces
The term element from DocBook V4.5 is in no
namespace.
Relative selector
The relative selector [MUST](#rfc-keywords) use a
[RelativeLocationPath](http://www.w3.org/TR/xpath/#NT-RelativeLocationPath) as described in [XPath 1.0](#xpath). The XPath expression is evaluated relative to
the nodes selected by the selector attribute. The following
attributes point to existing information: locNotePointer,
locNoteRefPointer, termInfoPointer,
termInfoRefPointer, rubyPointer,
rtPointer, rpPointer,
langPointer, locQualityIssuesRefPointer,
locQualityIssueTypePointer,
locQualityIssueCommentPointer,
locQualityIssueSeverityPointer,
locQualityIssueProfileRefPointer.
Make sure that previous list of ..Pointer attributes is
complete once spec is stable.
Context for evaluatiation of the XPath expression is same as for
absolute selector with the following changes:
-
Nodes selected by the expression in the selector
attribute form the current node list.
-
Context node comes from the current node list.
-
The context position comes from the position of the current
node in the current node list; the first position is 1.
-
The context size comes from the size of the current node
list.
CSS Selectors
CSS Selectors are identified by css value in
queryLanguage attribute.
Absolute selector
Absolute selector [MUST](#rfc-keywords) be
interpreted as selector as defined in [Selectors Level 3](#css3-selectors). Both simple selectors and groups of
selectors can be used.
Relative selector
Relative selector [MUST](#rfc-keywords) be
interpreted as selector as defined in [Selectors Level 3](#css3-selectors). Selector is not evaluated against the
complete document tree but only against subtrees rooted at nodes
selected by selector in the selector attribute.
Additional query languages
ITS processors [MAY](#rfc-keywords) support additional
query languages. For each additional query language processor [MUST](#rfc-keywords) define:
- identifier of query language used in
queryLanguage;
- rules for evaluating absolute selector to collection of
nodes;
- rules for evaluating relative selector to collection of
nodes.
Future versions of this specification [MAY](#rfc-keywords) define additional query languages. The following query
language identifiers are reserved: xpath, css,
xpath2, xpath3, xquery,
xquery3, xslt2, xslt3.
Variables in selectors
A param element (or several ones)
can be placed as the first child element(s) of the rules
element to define the default values of variables used in the various
selectors used in the rules.
Implementation [MUST](#rfc2119) support the
param element for all query languages it supports and which
at the same time define how variables are bind for evaluation of
selector expression. Implementations [SHOULD](#rfc2119)
also provide means for changing the default values of the param
elements. Such means are implementation-specific.
The param element has a required name attribute. The value of
the name attribute is a [QName], see . The content
of the element is a string used as default value for the corresponding
variable.
Using the param element to define the default value of a
variable in a selector attribute.
The param element defines the default value for the
$LCID variable. In this case, only the
msg element with the attribute lcid
set to 0x049 is seen as translatable.
In XSLT-based applications, it may make sense to map ITS parameters
directly to XSLT parameters. To avoid naming conflicts one can use a
prefix with the parameter name's value to distinguish between the
ITS parameters and the XSLT parameters.
Link to External Rules
One way to associate a document with a set of external ITS rules is to use
the optional XLink href
attribute in the rules element. The referenced document must be a
valid XML document containing at most one rules element. That
rules element can be the root element or anywhere within the
document tree (for example, the document could be an XML Schema).
The rules contained in the referenced document [MUST](#rfc-keywords) be processed as if they were at the top of the
rules element with the XLink href attribute.
External file EX-link-external-rules-1.xml with global rules:
The example demonstrates how metadata can be added to ITS rules.
Document with a link to EX-link-external-rules-1.xml
The result of processing the two documents above is the same as processing
the following document.
Document with identical rules as in the case of included rules
Applications processing global ITS markup [MUST](#rfc-keywords) recognize the XLink href attribute in the
rules element; they [MUST](#rfc-keywords) load
the corresponding referenced document and process its rules element before
processing the content of the rules element where the original
XLink href attribute is.
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.
Precedence between Selections
The following precedence order is defined for selections of ITS information
in various positions (the first item in the list has the highest
precedence):
- Implicit local selection in documents (
[ITS local attributes](#local-attributes) on a specific
element)
Global selections in documents
(using a rules element)
Inside each rules element the precedence order is:
- Any rule inside the rules element
- Any rule linked via the XLink href
attribute
If identical selections are defined in different rules elements
within one document, the selection defined by the last takes
precedence.
ITS does not define precedence related to rules defined or
linked based on non-ITS mechanisms (such as processing
instructions for linking rules).
- Selections via defaults for data
categories, see
In case of conflicts between global selections via multiple [rules](#selection-global) elements, the last rule has
higher precedence.
The precedence order fulfills the same purpose as the built-in template
rules of . Override semantics are
always complete, that is all information that is specified in one rule
element is overridden by the next one.
Conflicts between selections of ITS information which are resolved
using the precedence order
The two elements title and author of this document
should be treated as separate content when inside a prolog
element, but as part of the content of their parent element otherwise.
In order to make this distinction two withinTextRule elements
are used:
The first rule specifies that title and author in
general should be treated as an element within text. This overrides the
default.
The second rule indicates that when title or author are
found in a prolog element their content should be treated
separately. This is normally the default, but the rule is needed to
override the first rule.
Associating ITS Data Categories with Existing Markup
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 .
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. For example, the format
can use its translate attribute to apply to “transcluded” content, going
beyond the ITS 2.0 local selection mechanism, but not contradicting it.
Association of the ITS data categories [
Translate](#trans-datacat) and [Terminology](#terminology)
with DITA 1.0 markup
In this example, there is an existing translate attribute in
DITA, and it is associated with the ITS semantics using the its:rules
section. Similarly, the DITA dt and term
elements are associated with the ITS [Terminology](#terminology) data category.
Global rules can be associated with a given XML document using different
means:
By using an rules element in the document itself:
- with the rules directly inside the document, as shown in
- with a link to an external rules file using the XLink
href attribute, as shown in
- 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.
Conversion to NIF
This section defines an algorithm to convert XML or HTML documents (or their DOM representations) that contain ITS metadata to the RDF-based format [NIF](http://nlp2rdf.org/nif-1-0). The conversion results in RDF triples that rely on the ITS 2.0 ontology, see tbd.
Add link to ontology once it is done; assure that the examples use the correct base URIs for the ontology.
The algorithm is intended to extract the text from the XML/HTML/DOM for an NLP tool and can produce a lot of phantom
predicates from excessive whitespace, which 1) increases the size of the intermediate mapping and 2) extracts this whitespace as text. This might decrease NLP performance. It is recommended to normalize whitespace in the input XML/HTML/DOM in order to minimize such phantom predicates. A normalized example is given below. The whitespace normalization algorithm itself is format dependend, e.g. it differs for HTML compared to general XML. Hence no normative algorithm for whitespace normalization is given as part of this specification.
Example of an HTML document with whitespace nornalized, as a preparation for conversion to NIF
Welcome to Dublin in Ireland!
]]>
The conversion algorithm to generate NIF consists of seven steps.
STEP 1: Get an ordered list of all text nodes of the document.
STEP 2: Generate an XPath expression for each non-empty text node of all leaf elements and remember them.
STEP 3: Get the text for each node and make a tuple with the XPath expressions (X,T). Since the text nodes have a certain order we now have a list of ordered tuples ((x0,t0), (x1,t1), ..., (xn,tn)).
STEP 4 (optional): Serialize as XML or as RDF. The list with the XPath-to-text mapping can also be kept in memory. Part of a serialization example is given below.
.
itsrdf:xpath2nif
itsrdf:xpath2nif
# ...
itsrdf:xpath2nif
]]>
where
Example (continued)
.
# "Welcome to "
itsrdf:nif .
# "Dublin"
itsrdf:nif .
# " in "
itsrdf:nif .
# "Ireland"
itsrdf:nif .
# "!"
itsrdf:nif .
# "Welcome to Dublin Ireland!"
itsrdf:nif .
]]>
Below needs a reference to the ITS ontology, once available.
STEP 5: Create a context URI and attach the whole concatenated text of the document as reference.
STEP 6: Now attach any ITS metadata items from the XML/HTML/DOM input to respective NIF URIs using the ITS/RDF ontology (TODO Name).
STEP 7: Omit all irrelevant URIs (those that do not carry annotations, they will just bloat the data).
.
rdf:type str:Context ;
# concatenate the whole text
str:isString "$(t0+t1+t2+...+tn)" ;
itsrdf:translate "yes"^^ ;
str:occursIn .
rdf:type str:String ;
itsrdf:translate "no"^^ ;
itsrdf:disambigIdentRef ;
str:referenceContext .
rdf:type str:String ;
itsrdf:translate "no"^^ ;
str:referenceContext .
]]>
A complete sample output in RDF/XML format after step 7, given the input document , is available at [examples/nif/EX-nif-conversion-output.xml](examples/nif/EX-nif-conversion-output.xml).
The conversion to NIF is the basis for natural language processing (NLP) applications, creating for example named entity annotations. A non-normative algorithm to integrate these annotations into the original input document is given in . The algorithm in that appendix is non-normative since many choices depend on the actual NLP application.
Description of Data Categories
This section is normative.
This schema has been developed using the ODD (One Document Does it
all) language of the Text Encoding Initiative (). 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 [trang](http://www.thaiopensource.com/relaxng/trang.html) can be used to create XML Schema documents.
Position, Defaults, Inheritance and Overriding of Data Categories
The following table summarizes for each data category which selection,
default value, and inheritance and overriding behavior applies.
Default values apply if
both local or global selection are absent. The default value for the
[Translate](#trans-datacat) data category for
example mandates that elements are translatable, and attributes are
not translatable if there is no translateRule element and
no translate attribute available.
Inheritance 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 [Translate](#trans-datacat)
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.
For ITS data categories with inheritance,
the information conveyed by the data category can be overridden. For
example, a local translate attribute overrides the [Translate](#trans-datacat) information conveyed by
a global translateRule.
An ITS application is free to
decide what pieces of content it uses. For example:
[Terminology](#terminology) information is added
to a term element. The information pertains only to the
content of the element, since there is no inheritance for [Terminology](#terminology). Nevertheless an ITS
application can make use of the complete element, e.g. including
attribute nodes etc.
- Using
[Id value](#idvalue), a unique identifier
is provided for a p element. An application can make
use of the complete p element, including child nodes
and attributes nodes. The application is also free to make use just
of the string value of p. Nevertheless the id provided
via [ID value](#idvalue) pertains only to the
p element. It cannot be used to identify nested
elements or attributes.
- Using
[target pointer](#target-pointer), selected
source element have the ITS information that their
translation is available in a target element; see . This
information does not inherit to child elements of target
pointer. E.g., the translation of a span
element nested in source is not available in a specific
target element. Nevertheless, an application is
free to use the complete content of source, including
span, and e.g. present it to a translator.
The links to examples (last column) are currently pointing to the old location of the test suite; these need to be updated to the github location. Also, the table needs to be completed and checked against the data category specific sections.
| Data category |
Local Usage |
Global, rule-based selection |
Global adding of information |
Global pointing to existing information |
Default Values |
Inheritance for elements nodes |
XML examples |
HTML5 examples |
[Translate](#trans-datacat)
|
Yes |
Yes |
Yes |
No |
translate="yes" for elements, and
translate="no" for attributes |
Textual content of element, including content of
child elements, but excluding attributes |
[local](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#translate-local-host), [global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#translate-global-linked) |
[local](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#translate-in-host-element), [global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#translate-global-linked2) |
[Localization Note](#locNote-datacat)
|
Yes |
Yes |
Yes |
Yes |
None |
Textual content of element, including content of
child elements, but excluding attributes |
[local](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#locnote-local-note), [global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#locnote-global-note) |
[local](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#locnote-local-note2), [global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#locnote-global-note2) |
[Terminology](#terminology)
|
Yes |
Yes |
Yes |
Yes |
term="no" |
None |
[local](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#term-local-host), [global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#term-global-inforef) |
[local](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#term-local-host2), [global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#term-global-inforef2) |
[Directionality](#directionality)
|
Yes |
Yes |
Yes |
No |
dir="ltr" |
Textual content of element, including attributes and
child elements |
[local](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#dir-local-host2), [global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#dir-global-embedded) |
tbd |
[Ruby](#ruby-annotation)
|
Yes |
Yes |
Yes |
Yes |
None |
None |
[local](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#ruby-local), [global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#ruby-global-embedded) |
tbd |
[Language Information](#language-information)
|
No |
Yes |
No |
Yes |
None |
Textual content of element, including attributes and
child elements |
[global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#lang-global-embedded) |
[global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#lang-global-linked) |
[Elements Within Text](#elements-within-text)
|
Yes |
Yes |
Yes |
No |
withinText="no" |
None |
[local](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#withintext-local-in-host-element), [global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#withintext-global-embedded) |
[local](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#withintext-local-in-host-element2), [global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#withintext-global-linked2) |
[Domain](#domain)
|
No |
Yes |
Yes |
Yes |
None |
Textual content of element, including attributes and
child elements |
[global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#domain-global-embedded-domainPointer) |
[global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#domain-global-domainPointer2) |
[Disambiguation](#Disambiguation)
|
Yes |
Yes |
Yes |
Yes |
None |
None |
[local](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#disamb-local-in-host-element) |
[local](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#disamb-local-in-host), [global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#disamb-global-linked2) |
[Locale Filter](#LocaleFilter)
|
Yes |
Yes |
Yes |
No |
localeFilterList="*" |
Textual content of element, including attributes and
child elements |
[local](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#localefilter-local-in-host-element), [global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#localefilter-global-embedded) |
[local](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#localefilter-local-in-host-element2), [global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#localefilter-global-linked2) |
[Translation Agent Provenance](#translation-agent-provenance)
|
Yes |
Yes |
Yes |
Yes |
None |
Textual content of element, including child elements,
but excluding attributes |
tbd |
tbd |
[External Resource](#externalresource)
|
No |
Yes |
No |
Yes |
None |
None |
[global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#exresource-global-embedded-linked) |
[global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#exresource-global-linked2) |
[Target Pointer](#target-pointer)
|
No |
Yes |
No |
Yes |
None |
None |
[global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#targetpointer-global-embedded) |
[global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#targetpointer-global-linked2) |
[Id Value](#idvalue)
|
No |
Yes |
No |
Yes |
None |
None |
[global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#idvalue-global-embedded) |
[global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#idvalue-global-linked2) |
[Preserve Space](#preservespace)
|
Yes |
Yes |
Yes |
No |
default |
Textual content of element, including attributes and
child elements |
[local](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#preservespace-local-in-host-element), [global](http://phaedrus.scss.tcd.ie/its2.0/its-testsuite.html#preservespace-global-embedded) |
[n/a](#preserve-space-and-html5) |
[Localization Quality Issue](#lqissue)
|
Yes |
Yes |
Yes |
Yes |
None |
Textual content of element, including child elements,
but excluding attributes |
tbd |
tbd |
[Localization Quality Précis](#lqprecis)
|
Yes |
Yes |
Yes |
Yes |
None |
Textual content of element, including child elements,
but excluding attributes |
tbd |
tbd |
[MT Confidence](#mtconfidence)
|
Yes |
Yes |
Yes |
No |
None |
Textual content of element, including child elements,
but excluding attributes |
tbd |
tbd |
[Allowed Characters](#allowedchars)
|
Yes |
Yes |
Yes |
Yes |
None |
Textual content of element, including child elements,
but excluding attributes |
tbd |
tbd |
[Storage Size](#storagesize)
|
Yes |
Yes |
Yes |
Yes |
storageEncoding="UTF-8" |
None |
tbd |
tbd |
Defaults, inheritance and overriding behavior of data
categories
In this example, the content of all the data elements is
translatable because the default for the [Translate](#trans-datacat) data category in elements is yes. The
content of revision and locNote is not translatable
because the default is overridden by the local
its:translate="no" attribute in the prolog
element, and that value is inherited by all the children of
prolog.
The localization note for the two first data elements is the
text defined globally with the locNoteRule element. And this
note is overridden for the last data element by the local
its:locNote attribute.
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 [Translate](#trans-datacat) data category is the textual
content.
Translate
Definition
The [Translate](#trans-datacat) 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
yes (translatable) or no (not
translatable).
Implementation
The [Translate](#trans-datacat) data category can be
expressed with global rules, or locally on an individual element. For
elements, the data category information [inherits](#def-inheritance) to the textual content of the element,
including child elements, but excluding
attributes. The default is that elements are translatable and attributes
are not.
GLOBAL: The translateRule element
contains the following:
All selector related definitions has to be
update to reflect queryLanguage
- A required selector attribute. It contains an
[absolute selector](#selectors) which selects the
nodes to which this rule applies.
- A required translate attribute with the
value yes or no.
The [Translate](#trans-datacat) data category
expressed globally
The translateRule element specifies that the elements
code must not be translated.
LOCAL: The following local markup is available
for the [Translate](#trans-datacat) data category:
- A translate attribute with the value
yes or no.
It is not possible to override the [Translate](#trans-datacat) data category settings of attributes using
local markup. This limitation is consistent with the advised
practice of not using translatable attributes. If attributes need to
be translatable (e.g., an HTML alt attribute), then
this must be declared globally.
The [Translate](#trans-datacat) data category
expressed locally
The local its:translate="no" specifies that the content
of panelmsg must not be translated.
The [Translate](#trans-datacat) data category
expressed locally in HTML5
The local translate="no" attribute specifies that the
content of span must not be translated.
Localization Note
Definition
The [Localization Note](#locNote-datacat) data category
is used to communicate notes to localizers about a particular item of
content.
This data category can be used for several purposes, including, but not
limited to:
- Tell the translator how to translate parts of the content
- 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 in
the user interface
- Clarify ambiguity and show relationships between items
sufficiently to allow correct translation (e.g., in many languages
it is impossible to translate the word
enabled
in
isolation without knowing the gender, number and case of the thing
it refers to.)
- Indicate why a piece of text is emphasized (important, sarcastic,
etc.)
Two types of informative notes are needed:
- 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.
- 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.
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.
Implementation
The [Localization Note](#locNote-datacat) data category
can be expressed with global rules, or locally on an individual element.
For elements, the data category information [inherits](#def-inheritance) to the textual content of
the element, including child elements, but
excluding attributes.
GLOBAL: The locNoteRule element
contains the following:
- A required selector attribute. It contains an
[absolute selector](#selectors) which selects the
nodes to which this rule applies.
- A required locNoteType attribute with
the value description or alert.
Exactly one of the following:
- A locNote element that contains the note itself
and allows for
[local ITS
markup](#selection-local).
- A locNotePointer attribute that contains a
[relative selector](#selectors) pointing to
a node that holds the localization note.
- A locNoteRef attribute that contains a URI
referring to the location of the localization note.
- A locNoteRefPointer attribute that contains a
[relative selector](#selectors)
pointing to a node that holds the URI referring to the
location of the localization note.
The locNote element
The locNoteRule element associates the content of the
locNote 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.
The locNotePointer attribute
The locNotePointer attribute is a [relative selector](#selectors) pointing to a node that holds the
note.
The locNoteRef attribute
The locNoteRule 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 locNoteRef attribute.
The locNoteRefPointer attribute
The locNoteRefPointer attribute contains a [relative selector](#selectors) pointing to a node
that holds the URI referring to the location of the note.
LOCAL: The following local markup is
available for the [Localization Note](#locNote-datacat)
data category:
One of the following:
- A locNote attribute that contains
the note itself.
- A locNoteRef attribute that
contains a URI referring to the location of the localization
note.
- An optional locNoteType attribute with the
value description or alert. If the locNoteType attribute is not present, the
type of localization note will be assumed to be
description.
The [Localization Note](#locNote-datacat) data
category expressed locally
The [Localization Note](#locNote-datacat) data
category expressed locally in HTML5
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.
Terminology
Definition
The [Terminology](#terminology) 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.
Existing terminology standards such as and its derived formats are about coding
terminology data, while the ITS [Terminology](#terminology) data category simply allows to identify terms
in XML documents and optionally to point to corresponding
information.
Implementation
The [Terminology](#terminology) 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.
GLOBAL: The termRule element
contains the following:
- A required selector attribute. It contains an
[absolute selector](#selectors) which selects the
nodes to which this rule applies.
- A required term attribute with the value
yes or no.
None or exactly one of the following:
- A termInfoPointer attribute that contains a
[relative selector](#selectors)
pointing to a node that holds the terminology
information.
- A termInfoRef attribute that contains a URI
referring to the resource providing information about the
term.
- A termInfoRefPointer attribute that contains a
[relative selector](#selectors)
pointing to a node that holds the URI referring to the
location of the terminology information.
Usage of the termInfoPointer attribute
Usage of the termInfoRef attribute
Usage of the termInfoRefPointer attribute
LOCAL: The following local markup is available
for the [Terminology](#terminology) data category:
- A term attribute with the value
yes or no.
- An optional termInfoRef attribute that
contains a URI referring to the resource providing information about
the term.
The [Terminology](#terminology) data category
expressed locally
The [Terminology](#terminology) data category
expressed locally in HTML5
Directionality
Definition
The [Directionality](#directionality) 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: ltr, rtl, lro and
rlo.
ITS defines only the values of the [Directionality](#directionality) 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:
Data category value: ltr (left-to-right
text)
CSS rule: *[dir="ltr"] { unicode-bidi:
embed; direction: ltr}
Data category value: rtl (right-to-left
text)
CSS rule: *[dir="rtl"] { unicode-bidi:
embed; direction: rtl}
Data category value: rlo (left-to-right
override)
CSS rule: *[dir="lro"] { unicode-bidi:
bidi-override; direction: ltr}
Data category value: rlo (right-to-left
text)
CSS rule: *[dir="rlo"] { unicode-bidi:
bidi-override; direction: rtl}
More information about how to use this data category is provided by
.
Implementation
Examples for HTML5 need to be added; some values need to
added to dir to reflect HTML5.
The [Directionality](#directionality) data category can
be expressed with global rules, or locally on an individual element. For
elements, the data category information [inherits](#def-inheritance) to the textual content of the element,
including child elements and attributes. The default is
that both elements and attributes have the directionality of
left-to-right.
GLOBAL: The dirRule element
contains the following:
- A required selector attribute. It contains an
[absolute selector](#selectors) which selects the
nodes to which this rule applies.
- A required dir attribute with the value
ltr, rtl, lro or
rlo.
Document which needs global rules for directionality
In this document the right-to-left directionality is marked using a
direction attribute with a value
rtlText.
The [Directionality](#directionality) data
category expressed with global rules
The dirRule element indicates that all elements with an
attribute direction="rtlText" have right-to-left
content.
LOCAL: The following local markup is
available for the [Directionality](#directionality)
data category:
- A dir attribute with the value
ltr, rtl, lro or
rlo.
The [Directionality](#directionality) data
category expressed locally
On the first quote element, the its:dir="rtl"
attribute indicates a right-to-left content.
The [Directionality](#directionality) data
category expressed locally in HTML5
Ruby
Definition
The [Ruby](#ruby-annotation) 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.
Implementation
Examples for HTML5 need to be added;
The [Ruby](#ruby-annotation) data category can be
expressed with global rules, or locally. There is no inheritance.
GLOBAL: The rubyRule element contains the
following:
- A required selector attribute. It contains an
[absolute selector](#selectors) which selects the
nodes to which this rule applies. This is the ruby base text.
- An optional rubyPointer attribute that contains a
[relative selector](#selectors) pointing to a node
that corresponds to the ruby element.
- An optional rpPointer attribute that contains a
[relative selector](#selectors) pointing to a node
that corresponds to the ruby parenthesis.
- An optional rubyText element that contains the ruby
text.
- An optional rtPointer attribute that contains a
[relative selector](#selectors) pointing to a node
that corresponds to the ruby text.
Where legacy formats do not contain ruby markup, it is still
possible to associate ruby text with a specified range of document
content using the rubyRule element.
Adding ruby text with a rubyRule element
LOCAL: In a document, the [Ruby](#ruby-annotation) data category is realized with
a ruby element. It contains the following:
- The ruby base text or span element that contains the ruby
base text and allows for
[local ITS
markup](#selection-local).
- An rp element that contains the ruby parenthesis. It is
used in case of simple markup to specify characters that can denote
the beginning and end of ruby text when user agents do not have
other ways to present ruby text distinctively from the base
text.
- An rt element that contains the ruby text and allows for
[local ITS markup](#selection-local).
All these elements share the attributes of the span element.
The [Ruby](#ruby-annotation) data category
expressed locally
The structure of the content model for the ruby element is
identical with the structure of ruby markup as defined in .
The structure of ruby defined in section 5.4 of is also compliant with ruby defined in
this specification.
Need to reevaluate above statement related to ODF.
Language Information
Definition
The element langRule is used to express the language of a given
piece of content. The langPointer attribute points to the
markup which expresses the language of the text selected by the selector
attribute. This markup [MUST](#rfc-keywords) use values
that conform to . The recommended
way to specify language identification is to use xml:lang.
The langRule element is intended only as a fall-back mechanism
for documents where language is identified with another construct.
Pointing to language information via langRule
The following langRule element expresses that the content of
all p elements (including attribute values and textual
content of child elements) are in the language indicated by
mylangattribute, which is attached to the p
elements, and expresses language using values conformant to .
The [Language Information](#language-information)
data category only provides for rules to be expressed at a global
level. Locally users are able to use xml:lang (which is
defined by XML) or an attribute specific to the format in question
(as in ).
xml:lang is the preferable means of language
identification. To ease the usage of xml:lang, a
declaration for this attribute is part of the non-normative XML DTD
and XML Schema document for ITS markup declarations. There is no
declaration of xml:lang in the non-normative RELAX NG
document for ITS, since in RELAX NG it is not necessary to declare
attributes from the XML namespace.
Applying the [Language
Information](#language-information) data category to xml:lang
attributes using global rules is not necessary, since
xml:lang is the standard way to specify language
information in XML. xml:lang is defined in terms of [RFC 3066 or its successor](http://www.w3.org/TR/2006/REC-xml-20060816/#sec-lang-tag) ( is the "Best Common Practice" for language
identification and encompasses and its successors.)
Add something about HTML5 lang
Implementation
The [Language Information](#language-information) data
category can be expressed only with global rules. For elements, the data
category information [inherits](#def-inheritance) to
the textual content of the element, including child
elements and attributes. There is no default.
GLOBAL: The langRule element
contains the following:
- A required selector attribute. It contains an
[absolute selector](#selectors) which selects the
nodes to which this rule applies.
- A required langPointer attribute that contains a
[relative selector](#selectors) pointing to a node
that contains language information.
Elements Within Text
Definition
The [Elements Within Text](#elements-within-text) data
category reveals if and how an element affects the way text content
behaves from a linguistic viewpoint. This information is for example
relevant to provide basic text segmentation hints for tools such as
translation memory systems. The values associated with this data
category are:
yes : The element and its content are part of the
flow of its parent element. For example the element
strong in :
<strong>Appaloosa horses</strong> have spotted
coats.
nested : The element is part of the flow of its
parent element, its content is an independent flow. For example
the element fn in :
Palouse horses<fn>A Palouse horse is the same as an
Appaloosa.</fn> have spotted coats.
no : The element splits the text flow of its parent
element and its content is an independent text flow. For example
the element p when inside the element li in
DITA or XHTML:
<li>Palouse horses: <p>They have spotted
coats.</p> <p>They have been bred by the Nez
Perce.</p> </li>
Implementation
The [Elements Within Text](#elements-within-text) data
category can be expressed with global rules, or locally on an individual
element. There is no inheritance. The default is that elements are not
within text.
GLOBAL: The withinTextRule element
contains the following:
- A required selector attribute. It contains an
[absolute selector](#selectors) which selects the
nodes to which this rule applies.
- A required withinText attribute with the value
yes, no or nested.
Specifying elements within text with a withinTextRule
element
LOCAL: The following local markup is available
for the [Elements Within Text](#elements-within-text)
data category:
- A withinText attribute with the values
yes, no or nested.
The [Elements Within Text](#trans-datacat) data
category expressed locally
The [Elements Within Text](#trans-datacat) data
category expressed locally in HTML5
Domain
Definition
The [Domain](#domain) data category is used to identify the topic or subject of a given content.
Such information allows to make more relevant lingusitic choices during various processes.
Examples of usage include:
- Allowing machine translation systems to select the most appropriate engine and rules to translate the content.
- Providing a general indication of what terminology collection should be used by a translator.
This data category addresses various challenges:
- Often domain-related information already exist in the document (e.g.
keywords in the HTML
meta element). The [Domain](#domain) data category provides a mechanism to point to this information.
- There are many flat or structured lists of domain related values,
keywords, key phrases, classification codes, ontologies, etc. The
[Domain](#domain) data category does not propose its own
given list. Instead it provides a mapping mechanism to associate
the values in the document with the values used by the consumer tool.
Implementation
The [Domain](#domain) data category can be expressed
only with global rules. For elements, the data category information [inherits](#def-inheritance) to the textual content of
the element, including child elements and attributes. There
is no default.
The information provided by this data category is a comma-separated list of one or more values which is obtained by applying the following algorithm:
- Set the initial value of the resulting string as a empty string.
- Get the list of nodes resulting of the evaluation of the domainPointer attribute.
- For each node:
- If the node value contains a COMMA (U+002C):
- Split the node value into separate strings using the COMMA (U+002C) as separator.
- For each string:
- Trim the leading and trailing white spaces of the string.
- Check if there is a mapping for the string:
- If one is found:
- Add the corresponding value to the result string.
- Otherwise (if no mapping is found):
- Add the string to the result string.
- If the node value does not contain a COMMA (U+002C):
- Trim the leading and trailing white spaces of the string.
- Check if there is a mapping for the string:
- If one if found:
- Add the corresponding value to the result string.
- Otherwise (if no mapping is found):
- Add the string to the result string.
- Return the resulting string.
GLOBAL: The domainRule element contains
the following:
- A required selector attribute. It contains an
[absolute selector](#selectors) which selects the
nodes to which this rule applies.
- A required domainPointer attribute that contains a
[relative selector](#selectors) pointing to a node
that contains the domain information.
- An optional domainMapping attribute that contains a
comma separated list of mappings between values in the content and
consumer tool specific values. The left part of the pair is part of
the source content and unique within the mapping. The right part of
the mapping belongs to the consumer tool. Several left parts can map
to a single right part. The values in the left or the right part of
the mapping may contain spaces; in that case they
[MUST](#rfc-keywords) be delimited by quotation
marks, that is pairs of APOSTROPHE (Unicode code point U+0027) or
QUOTATION MARK (U+0023).
Although the domainMapping attribute it is optional, its
usage is recommended. Many commercial machine translation systems
use their own domain definitions; the domainMapping
attribute will foster interoperability between these definitions and
metadata items like DC.subject in Web pages or other
types of content.
Values used in the domainMapping attribute are arbitrary
strings. In some consumer systems or existing content, the domain
may be identified via an URI like
http://example.com/domains/automotive. The
domainMapping allows for using URIs too. For the
mapping, they are regarded as ordinary string values.
The domainRule element
The domainRule element expresses that the content of the
HTML body element is in the domain expressed by the
HTML meta element with the name attribute,
value keywords. The domainPointer
attribute points to that meta element.
The domainRule element
The domainRule element expresses that the content of the
HTML body element is in the domain expressed by
associated values. The domainPointer attribute points to
the values in the source content. The domainMapping
attribute contains the comma separated list of mappings. In the
example, automotive is available in the source content,
and auto is used within the consumer tool, e.g. a
machine translation system.
In source content, if available, it is recommended to use dublin core
subject as the metadata term for domain information. In HTML, this
can be achieved via a meta element with the
name="keywords" attribute or name="dcterms.subject" attribute.
In the area of machine translation (e.g. machine translation systems
or systems harvesting content for machine translation training),
there is no agreed upon set of value sets for domain. Nevertheless
it is recommended to use a small set of values both in source
content and within consumer tools, to foster interoperability. If
larger value sets are needed (e.g. detailed terms in the law or
medical domain), mappings to the smaller value set needed for
interoperability should be provided. An example would be a
domainMapping attribute for generalizing the law
domain: domainMapping="'criminal law' law, 'property law' law,
'contract law' law".
It is possible to have more than one domain associated with a piece
of content. For example, if the consumer tool is a statistical
machine translation engine, it could include corpora from all
domains available in the source content in training the machine
translation engine.
The consumer machine translation engine might choose to ignore the
domain and take a one size fits all approach, or may be selective in
which domains to use, based on the range of content marked with
domain. For example, if the content has hundreds of sentences marked
with domain 'automotive' and 'medical', but only a couple of
sentences marked with additional domains 'criminal law' and
'property law', the consumer tool may opt to include its domains
'auto' and 'medicine', but not 'law', since the extra training
resources does not justify the improvement in the output.
Disambiguation
This data category is not completely stable yet.
Definition
The [Disambiguation](#Disambiguation) data category is used to
indicate occurrences of specific concepts that may require special
handling in the localization of the document.
This data category can be used for several purposes, including, but not
limited to:
- Informing translation systems that this fragment of text may not be literally translated, but subject to specific proper name translation rules or official translations, as well as a very specific meaning of the phrases.
- Informing content management and translation systems about the type of the underlying entity in order to enable processing based on a specific type of the target, for example, when handling personal names, product names or geographic names, chemical compounds, protein names and similar.
Disambiguation is achieved by associating a selected fragment of text with an external web resource that can be referenced
by a translation or linguistic review agent in order to access the correct meaning or lexical use of the text and thereby
informing its translation.
A fragment of text can be disambiguated at different granularities, i.e. as a lexical concept, as an ontology concept,
or as a named entity.
As a lexical concept, the external reference can provide synonyms and example usage, e.g. using
service such as Wordnet.
As an ontology concept, the external reference can provide a formal conceptual definition within
a framework of related concepts.
As a named entity, the external reference can provide a description of the real world entity the text intends
to convey. For instance, the word 'City' in 'I am going to the City' may be disambiguated in one of the WordNet
synsets that can be represented by 'city', an ontology concept of a City that could represent a subclass of a
“PopulatedPlace” in the conceptual granularity level, or the central area of a particular city, e.g. City of London,
as interpreted in the entity granularity level. Linked data network, such as DBpedia, increasing interlink ontological
and named entity definitions for the same things as authored in different languages, offering a mechanism to
locate translations from the source language description.
Two types of disambiguation are needed to identify:
The previous sentence needs to be re-worded
- Disambiguation type class, which describes the type class of the underlying concept or entity of the fragment.
- Disambiguation, which describes the actual underlying external resource that conveys the intended meaning of the fragment.
Text analysis engines, such as named entity recognizers, named entity, concept and word sense disambiguation
components can offer an easy way to create this information. Content management tools can present and visualize
this information or use it to index their content. Machine translations systems may use it for training and translation
when dealing with proper names and edge cases.
Implementation
The [Disambiguation](#Disambiguation) data category can
be expressed with global rules, or locally on an individual element. The
information applies to the textual content of the element. There is no
inheritance. The entity type follows inheritance rules.
The two last sentences above seem contradictory.
GLOBAL: The disambiguationRule
element contains the following:
- A required selector attribute that contains an
[absolute selector](#selectors) which selects the
nodes to which this rule applies.
Either:
A disambigSource attribute that contains a string representing the disambiguation
identifier collection source.
Exactly one of the following:
A disambigIdent attribute that contains a string that represents the disambiguation
identifier for the disambiguation target that is valid within the specified disambiguation source.
A disambigIdentPointer attribute that contains a [relative selector](#selectors)
pointing to a node that represents a unique identifier for the disambiguation target.
Or:
Exactly one of the following:
A disambigIdentRef attribute that contains an URI that represents a unique identifier
for the disambiguation target.
A disambigIdentRefPointer attribute that contains a [relative selector](#selectors)
pointing to a node that holds a URI that represents a unique identifier for the disambiguation target.
None or exactly one of the following:
A disambigClassPointer attribute that contains a [relative selector](#selectors)
pointing to a node specifying the entity type class behind the selector.
A disambigClassRef attribute that contains a URI, specifying the type class of the concept
or entity behind the selector.
A disambigClassRefPointer attribute that contains a [relative selector](#selectors)
pointing to a node that holds a URI that specifies the entity type class behind the selector.
An optional disambigGranularity attribute that contains a string, specifying the granularity
level of the disambiguation. The value can be one of the following identifiers:
lexicalConcept, ontologyConcept, or entity.
Below will need a test case in the test suite.
Sentence below is awkward
When using a disambiguation rule, the user [MUST](#rfc2119) use one of the use
cases for disambiguation: specifying the target type, or specifying the target identity.
For the latter, the user [MUST](#rfc2119) use only one of the two addressing modes:
- Using disambigSource and one of disambigIdent or disambigIdentPointer to specify the
collection and the identifier itself.
- Using one of disambigIdentRef or disambigIdentRefPointer using
a URI for the disambiguation target.
Usage of disambigClassRef, disambigGranularity, disambigIdentRef,
disambigSource and disambigIdent for both entity and word sense disambiguation.
LOCAL: The following local markup is
available for the [Disambiguation](#Disambiguation)
data category:
- An optional disambigClassRef attribute that contains a URI, specifying the type class
of the concept or entity behind the selector.
- An optional disambigGranularity attribute that contains a string, specifying the
granularity level of the disambiguation. The value can be one of the following identifiers:
lexicalConcept, ontologyConcept, or entity
Either:
- A disambigSource attribute that contains a string representing the
disambiguation identifier collection source.
- A disambigIdent attribute that contains a string, representing the
disambiguation identifier for the disambiguation target that is valid within the specified
disambiguation source.
Or:
- A disambigIdentRef attribute that contains a URI that represents a unique
identifier for the disambiguation target.
The user [MUST](#rfc2119) use only one of the two addressing modes for "target identity" disambiguation:
- Using disambigSource and disambigIdent to specify the collection
and the identifier itself.
- Using disambigIdentRef using a URI for the disambiguation target
Local mixed usage of Usage of disambigClassRef, disambigGranularity,
and disambigIdentRef in HTML.
For referring to disambigClassRef values, implementors are encouraged to use an existing
repository of entity types as long as they satisfy their requirements. For example,
the Named Entity Recognition and Disambiguation ontology (NERD): http://nerd.eurecom.fr/ontology
Furthermore, valid target types depend on the disambiguation granularity: types of entities are distinct
from types of lexical concepts or ontology concepts. While this distinction exists, the specification does not prescribe
a way of automatically inferring a disambiguation level from a target type.
When serializing the ITS mark-up in HTML5, the preferred way is to serialize in RDFa Lite or Microdata due
to the existing search and crawling infrastructure that is able to consume this kind of data.
Local mixed usage of entityTypeSourceRef, enttiyTypeRef, disambigSourceRef,
disambigIdentRef in HTML+RDFa Lite.
See for the companion document with the mapping
data.
Companion document, having the mapping data for .
Locale Filter
Definition
The [Locale Filter](#LocaleFilter) data category
specifies that a node is only applicable to certain locales.
This data category can be used for several purposes, including, but not
limited to:
- Include a legal notice only in locales for certain regions.
- Drop editorial notes from all localized output.
The [Locale Filter](#LocaleFilter) data category
associates with each selected node a list of extended language ranges
conforming to . The list is
comma-separated and can include the wildcard extended language range
*. The list can also be empty. Whitespace surrounding
language ranges is ignored.
To express that all locales should be included, one can use the
wildcard * for the language range. To express that the
content should not be included in any local, one can use the empty
value.
Implementation
The [Locale Filter](#LocaleFilter) data category can be
expressed with global rules, or locally on an individual element. For
elements, the data category information [inherits](#def-inheritance) to the textual content of the element,
including child elements and attributes. The default is
that the language range is *.
Implementations [MUST NOT](#rfc2119) combine lists of
language ranges from multiple rules or local attributes.
GLOBAL: The localeFilterRule
element contains the following:
- A required selector attribute. It contains an
[absolute selector](#selectors) which selects the
nodes to which this rule applies.
- A required localeFilterList attribute with a
comma-separated list of extended language ranges, or an empty string
value.
The [Locale Filter](#LocaleFilter) data category
expressed globally
The localeFilterRule element specifies that certain legal
notice elements should only be shown in the specified locales. Note
that using the extended language range *-CA in the
localeFilterList attribute would cover all Canadian
locales, including various minority languages in Canada.
The [Locale Filter](#LocaleFilter) data category
expressed globally
The localeFilterRule element specifies that editorial
remarks should be removed from all translations.
LOCAL: The following local markup is
available for the [Locale Filter](#LocaleFilter) data
category:
- A localeFilterList attribute with a comma-separated
list of extended language ranges, or an empty string value.
The [Locale Filter](#LocaleFilter) data category
expressed locally
Translation Agent Provenance
Definition
Early draft of this data category; additional data categories for provenance might be added, or below definition might be changed. The definition of this data category is not yet reflected in the data category overview table in .
The [Translation Provenance Agent](#translation-agent-provenance) data category is used to communicate the identity of agents that have been involved in the translation of the content or the revision of the translated contend.
This allows translation and translation revision consumers, such as post-editors or translation quality reviewers, to assess how the performance of these agents may impact the quality of the translation.
Translation and translation revision agents can be identified as a person, a piece of software or an organization that has been involved in providing a translation that resulted in the selected content.
This data category offers three types of information. First, it allows to identity translation agents. Second, it allows to identify revision agents. Third, if provenance information is needed that includes temporal information about processes or requires agents that support a wider range of activities, the data category offers a mechanism to refer to external, RDF-based provenance descriptions based on the provenance data model .
Translation or translation revision tools, such as machine translation agents or CAT tools, may offer an easy way to create this information. Translation tools can then present this information to post-editors or translation process managers. Web applications may to present such information to consumers of translated documents.
Implementation
No agreement yet on whether such usage of global rules, that is for identifiyng just one or a small set of elements, is something to recommend. See also [issue-51](https://www.w3.org/International/multilingualweb/lt/track/issues/51).
The [Translation Agent Provenance](#translation-agent-provenance) data category
can be expressed with global rules, or locally on individual elements.
For elements, the data category information [inherits](#def-inheritance) to the textual content of
the element, including child elements, but excluding
attributes.
GLOBAL: The transProvRule element
contains the following:
A required selector attribute. It contains an [absolute selector](#selectors) which selects
the nodes to which this rule applies.
At least one of the following:
Exactly one of the following:
A translationProvenanceRecordsRef attribute. Its
value is a URI pointing to the
translationProvenanceRecord element containing the
list of translation provenance records related to the content selected via the selector attribute.
A translationProvenanceRecordsRefPointer
attribute that contains a [relative selector](#selectors) pointing to a node with
the exact same semantics as
translationProvenanceRecordsRef.
Human translation provenance information specified by exactly one of the following:
A transPerson attribute that contains a string identifying a human translation agent.
A transPersonRef attribute that contains an IRI referring to a resource that identifies a human translation agent.
A transPersonPointer attribute that contains a [relative selector](#selectors) pointing to a node with the exact same semantics as transPerson.
A transPersonRefPointer attribute that contains a [relative selector](#selectors) pointing to a node with the exact same semantics as transPersonRef.
Organizational translation provenance information specified by exactly of the following:
A transOrg attribute that contains a string identifying an organization acting as a translation agent.
A transOrgRef attribute that contains an IRI referring to a resource that identifies an organization acting as a translation agent.
A transOrgPointer attribute that contains a [relative selector](#selectors) pointing to a node with the exact same semantics as transOrg.
A transOrgRefPointer attribute that contains a [relative selector](#selectors) pointing to a node with the exact same semantics as transOrgRef.
Translation tool provenance related information specified by exactly one of the following:
A transTool attribute that contains a string identifying a software tool that was used in translating the selected content.
A transToolRef attribute that contains an IRI referring to a resource that identifies a software tool that was used in the translation.
A transToolPointer attribute that contains a [relative selector](#selectors) pointing to a node with the exact same semantics as transTool.
A transToolRefPointer attribute that contains a [relative selector](#selectors) pointing to a node with the exact same semantics as transToolRef.
Human translation revision provenance related information specified by exactly one of the following:
A transRevPerson attribute that contains a string identifying a human translation revision agent.
A transRevPersonRef attribute that contains an IRI referring to a resource that identifies a human translation revision agent.
A transRevPersonPointer attribute that contains a [relative selector](#selectors) pointing to a node with the exact same semantics as transRevPerson.
A transRevPersonRefPointer attribute that contains a [relative selector](#selectors) pointing to a node with the exact same semantics as transRevPersonRef.
Organizational revision translation related provenance information specified by exactly of the following:
A transRevOrg attribute that contains a string identifying an organization acting as a translation revision agent.
A transRevOrgRef attribute that contains an IRI referring to a resource that identifies an organization acting as a translation revison agent.
A transRevOrgPointer attribute that contains a [relative selector](#selectors) pointing to a node with the exact same semantics as transRevOrg.
A transRevOrgRefPointer attribute that contains a [relative selector](#selectors) pointing to a node with the exact same semantics as transRevOrgRef.
Translation tool revision provenance related information specified by exactly one of the following:
A transRevTool attribute that contains a string identifying a software tool that was used in revising the translation of the selected content.
A transRevToolRef attribute that contains an IRI referring to a resource that identifies a software tool that was used in revising the translation of the selected content.
A transRevToolPointer attribute that contains a [relative selector](#selectors) pointing to a node with the exact same semantics as transRevTool.
A transRevToolRefPointer attribute that contains a [relative selector](#selectors) pointing to a node with the exact same semantics as transRevToolRef.
A reference to external, RDF-based provenance description specified by exactly one of the following:
A provRef attribute that that contains one or more space (U+0020) separated Provenance URI, each referring to a resource that identifies a different provenance entity record defined by the [provenance data model](http://www.w3.org/TR/prov-dm/).
A provRefPointer attribute that contains a [relative selector](#selectors) pointing to a node with the exact same semantics as provRef.
Below note is taken from the quality issue data category. Same question applies: Why should below only say "do not apply to HMTL as local markup"? There is local markup for direct annotation in XML too.
The attributes translationProvenanceRecordsRefPointer, transPersonPointer, transPersonRefPointer, transOrgPointer, transOrgRefPointer, transToolPointer, transToolRefPointer, transRevPersonPointer, transRevPersonRefPointer, transRevOrgPointer, transRevOrgRefPointer, transRevToolPointer, transRevToolRefPointer and provRefPointer do not apply to HTML as local markup is provided for direct annotation in HTML.
The [Translation Agent Provenance](#translation-agent-provenance) data category used globally.
This example shows how the provenance of the par and the legalnotice elements in this XML document is different. Therefore it is recorded in separate transProvRule elements.
The [Translation Agent Provenance](#translation-agent-provenance) data category used globally with pointer attributes.
This example expresses the same provenance information as , but the provenance information for the par element is stored differently, inside a format specific element my-provenance-info. The first transProvRule element and its attributes transToolRefPointer, transOrgPointer, transRevToolRefPointer, transRevOrgPointer and provRefPointer are used to point to the information inside that my-provenance-info element.
Not sure if we need the standoff version globally. We don't have it with quality either. Thoughts?
The [Translation Agent Provenance](#translation-agent-provenance) data category used globally with standoff provenance records.
This example expresses the same plus some additional provenance information as , but the provenance information is realized standoff within translationProvenanceRecords elements. The transProvRule elements with the translationProvenanceRecordsRef attributes point to translationProvenanceRecords related to the par and legalnotice elements. The legalnotice element has been revised two times. Hence, the related translationProvenanceRecords element contains two translationProvenanceRecord child elements. The second translationProvenanceRecord child element provides information about the second revison.
Annotating provenance information in HTML5 with transProvRule
element
The transProvRule element resides in a separate file
() that associates the provenance information with a selected span of
content in the HTML document.
External rule document associated with an HTML5 document
This document is used in :
LOCAL: Using the inline markup to represent the
data category locally is limited to a single occurrence for a given
content (e.g. one cannot have different transToolRef
attributes applied to the same span of text because the inner-most one
would override the others). A local standoff markup is
provided to allow such cases.
The following local markup is available for the [Translation Agent Provenance](#translation-agent-provenance) data category:
Either (inline markup): at least one of the following, with the same semantics as the corresponding attributes at the transProvRule element:
Human translation provenance information specified by exactly a transPerson or a transPersonRef attribute.
Organizational translation provenance information specified by exactly a transOrg or a transOrgRef attribute.
Translation tool provenance related information specified by exactly a transTool or a transToolRef attribute.
Human translation revision provenance related information specified by exactly a transRevPerson or a transRevPersonRef attribute.
Organizational revision translation related provenance information specified by exactly a transRevOrg or a transRevOrgRef attribute.
Translation tool revision provenance related information specified by exactly a transRevTool or a transRevToolRef attribute.
A reference to external, RDF-based provenance description specified by a provRef attribute.
Or (standoff markup):
A translationProvenanceRecordsRef attribute. Its value
is a URI pointing to the translationProvenanceRecords
element containing the list of provenance information related to this
content.
An element translationProvenanceRecords (or <span
its-translation-provenance-records> in HTML) which
contains:
One or more elements translationProvenanceRecord
(or <span its-translation-provenance-record>
in HTML), each of which contains at least one of the following, with the same semantics as the corresponding attributes at the transProvRule element:
Human translation provenance information specified by exactly a transPerson or a transPersonRef attribute.
Organizational translation provenance information specified by exactly a transOrg or a transOrgRef attribute.
Translation tool provenance related information specified by exactly a transTool or a transToolRef attribute.
Human translation revision provenance related information specified by exactly a transRevPerson or a transRevPersonRef attribute.
Organizational revision translation related provenance information specified by exactly a transRevOrg or a transRevOrgRef attribute.
Translation tool revision provenance related information specified by exactly a transRevTool or a transRevToolRef attribute.
A reference to external, RDF-based provenance description specified by a provRef attribute.
Important:
When the attributes transPerson, transPersonRef, transOrg, transOrgRef, transTool, transToolRef, transRevPerson, transRevPersonRef, transRevOrg, transRevOrgRef, transRevTool, transRevToolRef and provRef (or their equivalent
representations) are used in in a standoff manner, the information they
carry pertains to the content of the element that refers to the standoff
annotation, not to the content of the element translationProvenanceRecord
(or <span translation-provenance-record>in HTML) where they are
declared.
The order of translationProvenanceRecord elements inside translationProvenanceRecords is significant: it reflects the temporal order of revisions. This is demonstrated e.g. in .
Annotating provenance information in XML with local inline markup
The provenance related attributes at the par and legalnotice elements are used to associate the provenance information directly with the content of theses elements.
Annotating provenance information in HTML with local inline markup
In this example several spans of content are associated with provenance information.
Annotating provenance information in XML with local standoff markup
The following example shows a document using local standoff markup to
encode several pieces of provenance information. The par and legalnotice elements delemit the content to markup. They hold translationProvenanceRecordsRef attributes that point to the related translationProvenanceRecords elements. The legalnotice element has been revised two times. Hence, the related translationProvenanceRecords element contains two translationProvenanceRecord child elements. The second translationProvenanceRecord child element provides information about the second revison.
Annotating provenance information in XML with local standoff markup and a global
rule
The following example shows a document using local standoff markup to
encode several pieces of provenance information. But because, in this case, the
par or the legal notice elements do not allow attributes from another
namespace we cannot use translationProvenanceRecordsRef directly.
Instead, a global rule is used to map the function of
translationProvenanceRecordsRef to a non-ITS construct, here the
ref attribute of the par or legal notice elements.
Annotating provenance information in HTML with local standoff markup
The following example shows a document using local standoff markup to
encode provenance information. The p elements delimits the
content to markup. It holds a its-translation-provenance-records-ref
attribute that points to the standoff information inside the script element.
TODO for above: Finalize how HTML should work: use its-* attributes for standoff markup or markup inside the script element.
TextAnalyisAnnotation
The TextAnalyisAnnotation data category will be defined in an updated version
of this document. For details of the proposed data category, see the [ITS 2.0 Requirements document](http://www.w3.org/TR/2012/WD-its2req-20120524/#textAnalysisAnnotation).
External Resource
Definition
The [External Resource](#externalresource) data category
indicates that a node represents or references potentially translatable
data in a resource outside the document. Examples of such resources are
external images and audio or video files.
Implementation
The [External Resource](#externalresource) data category
can be expressed only with global rules. There is no inheritance. There
is no default.
GLOBAL: The
externalResourceRefRule element contains the following:
- A required selector attribute. It contains an
[absolute selector](#selectors) which selects the
nodes to which this rule applies.
- A required externalResourceRefPointer attribute that
contains a
[relative selector](#selectors) pointing
to a node that provides the URI of the external resource.
The externalResourceRefRule element
The externalResourceRefRule element expresses that the
imagedata, audiodata and
videodata elements contain references to external
resources. These references are expressed via a fileref
attribute. The externalResourceRefPointer attribute
points to that attribute.
Two externalResourceRefRule elements used for external
resources associated with HTML5 video elements
The two externalResourceRefRule elements select the
src and the poster attributes at HTML5
video elements. These attributes identify different
external resources, and at the same time contain the references to
these resources. For this reason, the
externalResourceRefPointer attributes point to the
value of src and poster respectively. The
underlying HTML5 document is given in .
An HTML5 document that can be used for .
Target Pointer
Definition
Some formats, such as those designed for localization or for multilingual
resources, hold the same content in different languages inside a single
document. The [Target Pointer](#target-pointer) data
category is used to associate the node of a given source content (i.e.
the content to be translated) and the node of its corresponding target
content (i.e. the source content translated into a given target
language).
This specification makes no provision regarding the presence of the
target nodes or their content: A target node may or may not exist and it
may or may not have content.
This data category can be used for several purposes, including but not
limited to:
Extract the source content to translate and put back the
translation at its proper location.
Compare source and target content for quality
verification.
Re-use existing translations when localizing the new version of
an existing document.
Access aligned bi-lingual content to build memories, or to
train machine translation engines.
In general, it is recommended to avoid developing formats where the
same content is stored in different languages in the same document,
unless for very specific use cases. See the best practices [Working with multilingual documents](http://www.w3.org/TR/2008/NOTE-xml-i18n-bp-20080213/#DevMLDoc)
from for further
guidance.
Implementation
The [Target Pointer](#target-pointer) data category can
be expressed only with global rules. There is no inheritance. There is
no default.
GLOBAL: The targetPointerRule
element contains the following:
- A required selector attribute. It contains an
[absolute selector](#selectors) which selects the
nodes to which this rule applies.
- A required targetPointer attribute. It contains a
[relative selector](#selectors) that points to the
node for the target content corresponding to the selected source
node.
The source node and the target node may be of different types, but
the target node must be able to contain the same content of the
source node (e.g. an attribute node cannot be the target node of a
source node that is an element with children).
Defining the target location of a source content with the
targetPointerRule element
Id Value
Definition
The [Id Value](#idvalue) data category indicates a value
that can be used as unique identifier for a given part of the
content.
The recommended way to specify a unique identifier is to use
xml:id (See the best practice [Defining markup for unique identifiers](http://www.w3.org/TR/2008/NOTE-xml-i18n-bp-20080213/#DevUniqueID)
from ). The idValueRule
element is intended only as a fall-back mechanism for documents where
unique identifiers are available with another construct.
Providing a unique identifier that is maintained in the original document
can be use for several purposes, for example:
Allow automated alignment between different versions of the
source document, or between source and translated
documents.
Improve the confidence in leveraged translation for exact
matches.
Provide back-tracking information between displayed text and
source material when testing or debugging.
The [Id Value](#idvalue) data category
only provides for rules to be expressed at a global level.
Locally, users are able to use xml:id (which is
defined by XML) or an attribute specific to the format in
question (as in ).
Applying the [Id Value](#idvalue) data
category to xml:id attributes using global rules
is not necessary, since xml:id is the recommended
way to specify an identifier in XML.
Implementation
The [id Value](#idvalue) data category can be expressed
only with global rules. There is no inheritance. There is no
default.
GLOBAL: The idValueRule element contains
the following:
- A required selector attribute. It contains an
[absolute selector](#selectors) which selects the
nodes to which this rule applies.
- A required idValue attribute. It contains an XPath
expression which constructs a string corresponding to the identifier
of the node to which this rule applies. The
identifier
[MUST](#rfc-keywords) be unique at least
within the document. If the attribute xml:id is present
for the selected node, the value of the xml:id
attribute [MUST](#rfc2119) take precedence over the
idValue value.
Pointing to an ID value with the idValueRule
element
The idValueRule element indicates that the unique identifier
for each <text> element is the value of the
attribute name of its parent element.
Constructing ID values using the idValueRule
element.
The idValue attribute allows to build composite values
based on different attributes, element or event hard-coded text. Any
of the String functions offered by XPath can be used. In the
document below, the two elements <text> and
<desc> are translatable, but they have only one
corresponding identifier, the name attribute in their
parent element.
To make sure the identifier is unique for both the content of
<text> and the content of
<desc>, the XPath expression concat(../@name,
'_t') gives the identifier "settingsMissing_t" for the
content of <text> and the expression
concat(../@name, '_d') gives the identifier
"settingsMissing_d" for the content of <desc>.
Using xml:id and idValueRule
When an xml:id attribute is present for a node selected by
an idValueRule element, the value of xml:id
takes precedence over the value defined by the idValueRule
element. In the example below, the unique ID to use is “btnAgain”
for the first <res> element, and “retryTip” for the
second <res> element.
Preserve Space
Definition
The [Preserve Space](#preservespace) data category
indicates how whitespace should be handled in content. The possible
values for this data category are "default" and "preserve" and carry the
same meaning as the corresponding values of the xml:space attribute. The
default value is "default".
Implementation
The [Preserve Space](#preservespace) data category can
be expressed with global rules, or locally using the
xml:space attribute. For elements, the data category
information [inherits](#def-inheritance) to the textual
content of the element, including child elements and
attributes.
The [Preserve Space](#preservespace) data category is not applicable to HTML5
documents because xml:space (and by extension [Preserve Space](#preservespace)) has no effect in
documents parsed as text/html.
GLOBAL: The preserveSpaceRule
element contains the following:
- A required selector attribute. It contains an
[absolute selector](#selectors) which selects the
nodes to which this rule applies.
- A required space attribute with the value "default" or
"preserve".
The [Preserve Space](#preservespace) data
category expressed globally
The preserveSpaceRule element specifies that whitespace in
all verse elements must be treated literally.
LOCAL: The xml:space attribute,
as defined in section 2.10 of ,
maps exactly to the [Preserve Space](#preservespace)
data category.
The [Preserve Space](#preservespace) data
category expressed locally
The standard xml:space attribute specifies that the
whitespace in the verse element must be treated literally.
Localization Quality Issue
Definition
The [Localization Quality Issue](#lqissue) data category
is used to express information related to localization quality
assessment tasks. Such tasks can be conducted on the translation of some
source text into a target language or on the source text itself where
its quality may impact on the localization process.
This data category can be used in a number of ways, including the
following example scenarios:
An automatic quality checking tool flags a number of potential
quality issues in an XML or HTML file and marks them up using
ITS 2.0 markup. Other tools in the workflow then examine this
markup and decide whether the file needs to be reviewed manually
or passed on for further processing without a manual review
stage.
A quality assessment process identifies a number of issues and
adds the ITS markup to a rendered HTML preview of an XML file
along with CSS styling that highlights these issues. The
resulting HTML file is then sent back to the translator to
assist his or her revision efforts.
A human reviewer working with a web-based tool adds quality
markup, including comments and suggestions, to a localized text
as part of the review process. A subsequent process examines
this markup to ensure that changes were made.
The data category defines four pieces of information:
| Information |
Description |
Value |
Notes |
| Type |
A set of broad types of issues into which tool-specific issues
can be categorized. |
One of the values defined in [list of type values](#lqissue-typevalues). |
ITS 2.0-compliant tools that use these categories [MUST](#rfc-keywords) map their internal values
to these types. If the type of the issue is set to
uncategorized, a comment [MUST](#rfc-keywords) be specified as
well. |
| Comment |
A human-readable description of the quality issue. |
Text |
|
| Severity |
A decimal value representing the severity of the issue, as
defined by the model generating the metadata. |
A decimal value between 0.0 and 100.0 (inclusive), with higher
values indicating greater severity. |
It is up to tools to map the values of this to their own
system to this scale. If needed, the original value can be
passed along using a custom namespace for XML, or a
data- attribute for HTML. |
| Profile Reference |
A reference to a document describing the quality assessment
model used for the issue. |
A URI pointing to the reference document. |
The use of resolvable URI is strongly recommended as it
provides a way for human evaluators to learn more about the
quality issues in use. |
Implementation
The [Localization Quality Issue](#lqissue) data category
can be expressed with global rules, or locally on individual elements.
For elements, the data category information [inherits](#def-inheritance) to the textual content of
the element, including child elements, but excluding
attributes.
GLOBAL: The locQualityIssueRule element
contains the following:
A required selector attribute. It contains an [absolute selector](#selectors) which selects
the nodes to which this rule applies.
At least one of the following:
Exactly one of the following:
A locQualityIssuesRef attribute. Its
value is a URI pointing to the
locQualityIssues element containing the
list of issues related to this content.
A locQualityIssuesRefPointer
attribute that contains a [relative selector](#selectors) pointing to a node with
the exact same semantics as
locQualityIssuesRef.
Exactly one of the following:
A locQualityIssueType attribute that
implements the [type
information](#lqissueDefs).
A locQualityIssueTypePointer
attribute that contains a [relative selector](#selectors) pointing to a node with
the exact same semantics as
locQualityIssueType.
Exactly one of the following:
A locQualityIssueComment attribute
that implements the [comment information](#lqissueDefs).
A locQualityIssueCommentPointer
attribute that contains a [relative selector](#selectors) pointing to a node with
the exact same semantics as
locQualityIssueComment.
None or exactly one of the following:
A locQualityIssueSeverity attribute that
implements the [severity
information](#lqissueDefs).
A locQualityIssueSeverityPointer attribute
that contains a [relative
selector](#selectors) pointing to a node with the exact
same semantics as
locQualityIssueSeverity.
None or exactly one of the following:
A locQualityIssueProfileRef attribute that
implements the [profile
reference information](#lqissueDefs).
A locQualityIssueProfileRefPointer attribute
that contains a [relative
selector](#selectors) pointing to a node with the exact
same semantics as
locQualityIssueProfileRef.
Why does below say "do not apply to HMTL as local markup"? There is local markup for direction annotation in XML too.
The attributes locQualityIssuesRefPointer,
locQualityIssueTypePointer,
locQualityIssueCommentPointer,
locQualityIssueSeverityPointer and
locQualityIssueProfileRefPointer do not apply to HTML
as local markup is provided for direct annotation in HTML.
Annotating an issue in XML with locQualityIssueRule
element
The locQualityIssueRule element associates the issue
information with a selected span of content.
Using locQualityIssueRule to map equivalent markup
The locQualityIssueRule element defines what constructs are
equivalent to the native ITS markup for the different pieces of
information of the data category.
Annotating an issue in HTML5 with locQualityIssueRule
element
The locQualityIssueRule element resides in a separate file
() that associates the issue information with a selected span of
content in the HTML document.
External rule document associated with an HTML5 document
This document is used in :
LOCAL: Using the inline markup to represent the
data category locally is limited to a single occurrence for a given
content (e.g. one cannot have different locQualityIssueType
attributes applied to the same span of text because the inner-most one
would override the others). A local standoff markup is
provided to allow such cases.
The following local markup is available for the [Localization Quality
Issue](#lqissue) data category:
Either (inline markup):
At least one of the following attributes:
A locQualityIssueType attribute that
implements the [type
information](#lqissueDefs).
A locQualityIssueComment attribute
that implements the [comment information](#lqissueDefs).
An optional locQualityIssueSeverity
attribute that implements the [severity information](#lqissueDefs).
An optional locQualityIssueProfileRef
attribute that implements the [profile reference information](#lqissueDefs).
Or (standoff markup):
A locQualityIssuesRef attribute. Its value
is a URI pointing to the locQualityIssues
element containing the list of issues related to this
content.
An element locQualityIssues (or <span
loc-quality-issues> in HTML) which
contains:
Should locQualityIssues also be defined for global rules? It seems not to be specific to local.
One or more elements locQualityIssue
(or <span its-loc-quality-issue>
in HTML), each of which contains:
At least one of the following
attributes:
A locQualityIssueType
attribute that implements the [type
information](#lqissueDefs).
A locQualityIssueComment
attribute that implements the [comment
information](#lqissueDefs).
An optional
locQualityIssueSeverity attribute that
implements the [severity
information](#lqissueDefs).
An optional
locQualityIssueProfileRef attribute
that implements the [profile reference information](#lqissueDefs).
Important: When the attributes locQualityIssueType,
locQualityIssueComment,
locQualityIssueSeverity and
locQualityIssueProfileRef (or their equivalent
representations) are used in in a standoff manner, the information they
carry pertains to the content of the element that refers to the standoff
annotation, not to the content of the element locQualityIssue
(or <span loc-quality-issue>in HTML) where they are
declared.
Annotating an issue in XML with local inline markup
The attributes locQualityIssueType,
locQualityIssueComment and
locQualityIssueSeverity are used to associate the
issue information directly with a selected span of content.
Annotating an issue in HTML with local inline markup
In this example several spans of content are associated with a
quality issue.
Annotating an issue in XML with local standoff markup
The following example shows a document using local standoff markup to
encode several issues. The mrk element delimits the
content to markup and holds a locQualityIssuesRef
attribute that points to the locQualityIssues element where
the issues are listed.
Annotating an issue in XML with local standoff markup and a global
rule
The following example shows a document using local standoff markup to
encode several issues. But because, in this case, the
mrk element does not allow attributes from another
namespace we cannot use locQualityIssuesRef directly.
Instead, a global rule is used to map the function of
locQualityIssuesRef to a non-ITS construct, here the
ref attribute of any mrk elements that
has its attribute type set to "x-itslq".
Annotating an issue in HTML with local standoff markup
The following example shows a document using local standoff markup to
encode several issues. The span element delimits the
content to markup and holds a loc-quality-issues-ref
attribute that points to a special span element where
the issues are listed within a set of other special
span elements.
TODO for above: Finalize how HTML should work: use its-* attributes for standoff markup or markup inside the script element.
Localization Quality Précis
Definition
The [Localization Quality Précis](#lqprecis) data
category is used to express an overall measurement of the localization
quality of a document or an item in a document.
This data category allows to specify a quality score or a voting result
for a given item or document, as well as to indicate what constitutes a
passing score or vote. It also allows to point to a profile describing
the quality assessment model used for the scoring or the voting.
Implementation
The [Localization Quality Précis](#lqprecis) data
category can be expressed with global rules, or locally on individual
elements. For elements, the data category information [inherits](#def-inheritance) to the textual content of
the element, including child elements, but
excluding attributes.
GLOBAL: The locQualityPrecisRule
element contains the following:
A required selector attribute. It contains an [absolute selector](#selectors) which selects
the nodes to which this rule applies.
Exactly one of the following:
Exactly one of the following:
A locQualityPrecisScore attribute.
Its value is an integer between 0 and 100
(inclusive) with higher values indicating a better
score.
A locQualityPrecisScorePointer
attribute that contains a [relative selector](#selectors) pointing to a node with
the exact same semantics as
locQualityPrecisScore.
Exactly one of the following:
A locQualityPrecisVote attribute.
Its value is a signed integer with higher values
indicating a better vote.
A locQualityPrecisVotePointer
attribute that contains a [relative selector](#selectors) pointing to a node with
the exact same semantics as
locQualityPrecisVote.
None or exactly one of the following:
A locQualityPrecisThreshold attribute. Its
value is a signed integer which indicates the lowest
score or vote value that constitutes a passing score or
a passing vote in the profile used.
A locQualityPrecisThresholdPointer attribute
that contains a [relative
selector](#selectors) pointing to a node with the exact
same semantics as
locQualityPrecisThreshold.
None or exactly one of the following:
A locQualityPrecisProfileRef attribute. Its
value is a URI pointing to the reference document
describing the quality assessment model used for the
scoring.
A locQualityPrecisProfileRefPointer
attribute that contains a [relative selector](#selectors) pointing to a node with the
exact same semantics as
locQualityPrecisProfileRef.
The attributes locQualityPrecisScorePointer,
locQualityPrecisThresholdPointer, and
locQualityPrecisProfileRefPointer do not apply to
HTML as local markup is provided for direct annotation in HTML.
The [Localization Quality Précis](#lqprecis) data
category expressed globally in XML
The following example shows how to use the
locQualityPrecisRule element to specify the score,
threshold and profile for a document.
Using pointers to map the [Localization
Quality Précis](#lqprecis) data category in XML
The following example shows how the
locQualityPrecisVotePointer,
locQualityPrecisThresholdPointer and
locQualityPrecisProfileRefPointer can be used to map
the data category to an equivalent markup.
The [Localization Quality Précis](#lqprecis) data
category expressed globally in HTML
The following example shows how to use the
locQualityPrecisRule element to specify the score,
threshold and profile for an HTML document.
External rule document associated with an HTML5 document
This document is used in :
LOCAL: The following local markup is available
for the [Localization Quality Précis](#lqprecis) data
category:
Exactly one of the following:
A locQualityPrecisScore attribute. Its value
is an integer between 0 and 100 (inclusive) with higher
values indicating a better score.
A locQualityPrecisVote attribute. Its value
is a signed integer with higher values indicating a
better vote.
An optional locQualityPrecisThreshold attribute. Its
value is a signed integer which indicates the lowest score or
vote that constitutes a passing score or a passing vote in the
profile used.
An optional locQualityPrecisProfileRef attribute.
Its value is a URI pointing to the reference document describing
the quality assessment model used for the scoring.
The [Localization Quality Précis](#lqprecis) data
category expressed locally in XML
The locQualityPrecisScore,
locQualityPrecisThreshold and
locQualityPrecisProfileRef are used to score the
quality of the document.
The [Localization Quality Précis](#lqprecis) data
category expressed locally in HTML
The its-loc-quality-precis-score,
its-loc-quality-precis-threshold and
its-loc-quality-precis-profile-ref are used to score
the quality of the document.
MT Confidence
Definition
The [MT Confidence](#mtconfidence) data category is used
to communicate the self-reported confidence of a specific machine
translation engine. It is not intended as comparable between machine
translation engines and platforms. It is solely for providing
self-reported confidence by the specific system that produced the
actually used raw machine translation. This data category does NOT aim
to establish any sort of correlation between the self-reported
confidence and either human evaluation of MT usefulness, or post-editing
cognitive effort. For harmonization’s sake, MT Confidence is provided as
a (rational) number from the interval <0;1>.
Implementers are expected to interpret the floating point number and
present it to human and other consumers in other convenient forms,
such as percentage (0-100%) with up to 2 decimal digits, font or
background color coding etc.
This data category can be used for several purposes, including, but not
limited to:
Automated sorting of raw machine translated text for further
processing based on empirically set thresholds.
Provide readers of machine translated text with self-reported
relative accuracy prediction.
Provide translators, post-editors, reviewers and proofreaders
with self-reported relative accuracy prediction.
Human consumers using often machine translation for the same
source should be able to predict usefulness of a machine
translated segments at a glance.
MT confidence can be displayed e.g.:
on websites machine translated on the fly,
by simple translation editors, and Computer Aided
Translation (CAT) tools.
Implementation
The [MT Confidence](#mtconfidence) data category can be
expressed with global rules, or locally on individual elements. For
elements, the data category information [inherits](#def-inheritance) to the textual content of the element,
including child elements, but excluding
attributes.
GLOBAL: The mtConfidenceRule
element contains the following:
A required selector attribute. It contains an [absolute selector](#selectors) which selects
the nodes to which this rule applies.
A required mtProducer attribute that contains a
human readable string identifying the Machine Translation
Platform, e.g. "Bing Translator", "Google
Translate", "DCU Matrex", "vanilla
Moses" etc.
An optional mtEngine attribute that contains a
string uniquely identifying a specific MT engine on a platform
given in mtProducer. Some examples of values are:
-
A BCP 47 language tag with t-extension, e.g.
ja-t-it for an Italian to Japanese MT
engine
A Domain as per the
A privately structured string, eg.
Domain:IT-Pair:IT-JA,
IT-JA:Medical, etc.
Global usage of mtConfidenceRule, mtProducer,
and mtEngine (specified by BCP 47 t-extension) along with
local usage of mtConfidenceScore
Global usage of mtConfidenceRule, mtProducer,
and mtEngine (specified with a sample privately
structured string) along with local usage of
mtConfidenceScore
LOCAL: the following local markup is
available for the [MT Confidence](#mtconfidence) data
category:
An mtProducer attribute that contains a string identifying the
Machine Translation Platform, e.g. “Bing Translator”, “Google
Translate”, “DCU Matrex”, “vanilla Moses” etc.
An mtEngine attribute that contains a string uniquely
identifying a specific MT engine on a platform given in
mtProducer. Some examples of values are given for the [global definition of MT
Confidence](#mtconfidence-global).
The [MT Confidence](#mtconfidence) data category
expressed locally
The [MT Confidence](#mtconfidence) data category
expressed locally in HTML5
Allowed Characters
Definition
The [Allowed Characters](#allowedchars) data category is
used to specify what characters are allowed in a given content.
This data category can be used for various purposes, including the
following examples:
- Limit the characters which may be used in the UI of a game because
of some special font restrictions.
- Prevent illegal characters to be entered for text content that are
file or directory names.
- Control what characters can be used when translating examples of
login name in a content.
The set of characters that are allowed is specified using a regular
expression. That is, each character in the selected content [MUST](#rfc-keywords) be included in the set specified
by the regular expression.
The regular expression is a character class construct as defined in the
section [Character Classes](http://www.w3.org/TR/xmlschema-2/#charcter-classes) of XML Schema , with the assumption that the . metacharacter matches also CARRIAGE RETURN (U+000D) and LINE FEED (U+000F).
That is with the dot-all option set.
Example of expressions (shown as XML source):
"[abc]" : allows the characters 'a', 'b' and
'c'.
"[a-c]" : allows the characters 'a', 'b' and
'c'.
"[a-zA-Z]" : allows the characters from 'a' to 'z' and
from 'A' to 'Z'.
"[^abc]" : allows any characters except 'a', 'b', and
'c'.
"[^a-c]" : allows any characters except 'a',
'b', and 'c'.
"\w" : allows any character except the set of
"punctuation", "separator" and "other" characters.
"[ --[<>:"\\/|\?*]]"
: allows only the characters valid for Windows file names.
"." : allows any character.
"" : allows no character.
"[a-ÿ-[\s]]" : allows all characters between
U+0061 and U+00FF except the characters SPACE (U+0020), TABULATION
(U+0009), CARRIAGE RETURN (U+000D) and LINE FEED (U+000F).
Implementation
The [Allowed Characters](#allowedchars) data category
can be expressed with global rules, or locally on individual elements.
For elements, the data category information [inherits](#def-inheritance) to the textual content of
the element, including child elements, but
excluding attributes.
GLOBAL: The allowedCharactersRule
element contains the following:
A required selector attribute. It contains an [absolute selector](#selectors) which selects
the nodes to which this rule applies.
Exactly one of the following:
A allowedCharacters attribute that contains
the regular expression indicating the allowed
characters.
A allowedCharactersPointer attribute that
contains a [relative
selector](#selectors) pointing to a node with the exact
same semantics as
allowedCharacters.
The [Allowed Characters](#allowedchars) data
category expressed globally in XML
The allowedCharactersRule element states that the translated
content of elements content must not contain the characters
* and +.
Mapping the [Allowed Characters](#allowedchars)
data category in XML
The attribute allowedCharactersPointer is used to map the
data category to the non-ITS attribute set in this
document. The attribute has the same semantics as
allowedCharacters.
LOCAL: the following local markup is
available for the [Allowed Characters](#allowedchars)
data category:
A allowedCharacters attribute that contains the
regular expression indicating the allowed characters.
The [Allowed Characters](#allowedchars) data
category expressed locally in XML
The local allowedCharacters attribute specifies that the
translated content of element panelmsg must contain only
Unicode characters between U+0020 and U+00FE.
The [Allowed Characters](#allowedchars) data
category expressed locally in HTML
The local its-allowed-characters attribute specifies that
the translated content of element code must not contain the
characters other than 'a' to 'z' in any case and the characters
underscore and minus.
Storage Size
Definition
The [Storage Size](#storagesize) data category is used
to specify the maximum storage size of a given content.
This data category can be used for various purposes, including the
following examples:
- Verify during translation if a string fits into a fixed-size
database field.
- Control the size of a string that is stored in a fixed-size memory
buffer at run-time.
The storage size is expressed in bytes and is provided along with the
character set encoding used to store the content.
Implementation
The [Storage Size](#storagesize) data category can be
expressed with global rules, or locally on individual elements. There is
no inheritance. The default value of the character set encoding is
UTF-8.
GLOBAL: The storageSizeRule element
contains the following:
A required selector attribute. It contains an [absolute selector](#selectors) which selects
the nodes to which this rule applies.
Exactly one of the following:
A storageSize attribute. It contains the
maximum number of bytes the text of the selected node is
allowed in storage.
A storageSizePointer attribute that contains
a [relative selector](#selectors)
pointing to a node with the exact same semantics as
storageSize.
None or exactly one of the following:
A storageEncoding attribute. It contains the
name of the character set encoding used to calculate the
number of bytes of the selected text. The name [MUST](#rfc-keywords) be one of the
names or aliases listed in the [IANA Character Sets registry](http://www.iana.org/assignments/character-sets)
. The default
value is "UTF-8".
A storageEncodingPointer attribute that
contains a [relative
selector](#selectors) pointing to a node with the exact
same semantics as storageEncoding.
-
An optional lineBreakType attribute. It indicates what
type of line breaks the storage uses. The possible values are:
cr for CARRIAGE RETURN (U+000D),
lf for LINE FEED (U+000A), crlf
for CARRIAGE RETURN (U+000D) followed by LINE FEED (U+000A), or
nel for NEXT LINE (U+0085). The default value
is lf.
The [Storage Size](#storagesize) data category
expressed globally in XML
The storageSizeRule element is used to specify that, when
encoded in ISO-8859-1, the content of the country element
must not be more than 25 bytes. The name "Papouasie-Nouvelle-Guinée"
is 25 character long and fits because all characters in ISO-8859-1
are encoded as a single byte.
Mapping the [Storage Size](#storagesize) data
category in XML
The storageSizePointer attribute is used to map the non-ITS
attribute max to the same functionality as
storageSize. There is no character set encoding
specified, so the default UTF-8 is assumed. Note that, while the
name "Papouasie-Nouvelle-Guinée" is 25 character long, the character
'é' is encoded into two bytes in UTF-8. Therefore this name is one
byte too long to fit in its storage destination.
LOCAL: the following local markup is available
for the [Storage Size](#storagesize) data category:
A storageSize attribute. It contains the maximum
number of bytes the text of the selected node is allowed in
storage.
An optional storageEncoding attribute. It contains
the name of the character set encoding used to calculate the
number of bytes of the selected text. The name [MUST](#rfc-keywords) be one of the names or
aliases listed in the [IANA
Character Sets registry](http://www.iana.org/assignments/character-sets)
. The default value
is "UTF-8".
-
An optional lineBreakType attribute. It indicates what
type of line breaks the storage uses. The possible values are:
cr for CARRIAGE RETURN (U+000D),
lf for LINE FEED (U+000A), crlf
for CARRIAGE RETURN (U+000D) followed by LINE FEED (U+000A), or
nel for NEXT LINE (U+0085). The default value
is lf.
The [Storage Size](#storagesize) data category
expressed locally in XML
The storageSize attribute allows to specify different the
maximum storage sizes throughout the document.
The [Storage Size](#storagesize) data category
expressed locally in HTML
The its-storage-size is used here to specify the maximum
number of bytes the two editable strings can have in UTF-8.
Using ITS Markup in HTML5
Mapping of Local Data Categories to HTML5
All data categories defined in
and having local implementation might be used in HTML with the exception of [Translate](#trans-datacat),
[Directionality](#directionality), [Ruby](#ruby-annotation),
and [Language Information](#language-information) data categories.
Above mentioned data categories are excluded because HTML have native markup for them.
In HTML data categories are implemented as attributes. Name of HTML attribute is derived from
the name of attribute defined in the local implementation by using the following
rules:
- Attribute name is prefixed with
its-
- Each uppercase letter in the attribute name is replaced by
-
(U+002D) followed by a lowercase variant of the letter.
Values of attributes which corresponds to data categories with a predefined set of values
MUST be matched case-insensitively.
Case of attribute names is also irrelevant given the nature of HTML syntax. So in HTML
terminology data category can be stored as its-term, ITS-TERM,
its-Term etc. All those attributes are treated as equivalent and will
gets normalized upon DOM construction.
External Rules
Link to external global rules is specified in href attribute of link element, with the link relation
its-rules.
By default XPath 1.0 will be used for selection in global rules. If users prefer easier selection mechanism,
they can switch query
language to CSS selectors by using the queryLanguage
attribute, see .
HTML5 parsing algorithm automatically puts all HTML elements into XHTML namespace
(http://www.w3.org/1999/xhtml). Selectors used in global rules must
take this into account.
Using XPath in global rules linked from HTML5 documents does not
create an additional burden to implementers. Parsing HTML5 content
produces a DOM tree that can be directly queried using XPath,
functionality supported by all major browsers.
Inline Global Rules in HTML5
Inline global rules MUST be specified inside script which has type
attribute with the value application/xml or application/its+xml.
The script element itself MUST be child of head element. Comments MUST
NOT be used inside global rules. Each script element MUST NOT contain more then
one rules element.
It is preferred to use external global rules linked using link
element.
Precedence between Selections
The following precedence order is defined for selections of ITS information
in various positions of HTML document (the first item in the list has the highest
precedence):
- Implicit local selection in documents (
[ITS local attributes](#html5-local-attributes) on a specific
element)
Global selections in documents
(using mechanism described in or )
If identical selections are defined in different rules elements
within one document, the selection defined by the last takes
precedence.
- Selections via defaults for data
categories, see
In case of conflicts between global selections via multiple [rules](#selection-global) elements, the last rule has
higher precedence.