This document is also available in these non-normative formats: ODD/XML document , self-contained zipped
archive , XHTML Diff markup
to ITS 1.0 Recommendation 3 April 2007 , and XHTML Diff markup to publication from 26 June
2012 , and XHTML Diff markup to
publication from 31 July 2012 .
Copyright © 2012 W3C ® ( MIT , ERCIM , Keio ), All Rights Reserved. W3C liability , trademark and document use rules apply.
This document defines data categories and their implementation as a set of elements and attributes called the Internationalization Tag Set (ITS) 2.0. ITS 2.0 is the successor of ITS 1.0 ; it is designed to foster the creation of multilingual Web content, focusing on HTML5, XML based formats in general, and to leverage localization workflows based on the XML Localization Interchange File Format (XLIFF). In addition to HTML5 and XML, algorithms to convert ITS attributes to RDFa and NIF are provided.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
This document defines data categories and their implementation as a set of elements and attributes called the Internationalization Tag Set (ITS) 2.0. ITS 2.0 is the successor of ITS 1.0 ; it is designed to foster the creation of multilingual Web content, focusing on HTML5, XML based formats in general, and to leverage localization workflows based on the XML Localization Interchange File Format (XLIFF). In addition to HTML5 and XML, algorithms to convert ITS attributes to RDFa and NIF are provided.
This document is an updated Public Working Draft published by the MultilingualWeb-LT Working Group , part of the W3C Internationalization Activity . The Working Group expects to advance this Working Draft to Recommendation status (see W3C document maturity levels ).
Major changes in this version of the document include the
addition of several data categories ( Domain Disambiguation Target Pointer , External Resource Id
Value , Locale Filter Preserve Space ,Localization Quality Issue ). Localization Quality
Précis ), the definition of a query language attribute ,and the creation of an initial test
suite . See the changelog for
details.
Feedback about the content of this document is encouraged. See also issues discussed within the Working Group . Send your comments to public-multilingualweb-lt-comments@w3.org . Use "Comment on ITS 2.0 specification WD" in the subject line of your email. The archives for this list are publicly available.
Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy . W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy .
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 RDFa and NIF , and the schema languages XML DTD [XML 1.0] , XML Schema [XML Schema] and RELAX NG [RELAX NG] .
This document aims to realize many of the ideas formulated in the ITS 2.0 Requirements document , in [ITS REQ] and [Localizable DTDs] .
Not all requirements listed there are addressed in this document. Those which are not addressed here are either covered in [XML i18n BP] (potentially in an as yet unwritten best practice document on multilingual Web content), or may be addressed in a future version of this specification.
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.
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, RDFa, 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 RDFa and 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 attribute.
As of the time of this writing, the new data categories included in ITS 2.0 are:
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 [l10n i18n] .
[Ed. note: 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 [XUL] ) creates challenges and opportunities in the domain of XML internationalization and localization.
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.
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.
<resources> <section id="Homepage"> <arguments> <string>page</string> <string>childlist</string> </arguments> <variables> <string>POLICY</string> <string>Corporate Policy</string> </variables> <keyvalue_pairs> <string>Page</string> <string>ABC Corporation - Policy Repository</string> <string>Footer_Last</string> <string>Pages</string> <string>bgColor</string> <string>NavajoWhite</string> <string>title</string> <string>List of Available Policies</string> </keyvalue_pairs> </section> </resources>
[Source file: examples/xml/EX-motivation-its-1.xml ]
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.
<dialogue xml:lang="en-gb"> <rsrc id="123"> <component id="456" type="image"> <data type="text">images/cancel.gif</data> <data type="coordinates">12,20,50,14</data> </component> <component id="789" type="caption"> <data type="text">Cancel</data> <data type="coordinates">12,34,50,14</data> </component> <component id="792" type="string"> <data type="text">Number of files: </data> </component> </rsrc> </dialogue>
[Source file: examples/xml/EX-motivation-its-2.xml ]
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: Section 6: Description of Data Categories
concretely in the ITS schemas: Appendix D: Schemas
E: Schemas for ITS
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.
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.
Note:
The question "How to use ITS with existing popular markup schemes?" is covered in more details (including examples) in a separate document: [XML i18n BP] .
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 Section
5.5: Associating 5.6: Associating ITS Data Categories with Existing
Markup ). 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.
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.
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 ). This global work, however, may fall to information architects, rather than the content producers themselves.
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.
The its:translate="no"
attributes indicate that the
path
and the cmd
elements should not be translated.
<help xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> <head> <title>Building the Zebulon Toolkit</title> </head> <body> <p>To re-compile all the modules of the Zebulon toolkit you need to go in the <path its:translate="no">\Zebulon\Current Source\binary</path> directory. Then from there, run batch file <cmd its:translate="no">Build.bat</cmd>.</p> </body> </help>
[Source file: examples/xml/EX-ways-to-use-its-1.xml ]
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.
The translateRule element
is used in the header of the document to indicate that none of the
path
or cmd
elements should be translated.
<help xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> <head> <title>Building the Zebulon Toolkit</title> <its:rules version="2.0"> <its:translateRule selector="//path | //cmd" translate="no"/> </its:rules> </head> <body> <p>To re-compile all the modules of the Zebulon toolkit you need to go in the <path>\Zebulon\Current Source\binary</path> directory. Then from there, run batch file <cmd>Build.bat</cmd>.</p> </body> </help>
[Source file: examples/xml/EX-ways-to-use-its-2.xml ]
A processor may insert markup at the top of the document which links to ITS information outside of the document.
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
external rule document.
<help xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" its:version="2.0"> <head> <title>Building the Zebulon Toolkit</title> <its:rules version="2.0" xlink:href="EX-ways-to-use-its-4.xml"/> </head> <body> <p>To re-compile all the modules of the Zebulon toolkit you need to go in the <path>\Zebulon\Current Source\binary</path> directory. Then from there, run batch file <cmd>Build.bat</cmd>.</p> </body> </help>
[Source file: examples/xml/EX-ways-to-use-its-3.xml ]
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.
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"> <its:translateRule selector="//path | //cmd" translate="no"/> </its:rules>
[Source file: examples/xml/EX-ways-to-use-its-4.xml ]
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.
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 Example 3.
<xs:schema xmlns:its="http://www.w3.org/2005/11/its" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:import namespace="http://www.w3.org/2005/11/its" schemaLocation="its.xsd"/> <xs:attributeGroup name="commonAtts"> <xs:attributeGroup ref="its:att.local.with-ns.attribute.translate"/> <xs:attribute name="id" type="xs:ID" use="optional"/> </xs:attributeGroup> <xs:element name="help"> <xs:complexType> <xs:sequence> <xs:element name="head"> <xs:complexType> <xs:sequence> <xs:element name="title" type="xs:string"/> </xs:sequence> <xs:attributeGroup ref="commonAtts"/> </xs:complexType> </xs:element> <xs:element name="body"> <xs:complexType> <xs:choice minOccurs="1" maxOccurs="unbounded"> <xs:element name="p"> <xs:complexType mixed="true"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="path"/> <xs:element ref="cmd"/> </xs:choice> <xs:attributeGroup ref="commonAtts"/> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:sequence> <xs:attributeGroup ref="its:att.version.attribute.version"/> </xs:complexType> </xs:element> <xs:element name="path"> <xs:complexType mixed="true"> <xs:attributeGroup ref="commonAtts"/> </xs:complexType> </xs:element> <xs:element name="cmd"> <xs:complexType mixed="true"> <xs:attributeGroup ref="commonAtts"/> </xs:complexType> </xs:element> </xs:schema>
[Source file: examples/xml/EX-ways-to-use-its-5.xsd ]
The first two approaches above can be likened to the use of CSS in [XHTML 1.0] . 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.
ITS 2.0 adds support for usage in HTML5. In HTML5, ITS local selection is realized via dedicated, data category specific attributes .
For the so-called “ global approach †in HTML5, this specification defines a link type for referring to files with global rules. These rules are then processed as described in Section 5.2.2: Global selection within HTML5 .
The link
element points to the rules file
EX-translateRule-html5-1.xml
The rel
attribute
identifies the ITS specific link relation <!DOCTYPE
html> ITS specific link relation
its-rules
.
<!DOCTYPE html> <html lang="en"> <head><meta charset="utf-8"/><meta charset="utf-8"><meta> <title>Translate flag global rules example</title><link href="EX-translateRule-html5-1.xml" rel="its-rules"/><link href="EX-translateRule-html5-1.xml" rel="its-rules"><link> </head> <body> <p>This sentence should be translated, but code names like the <code>span</code> element should not be translated.</p> </body> </html>
[Source file: examples/html5/EX-translate-html5-global-1.html ]
The rules file linked in Example 8 .
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"> <its:translateRule translate="no" selector="//h:code"/> </its:rules>
[Source file: examples/html5/EX-translateRule-html5-1.xml ]
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.
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.
Note:
“ 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.
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 Section 3.3: Data category for a definition of the term data categories, Section 6: Description of Data Categories for the definition of the various ITS data categories, and subsections in Section 6: Description of Data Categories 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 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 [XML Infoset] . ITS applications may implement inclusion mechanisms such as XInclude or DITA's [DITA 1.0] conref.
Content authors, for example, need a simple way to work with the Translate 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 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 Section 5: Processing of ITS information . 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 (specified at the XML node or HTML element to which it
pertains) or globally (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 [XML Names] ) may be used.
Ease of integration :
ITS follows the example from section 4 of [XLink 1.1] , 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 in [ITS REQ] . Only for some requirements do additional child elements have to be used, see for example Section 6.6: Ruby .
ITS has no dependency on technologies which are still under development development.
ITS fits with existing work in the W3C architecture (e.g. use of [XPath 1.0]
for the selection mechanism) mechanism).
This specification has been developed using the ODD ( One Document Does it all ) language of the Text Encoding Initiative ( [TEI] ). This is a literate programming language for writing XML schemas, with three characteristics:
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.
The content models for elements and attributes are written using embedded RELAX NG XML notation.
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 create documentation into HTML, XSL FO or LaTeX forms, and to generate RELAX NG documents and DTD. From the RELAX NG documents, James Clark's trang can be used to create XML Schema documents.
This section is informative.
Information (e.g. "translate this") captured by ITS markup (e.g.
its:translate='yes'
) always pertains to one or more XML of 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 [CSS 2.1] . 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. In
contrast to CSS, ITS usually uses XPath for
identifying nodes. 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 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). Since each usage defines some specific requirements, ITS markup may take different shapes.
[Ed. note:The following two examples sketch the distinction between the local and global approaches, using the translate as one example of ITS markup.
The document in Example 10 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.
<dbk:article<article xmlns="http://docbook.org/ns/docbook" xmlns:its="http://www.w3.org/2005/11/its"xmlns:dbk="http://docbook.org/ns/docbook"its:version="2.0" version="5.0" xml:lang="en"><dbk:info> <dbk:title>An example article</dbk:title> <dbk:author<info> <title>An example article</title> <author its:translate="no"><dbk:personname> <dbk:firstname>John</dbk:firstname> <dbk:surname>Doe</dbk:surname> </dbk:personname> <dbk:affiliation> <dbk:address> <dbk:email>foo@example.com</dbk:email> </dbk:address> </dbk:affiliation> </dbk:author> </dbk:info> <dbk:para>This is a short article.</dbk:para> </dbk:article><personname> <firstname>John</firstname> <surname>Doe</surname> </personname> <affiliation> <address> <email>foo@example.com</email> </address> </affiliation> </author> </info> <para>This is a short article.</para> </article>
[Source file: examples/xml/EX-basic-concepts-1.xml ]
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.
The document in Example 11 shows a
different approach to identifying non-translatable content, similar to that
used with a style
element in [XHTML 1.0] , 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
is set to "CSS"). "css"). Information for the handling of namespaces in these
path expressions is taken from namespace declarations [XML Names] at
the current rules rule
element.
Note:
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 .
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//*/@*
for example be rewritten as follows:
*[self::myElement]/@* | myElement//*/@*
<myTopic xmlns:its="http://www.w3.org/2005/11/its" xmlns="myNamescapeURI" id="topic01" xml:lang="en-us"> <prolog> <title>Using ITS</title> <its:rules version="2.0"> <its:translateRule selector="//n:term" translate="no"/> </its:rules> </prolog> <body> <p>ITS defines <term>data category</term> as an abstract concept for a particular type of information for internationalization and localization of XML schemas and documents.</p> </body> </myTopic>
[Source file: examples/xml/EX-basic-concepts-2.xml ]
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 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:
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 (for example the term
element in
DITA)
The power of the ITS selection mechanisms comes at a price: rules related to overriding/precedence , and inheritance , have to be established.
The document in Example 12 shows how
inheritance and overriding work for the Translate
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.
<text xmlns:its="http://www.w3.org/2005/11/its" > <head> <revision>Sep-10-2006 v5</revision> <author>Ealasaidh McIan</author> <contact>ealasaidh@hogw.ac.uk</contact> <title its:translate="yes">The Origins of Modern Novel</title> <its:rules version="2.0"> <its:translateRule translate="no" selector="/text/head"/> </its:rules> </head> <body> <div xml:id="intro"> <head>Introduction</head> <p>It would certainly be quite a <span its:translate="no">faux pas</span> to start a dissertation on the origin of modern novel without mentioning the <tl>Epic of Gilgamesh</tl>...</p> </div> </body> </text>
[Source file: examples/xml/EX-basic-concepts-3.xml ]
For some data categories, special attributes add or point to information about the selected nodes. For example, the Localization Note 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 . Pointing to existing information is not possible for data categories that express a closed set of values ; that is: Translate , Directionality , Locale Filter and Elements Within Text .
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.
This section is normative.
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 [RFC 2119] .
The namespace URI that MUST 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â€
[ Definition : Schema language refers in this specification to an XML-related modeling or validation language such as XML DTD, XML Schema, or RELAX NG.]
Note:
This specification provides schemas in the format of XML DTD, XML Schema, or RELAX NG. However, these schemas are only non-normative; conformance for ITS markup declarations 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.
[ Definition : 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 Section 6: Description of Data Categories
schema language independent formalization, see the "markup declarations" subsections in Section 6: Description of Data Categories
schema language specific implementations, see Appendix D: Schemas
E: Schemas for ITS
The Translate 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 DTD, an XML Schema document or an RELAX NG document. A different implementation would be a translateRule element that allows for specifying global rules about the Translate data category.
[ Definition : 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 Section 5: Processing of ITS information . Selection can be applied globally, see Section 5.2.1: Global, Rule-based Selection , and locally, see Section 5.2.3: Local Selection in an XML Document . As for global selection, ITS information can be added to the selected nodes, or it can point to existing information which is related to selected nodes.
Selection relies on the information that is given in the XML Information Set [XML Infoset] . ITS applications MAY implement inclusion mechanisms such as XInclude or DITA's [DITA 1.0] conref.
Note:
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 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. graphic and change the words therein.
<text xmlns:its="http://www.w3.org/2005/11/its" > <its:rules version="2.0"> <its:translateRule translate="yes" selector="//p/img/@src"/> </its:rules> ... <p>As you can see in <img src="instructions.jpg"/>, the truth is not always out there.</p> </text>
[Source file: examples/xml/EX-notation-terminology-1.xml ]
The attributes href , locNoteRef and termInfoRef which contain resource identifiers MUST allow the usage of Internationalized Resource Identifiers (IRIs, [RFC 3987] or its successor) to ease the adoption of ITS in international application scenarios.
Note:
The ITS schemas in Appendix
D: Schemas E: Schemas for ITS 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
[XML
Infoset] , where no difference between IRIs and URIs exists.
This section is normative.
The usage of the term conformance clause in this section is in compliance with [QAFRAMEWORK] .
This specification defines two types of conformance: conformance of 1) ITS markup declarations , and conformance of 2) processing expectations for ITS Markup . These conformance types complement each other. An implementation of this specification MAY use them separately or together.
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 Section 4.2: Conformance Type 2: The Processing Expectations for ITS Markup .
Definitions related to this conformance type: ITS markup declarations are defined in various subsections in Section 5: Processing of ITS information and Section 6: Description of Data Categories (e.g. Section 6.3.3: Markup Declarations for Localization Note ) in a schema language independent manner, relying on the ODD language. Their occurrence in other sections of this document is typographically marked via bold face and color.
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 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 be
part of the content model of at least one element declared in the schema. It
SHOULD be in a content model for meta
information, if this is available in that schema (e.g. the head
element in [XHTML 1.0] ).
1-3: If the ruby element is used, it SHOULD be declared as an inline element.
1-4: If the span element is used, it SHOULD 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 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 [XML i18n BP] .
Note:
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 , or declare them directly for each element. The appropriate
steps to integrate ITS into a schema depend on the design of this schema (e.g.
whether it already has a customization layer that uses parameter entities). The
ITS schemas in the format of XML DTD, XML Schema and RELAX NG in Appendix D: Schemas E: Schemas
for ITS are only informative examples.
Description: Processors need to compute the ITS information that pertains to a node in an XML document. The ITS processing expectations define how the computation has to be carried out. Correct computation involves support for selection mechanism , defaults / inheritance / overriding characteristics , and precedence . The markup MAY be valid against a schema which conforms to the clauses in Section 4.1: Conformance Type 1: ITS Markup Declarations .
Definitions related to this conformance type: The processing expectations for ITS markup make use of selection mechanisms defined in Section 5: Processing of ITS information . The individual data categories defined in Section 6: Description of Data Categories have defaults / inheritance / overriding characteristics , and allow for using ITS markup in various positions ( global and 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.
Note:
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 data category is not covered by the conformance clauses below.
Note:
The ITS Working group provides a test suite to help implementers to write applications that support the ITS specifications. The test suite provides pairs of input and output files.
Conformance clauses:
2-1: A processor MUST implement at least one data category . For each implemented data category , the following MUST be taken into account:
2-1-1: processing of at least one selection mechanism ( global or local ).
2-1-2: the default selections for the data category .
2-1-3: the precedence definitions
for selections defined in Section 5.4: Precedence 5.5: Precedence between Selections , for the
type of selections it processes.
2-2: If an application claims to process ITS markup for the global selection mechanism, it MUST process an XLink href attribute found on a rules elements.
Statements related to this conformance type MUST list all data categories they implement, and for each data category which type of selection they support.
This section is normative.
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 be in no namespace. If there is no rules element in an XML document, a prefixed ITS
version attribute
(e.g. its:version
) MUST 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 specify different versions.
Each XML document can have a different version. That is: if external rules are linked via an XLink href attribute on the rules element, they can specify a different version than the rules element.
ITS data categories can appear in two places:
Global rules : the selection is realized
within a rules element. It contains
rule elements for each data category. Each rule
element has a selector attribute and possibly other
attributes. The selector attribute contains an
AbsoluteLocationPath absolute selector as described
defined in XPath 1.0 or its
successor. [Ed. note: Above text needs to be updated to reflect queryLanguage
attribute] Section 5.3: Query Language of Selectors .
Locally in a document : 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 Section 6.1: Position, Defaults, Inheritance and Overriding of Data Categories .
The two locations are described in detail below.
Global, rule-based selection is implemented using the rules element. It contains zero or more rule elements . Each rule element has a mandatory selector attribute. This attribute and all other possible attributes on 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 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 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 . Pointing to existing information is not possible for data categories that express a closed set of values , that is: Translate , Directionality , Locale Filter , and 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 appear in the same rule element.
Another difference between adding and pointing is the
usage of XPath: [Ed. note: Update to reflect queryLanguage. Probably create
separate sections defining those things for XPath and CSS.] The value of the
selector attribute MUST be an XPath expression which starts with " / ". That
is, it must be an AbsoluteLocationPath as described in XPath 1.0 or its
successor. This ensures that the selection is not relative to a specific
location. The resulting nodes MUST be either element or attribute nodes.
Attributes that point to existing information in the document, i.e. attributes
whose name ends in ...Pointer , MUST use a RelativeLocationPath as described in
XPath 1.0 or its successor. 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 , rbcPointer ,
rtcPointer , rbspanPointer , langPointer . If namespaces [XML Names] are used
in XPath expressions in the selector attribute or the pointing attributes, the
following rules MUST be applied while processing XPath: For each prefix, there
MUST be a namespace declaration in effect at the same rule element which allows
to resolve the namespace URI of the prefix. Element and attribute names without
a prefix are interpreted as having no namespace. To avoid a conflict with rule
2., default namespaces MUST NOT be used in the XPath expressions. [Ed. note:
Need to define how default namespace work with HTML5.] Example 15: XPath
expressions with namespaces The term element from the TEI is in a namespace
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
<its:termRule selector="//tei:term" term="yes"/>
</its:rules> [Source file: examples/xml/EX-selection-global-1.xml ]
Example 16: XPath expressions without namespaces The qterm element from
DocBook is in no namespace. <its:rules
xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
<its:termRule selector="//qterm" term="yes"/>
</its:rules> [Source file: examples/xml/EX-selection-global-2.xml ]
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 Section 5.4: Precedence 5.5: Precedence between Selections .
Markup for global, rule-based selection is defined as follows.
[1] | rules |
::= | element its:rules { rules.content, rules.attributes } |
[2] | rules.content |
::= | param
*, ( translateRule | locNoteRule | termRule |
dirRule | rubyRule |
langRule | withinTextRule | domainRule | localeFilterRule | externalResourceRefRule | idValueRule )* |
[3] | rules.attributes |
::= | attribute version { xsd:float }, attribute xlink:href {
xsd:anyURI }?, attribute |
[4] | param |
::= | element its:param {
param.content, param.attributes } |
[5] | param.content |
::= | text |
[6] | param.attributes |
::= | attribute name { string
} |
|
att.selector.attributes |
::= | att.selector.attribute.selector |
|
att.selector.attribute.selector |
::= | attribute selector { string } |
|
att.version.attributes |
::= | att.version.attribute.version |
|
att.version.attribute.version |
::= | attribute its:version { xsd:float } |
Global rules work in HTML5 as follows.
Global rules will be attached externally using the link
element, with the link relation its-rules
.
In global rules XPath 1.0 will be used for selection.
If users prefer easier selection mechanism, they can switch query
language to CSS selectors by using the queryLanguage attribute, see Section 2.1.3: queryLanguage 5.3.1: Choosing Query Language .
Note:
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.
Local selection in XML documents is realized with local ITS 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 rb and
rt elements
themselves element can contain span . An application of ruby, however, MUST not use such arbitrary nesting.
The data category determines what is being selected. The necessary data category specific defaults are described in Section 6.1: Position, Defaults, Inheritance and Overriding of 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.
<text
xmlns:its="http://www.w3.org/2005/11/its"
its:version="2.0" xml:lang="en">
<head
its:translate="no">
<author>Sven Corneliusson</author>
<date>2006-09-26T17:34:04Z</date>
<title
its:translate="yes" role="header">Bidirectional Text</title>
</head>
<body>
<par>In Arabic, the title <quote xml:lang="ar"
its:dir="rtl">نشاط التدويل، W3C</quote>
means <quote>Internationalization Activity, W3C</quote>.</par>
</body>
</text>
[Source file: examples/xml/EX-selection-local-1.xml ]
Markup for local selection is defined as follows. The attribute group
att.local.no-ns.attributes contains
ITS attributes in no namespace and is used with the ITS elements span , locNote , ruby ,
rb , rt , rbc , rtc and rp .
The attribute group att.local.with-ns.attributes contains
namespace qualified ITS attributes and is used with elements from different
namespaces. The attribute group att.local.html5.attributes contains ITS
attribute for HTML5.
Note:
The dir
and translate attributes are
missing from HTML5.] 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 and Directionality .
|
att.local.no-ns.attributes |
::= | att.local.no-ns.attribute.translate
, att.local.no-ns.attribute.locNote
, att.local.no-ns.attribute.locNoteType
, att.local.no-ns.attribute.locNoteRef
, att.local.no-ns.attribute.termInfoRef
, att.local.no-ns.attribute.term
, att.local.no-ns.attribute.dir ,
att.local.no-ns.attribute.withinText
, |
|
att.local.no-ns.attribute.translate |
::= | attribute translate { "yes" | "no" }? |
|
att.local.no-ns.attribute.locNote |
::= | attribute locNote { string }? |
|
att.local.no-ns.attribute.locNoteType |
::= | attribute locNoteType { "alert" | "description"
}? |
|
att.local.no-ns.attribute.locNoteRef |
::= | attribute locNoteRef { xsd:anyURI }? |
|
att.local.no-ns.attribute.termInfoRef |
::= | attribute termInfoRef { xsd:anyURI }? |
|
att.local.no-ns.attribute.term |
::= | attribute term { "yes" | "no" }? |
|
att.local.no-ns.attribute.dir |
::= | attribute dir { "ltr" | "rtl" | "lro" | "rlo"
}? |
|
att.local.no-ns.attribute.withinText |
::= | attribute withinText { "yes" | "no" | "nested"
}? |
|
att.local.no-ns.attribute.localeFilterList |
::= | attribute localeFilterList { string }? |
|
att.local.with-ns.attributes |
::= | att.local.with-ns.attribute.translate
, att.local.with-ns.attribute.locNote
, att.local.with-ns.attribute.locNoteType
, att.local.with-ns.attribute.locNoteRef
, att.local.with-ns.attribute.termInfoRef
, att.local.with-ns.attribute.term
, att.local.with-ns.attribute.dir
, att.local.with-ns.attribute.withinText
, |
|
att.local.with-ns.attribute.translate |
::= | attribute its:translate { "yes" | "no" }? |
|
att.local.with-ns.attribute.locNote |
::= | attribute its:locNote { string }? |
|
att.local.with-ns.attribute.locNoteType |
::= | attribute its:locNoteType { "alert" | "description"
}? |
|
att.local.with-ns.attribute.locNoteRef |
::= | attribute its:locNoteRef { xsd:anyURI }? |
|
att.local.with-ns.attribute.termInfoRef |
::= | attribute its:termInfoRef { xsd:anyURI }? |
|
att.local.with-ns.attribute.term |
::= | attribute its:term { "yes" | "no" }? |
|
att.local.with-ns.attribute.dir |
::= | attribute its:dir { "ltr" | "rtl" | "lro" | "rlo"
}? |
|
att.local.with-ns.attribute.withinText |
::= | attribute its:withinText { "yes" | "no" | "nested"
}? |
|
att.local.with-ns.attribute.localeFilterList |
::= | attribute its:localeFilterList { string }? |
|
att.local.html5.attributes |
::= | att.local.html5.attribute.its-loc-note
, att.local.html5.attribute.its-loc-note-type
, att.local.html5.attribute.its-loc-note-ref
, att.local.html5.attribute.its-term-info-ref
, att.local.html5.attribute.its-term
, att.local.html5.attribute.its-within-text
, |
|
att.local.html5.attribute.its-loc-note |
::= | attribute its-loc-note { string }? |
|
att.local.html5.attribute.its-loc-note-type |
::= | attribute its-loc-note-type { "alert" | "description"
}? |
|
att.local.html5.attribute.its-loc-note-ref |
::= | attribute its-loc-note-ref { xsd:anyURI }? |
|
att.local.html5.attribute.its-term-info-ref |
::= | attribute its-term-info-ref { xsd:anyURI }? |
|
att.local.html5.attribute.its-term |
::= | attribute its-term { "yes" | "no" }? |
|
att.local.html5.attribute.its-within-text |
::= | attribute its-within-text { "yes" | "no" | "nested"
}? |
|
att.local.html5.attribute.locale-filter-list |
::= | attribute locale-filter-list { string }? |
[39] | span |
::= | element its:span { span.content, span.attributes } |
[40] | span.content |
::= | ( text | ruby | span )* |
[41] | span.attributes |
::= | att.local.no-ns.attributes |
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 is identified by xpath
value in queryLanguage attribute.
The absolute selector MUST be
an XPath expression which starts with " /
". That is, it must be
an AbsoluteLocationPath or union
of AbsoluteLocationPath s as
described in XPath 1.0
.This ensures that the selection is not relative to a
specific location. The resulting nodes MUST be
either element or attribute nodes.
Context for evaluatiation of the XPath expression is as follows:
Context node is set to 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 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 ; the default namespace (as declared by
xmlns
) is
not part of this set.
The term
element from the TEI is
in a namespace http://www.tei-c.org/ns/1.0
.
<its:rules xmlns:its="http://www.w3.org/2005/11/its" xmlns:tei="http://www.tei-c.org/ns/1.0" version="2.0"> <its:termRule selector="//tei:term" term="yes"/> </its:rules>
[Source file: examples/xml/EX-selection-global-1.xml ]
The term
element from DocBook
V4.5 is in no namespace.
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"> <its:termRule selector="//term" term="yes"/> </its:rules>
[Source file: examples/xml/EX-selection-global-2.xml ]
The relative selector MUST use a RelativeLocationPath as described in XPath 1.0 .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 .
[Ed. note: 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 are identified by
css
value
in queryLanguage attribute.
Absolute selector MUST be interpreted as selector as defined in Selectors Level 3 .Both simple selectors and groups of selectors can be used.
Relative selector MUST be interpreted as selector as defined in Selectors Level 3 .Selector is not evaluated against the complete document tree but only against subtrees rooted at nodes selected by selector in the selector attribute.
ITS processors MAY support additional query languages. For each additional query language processor MUST 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 define additional query languages. The following query language
identifiers are reserved: xpath
,css
,xpath2
,xpath3
,xquery
,xquery3
,xslt2
,xslt3
.
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 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 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 [XML Names] .The content of the element is a string used as default value for the corresponding variable.
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.
<doc xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> <its:rules version="2.0"> <its:param name="LCID">0x0409</its:param> <its:translateRule selector="/doc" translate="no"/> <its:translateRule selector="//msg[@lcid=$LCID]" translate="yes"/> </its:rules> <msg lcid="0x0409" num="1">Create a folder</msg> <msg lcid="0x0411" num="1">フォルダーを作æˆã™ã‚‹</msg> <msg lcid="0x0407" num="1">Erstellen Sie einen Ordner</msg> <msg lcid="0x040c" num="1">Créer un dossier</msg> </doc>
[Source file: examples/xml/EX-param-in-global-rules-1.xml ]
Note:
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 attribute name's value to distinguish between the ITS parameters and the XSLT parameters.
One way to associate a document with a set of external ITS rules is to use the optional XLink [XLink 1.1] 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 be processed as if they were at the top of the rules element with the XLink href
attribute.
The example demonstrates how metadata can be added to ITS rules.
<myFormatInfo xmlns:its="http://www.w3.org/2005/11/its" > <desc>ITS rules used by the Open University</desc> <hostVoc>http://www.tei-c.org/ns/1.0</hostVoc> <rulesId>98ECED99DF63D511B1250008C784EFB1</rulesId> <rulesVersion>v 1.81 2006/03/28 07:43:21</rulesVersion> ... <its:rules version="2.0"> <its:translateRule selector="//header" translate="no"/> <its:translateRule selector="//term" translate="no"/> <its:termRule selector="//term" term="yes"/> <its:withinTextRule withinText="yes" selector="//term | //b"/> </its:rules> </myFormatInfo>
[Source file: examples/xml/EX-link-external-rules-1.xml ]
<myDoc xmlns:its="http://www.w3.org/2005/11/its" xmlns:xlink="http://www.w3.org/1999/xlink" > <header> <its:rules version="2.0" xlink:href="EX-link-external-rules-1.xml"> <its:translateRule selector="//term" translate="yes"/> </its:rules> <author>Theo Brumble</author> <lastUpdate>Apr-01-2006</lastUpdate> </header> <body> <p>A <term>Palouse horse</term> has a spotted coat.</p> </body> </myDoc>
[Source file: examples/xml/EX-link-external-rules-2.xml ]
The result of processing the two documents above is the same as processing the
following document. document.
<myDoc xmlns:its="http://www.w3.org/2005/11/its" > <header> <its:rules version="2.0"> <its:translateRule selector="//header" translate="no"/> <its:translateRule selector="//term" translate="no"/> <its:termRule selector="//term" term="yes"/> <its:withinTextRule withinText="yes" selector="//term | //b"/> <its:translateRule selector="//term" translate="yes"/> </its:rules> <author>Theo Brumble</author> <lastUpdate>Apr-01-2006</lastUpdate> </header> <body> <p>A <term>Palouse horse</term> has a spotted coat.</p> </body> </myDoc>
[Source file: examples/xml/EX-link-external-rules-3.xml ]
Applications processing global ITS markup MUST recognize the XLink href attribute in the rules element; they MUST 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.
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 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
[Ed. note: Define how HTML5 link works with precedence.]
Note:
If identical selections are defined in different rules elements within one document, the selection defined by the last takes precedence.
Note:
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 Section 6.1: Position, Defaults, Inheritance and Overriding of Data Categories
In case of conflicts between global selections via multiple rules elements, the last selector rule has higher
precedence.
Note:
The precedence order fulfills the same purpose as the built-in template rules of [XSLT 1.0] . Override semantics are always complete, that is all information that is specified in one rule element is overridden by the next one.
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.
<text xmlns:its="http://www.w3.org/2005/11/its" > <prolog> <its:rules version="2.0"> <its:withinTextRule withinText="yes" selector="//title|//author"/> <its:withinTextRule withinText="no" selector="//prolog/title|//prolog/author"/> </its:rules> <title>Designing User Interfaces</title> <author>Janice Prakash</author> <keywords>user interface, ui, software interface</keywords> </prolog> <body> <p>The book <title>Of Mice and Screens</title> by <author>Aldus Brandywine</author> is one of the best introductions to the vast topic of designing user interfaces.</p> </body> </text>
[Source file: examples/xml/EX-selection-precedence-1.xml ]
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 Section 5.2.1: Global, Rule-based Selection .
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 [DITA 1.0] format can use its translate attribute to apply to “transcluded†content, going beyond the ITS 2.0 local selection mechanism, but not contradicting it.
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 data category.
<topic xmlns:its="http://www.w3.org/2005/11/its" id="myTopic"> <title>The ITS Topic</title> <prolog> <its:rules version="2.0"> <its:translateRule selector="//*[@translate='no']" translate="no"/> <its:translateRule selector="//*[@translate='yes']" translate="yes"/> <its:termRule selector="//term | //dt" term="yes"/> </its:rules> </prolog> <body> <dl> <dlentry id="tDataCat"> <dt>Data category</dt> <dd>ITS defines <term>data category</term> as an abstract concept for a particular type of information related to internationalization and localization of XML schemas and documents.</dd> </dlentry> </dl> <p>For the implementation of ITS, apply the rules in the order:</p> <ul> <li>Defaults</li> <li>Rules in external files</li> <li>Rules in the document</li> <li>Local attributes</li> </ul> <p> <ph translate="no" xml:lang="fr">Et voilà !</ph>.</p> </body> </topic>
[Source file: examples/xml/EX-associating-its-with-existing-markup-1.xml ]
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 Example 22 23
with a link to an external rules file using the XLink href attribute, as shown in
Example 18 19
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.
This section is normative.
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 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 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.
Overriding describes whether ITS information can be overridden or not. Overriding is only applicable for data categories with inheritance. Overriding thus is not applicable for the Terminology and the Ruby data category.
Data category | Local Usage | Global, rule-based selection | Global adding of information | Global pointing to existing information | Default Values | Inheritance | Overriding | HTML5 examples |
Translate | 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 | Yes | tbd |
Localization Note | Yes | Yes | Yes | Yes | None | Textual content of element, including content of child elements, but excluding attributes | Yes | tbd |
Terminology | Yes | Yes | Yes | Yes | term="no" |
None | Not applicable | tbd |
Directionality | Yes | Yes | Yes | No | dir="ltr" |
Textual content of element, including attributes and child elements | Yes | tbd |
Ruby | Yes | Yes | Yes | Yes | None | None | Not applicable | tbd |
Language Information | No | Yes | No | Yes | None | Textual content of element, including attributes and child elements | Yes | tbd |
Elements Within Text |
|
Yes | Yes | No | withinText="no" |
None | Not applicable | tbd |
Domain | No | Yes | Yes | Yes | None | Textual content of element, including attributes and child elements | Yes | tbd |
Disambiguation | Yes | Yes | Yes | Yes | None | None | Not applicable | tbd |
Locale Filter | Yes | Yes | Yes | No |
|
Textual content of element, including attributes and child elements | Yes | tbd |
External Resource | No | Yes | No | Yes | None | None | Not applicable | tbd |
Target Pointer | No | Yes | No | Yes | None | None | Not applicable | tbd |
Id Value | No | Yes | No | Yes | None | None | Not applicable | tbd |
Preserve Space | Yes | Yes | Yes | No | default |
Textual content of element, including attributes and child elements | Yes | tbd |
Localization Quality Issue | Yes | Yes | Yes | Yes | None | Textual content of element, including child elements, but excluding attributes | Yes | tbd |
Localization Quality Précis | Yes | Yes | Yes | Yes | None | Textual content of element, including child elements, but excluding attributes | Yes | tbd |
In this example, the content of all the data
elements is
translatable because the default for the Translate
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.
<Res xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> <prolog its:translate="no"> <revision>Sep-07-2006</revision> <its:rules version="2.0"> <its:translateRule selector="//msg/notes" translate="no"/> <its:locNoteRule locNoteType="description" selector="//msg/data"> <its:locNote>The variable {0} is the name of the host.</its:locNote> </its:locNoteRule> </its:rules> </prolog> <body> <msg id="HostNotFound"> <data>Host {0} cannot be found.</data> </msg> <msg id="HostDisconnected"> <data>The connection with {0} has been lost.</data> </msg> <msg id="FileNotFound"> <data its:locNote="{0} is a filename">{0} not found.</data> </msg> </body> </Res>
[Source file: examples/xml/EX-datacat-behavior-1.xml ]
Note:
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 data category is the textual content.
The Translate 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).
The Translate data category can be expressed with global rules, or locally on an individual element. The information applies 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:
[Ed. note: All selector related definitions has to be update to reflect queryLanguage]A required selector attribute. It contains an
XPath expression absolute selector which
selects the nodes to which this rule applies.
A required translate attribute with the value "yes" or "no".
The translateRule element
specifies that the elements code
must not be translated.
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"> <its:translateRule translate="no" selector="//code"/> </its:rules>
[Source file: examples/xml/EX-translate-selector-1.xml ]
LOCAL: The following local markup is available for the Translate data category:
A translate attribute with the value "yes" or "no".
Note:
It is not possible to override the Translate
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 local its:translate="no"
specifies that the content of
panelmsg
must not be translated.
<messages xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> <msg num="123">Click Resume Button on Status Display or <panelmsg its:translate="no">CONTINUE</panelmsg> Button on printer panel</msg> </messages>
[Source file: examples/xml/EX-translate-selector-2.xml ]
The local translate="no"
attribute specifies that the content
of <!DOCTYPE html> span
must
not be translated.
<!DOCTYPE html> <html lang="en"> <head><meta charset="utf-8"/><meta charset="utf-8"><meta> <title>Translate flag test: Default</title> </head> <body> <p>The <span translate="no">World Wide Web Consortium</span> is making the World Web Web worldwide!</p> </body> </html>
[Source file: examples/html5/EX-translate-html5-local-1.html ]
Note:
Note: translate
has been adopted as a native HTML5 attribute,
and so appears in HTML files without the its- prefix, unlike other ITS data
categories like localizationNote
and Terminology
.
[42] | translateRule |
::= | element its:translateRule { translateRule.content, translateRule.attributes
} |
[43] | translateRule.content |
::= | empty |
[44] | translateRule.attributes |
::= | att.selector.attributes , attribute
translate { "yes" | "no" } |
[45] | att.translate.attributes |
::= | att.translate.attribute.translate |
[46] | att.translate.attribute.translate |
::= | attribute its:translate { "yes" | "no" }? |
[47] | att.translate.html5.attributes |
::= | att.translate.html5.attribute.translate |
[48] | att.translate.html5.attribute.translate |
::= | attribute translate { "yes" | "no" }? |
The Localization Note 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.
The Localization Note data category can be expressed with global rules, or locally on an individual element. The information applies 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
XPath expression absolute selector 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 .
A locNotePointer attribute that contains a
relative XPath
expression selector 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 XPath
expression selector pointing to a
node that holds the URI referring to the location of the localization
note.
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.
<myRes xmlns:its="http://www.w3.org/2005/11/its" > <head> <its:rules version="2.0" its:translate="no"> <its:locNoteRule locNoteType="alert" selector="//msg[@id='DisableInfo']"> <its:locNote>The variable {0} has three possible values: 'printer', 'stacker' and 'stapler options'.</its:locNote> </its:locNoteRule> </its:rules> </head> <body> <msg id="DisableInfo">The {0} has been disabled.</msg> </body> </myRes>
[Source file: examples/xml/EX-locNote-element-1.xml ]
The locNotePointer
attribute is a relative XPath
expression pointing to a node that holds the note. selector pointing to a node that holds the note.
<Res xmlns:its="http://www.w3.org/2005/11/its" > <prolog> <its:rules version="2.0"> <its:translateRule selector="//msg/notes" translate="no"/> <its:locNoteRule locNoteType="description" selector="//msg/data" locNotePointer="../notes"/> </its:rules> </prolog> <body> <msg id="FileNotFound"> <notes>Indicates that the resource file {0} could not be loaded.</notes> <data>Cannot find the file {0}.</data> </msg> <msg id="DivByZero"> <notes>A division by 0 was going to be computed.</notes> <data>Invalid parameter.</data> </msg> </body> </Res>
[Source file: examples/xml/EX-locNotePointer-attribute-1.xml ]
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.
<myRes xmlns:its="http://www.w3.org/2005/11/its" > <head> <its:rules version="2.0"> <its:locNoteRule locNoteType="description" selector="//msg[@id='NotFound']" locNoteRef="ErrorsInfo.html#NotFound"/> </its:rules> </head> <body> <msg id="NotFound">Cannot find {0} on {1}.</msg> </body> </myRes>
[Source file: examples/xml/EX-locNoteRef-attribute-1.xml ]
The locNoteRefPointer attribute contains a relative XPath expression
selector pointing to a
node that holds the URI referring to the location of the note.
to a node that holds the URI referring to the location
of the note.
<dataFile xmlns:its="http://www.w3.org/2005/11/its" > <prolog> <its:rules version="2.0"> <its:locNoteRule locNoteType="description" selector="//data" locNoteRefPointer="../@noteFile"/> </its:rules> </prolog> <body> <string id="FileNotFound" noteFile="Comments.html#FileNotFound"> <data>Cannot find the file {0}.</data> </string> <string id="DivByZero" noteFile="Comments.html#DivByZero"> <data>Invalid parameter.</data> </string> </body> </dataFile>
[Source file: examples/xml/EX-locNoteRefPointer-attribute-1.xml ]
LOCAL: The following local markup is available for the Localization Note 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".
<msgList xmlns:its="http://www.w3.org/2005/11/its" xml:space="preserve" its:version="2.0"> <data name="LISTFILTERS_VARIANT" its:locNote="Keep the leading space!" its:locNoteType="alert"> <value> Variant {0} = {1} ({2})</value> </data> <data its:locNote="%1\$s is the original text's date in the format YYYY-MM-DD HH:MM always in GMT"> <value>Translated from English content dated <span id="version-info">%1\$s</span> GMT.</value> </data> </msgList>
[Source file: examples/xml/EX-locNote-selector-2.xml ]
<!DOCTYPE html> <html lang="en"> <head><meta charset="utf-8"/><meta charset="utf-8"><meta> <title>LocNote test: Default</title> </head> <body> <p>This is a <span its-loc-note="Check with terminology engineer" its-loc-note-type="alert">motherboard</span>.</p> </body> </html>
[Source file: examples/html5/EX-locNote-html5-local-1.html ]
Note:
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.
[49] | locNoteRule |
::= | element its:locNoteRule { locNoteRule.content, locNoteRule.attributes } |
[50] | locNoteRule.content |
::= | locNote ? |
[51] | locNoteRule.attributes |
::= | att.selector.attributes , attribute
locNotePointer { string }?, attribute locNoteType { "alert" |
"description" }, attribute locNoteRef { xsd:anyURI }?, attribute
locNoteRefPointer { string }? |
[52] | locNote |
::= | element its:locNote { locNote.content, locNote.attributes } |
[53] | locNote.content |
::= | ( text | ruby | span )* |
[54] | locNote.attributes |
::= | att.local.no-ns.attributes |
[55] | att.locNote.attributes |
::= | att.locNote.attribute.locNote ,
att.locNote.attribute.locNoteType
, att.locNote.attribute.locNoteRef |
[56] | att.locNote.attribute.locNote |
::= | attribute its:locNote { string }? |
[57] | att.locNote.attribute.locNoteType |
::= | attribute its:locNoteType { "alert" | "description"
}? |
[58] | att.locNote.attribute.locNoteRef |
::= | attribute its:locNoteRef { xsd:anyURI }? |
[59] | att.locNote.html5.attributes |
::= | att.locNote.html5.attribute.its-loc-note
, att.locNote.html5.attribute.its-loc-note-type
, att.locNote.html5.attribute.its-loc-note-ref |
[60] | att.locNote.html5.attribute.its-loc-note |
::= | attribute its-loc-note { string }? |
[61] | att.locNote.html5.attribute.its-loc-note-type |
::= | attribute its-loc-note-type { "alert" | "description"
}? |
[62] | att.locNote.html5.attribute.its-loc-note-ref |
::= | attribute its-loc-note-ref { xsd:anyURI }? |
The 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.
Note:
Existing terminology standards such as [ISO 30042] and its derived formats are about coding terminology data, while the ITS Terminology data category simply allows to identify terms in XML documents and optionally to point to corresponding information.
The 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
XPath expression absolute selector which
selects the nodes to which this rule applies.
A required term attribute with the value "yes" or "no".
Exactly one of the following:
A termInfoPointer attribute that contains a
relative XPath
expression selector 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 XPath
expression selector pointing to a
node that holds the URI referring to the location
of the terminology information. the URI
referring to the location of the terminology information.
<text xmlns:its="http://www.w3.org/2005/11/its" > <its:rules version="2.0"> <its:termRule selector="//term" term="yes" termInfoPointer="id(@def)"/> </its:rules> <p>We may define <term def="TDPV">discoursal point of view</term> as <gloss xml:id="TDPV">the relationship, expressed through discourse structure, between the implied author or some other addresser, and the fiction.</gloss> </p> </text>
[Source file: examples/xml/EX-terms-selector-1.xml ]
<text xmlns:its="http://www.w3.org/2005/11/its" > <its:rules version="2.0"> <its:termRule selector="//term[1]" term="yes" termInfoRef="#TDPV"/> </its:rules> <p>We may define <term>discoursal point of view</term> as <gloss xml:id="TDPV">the relationship, expressed through discourse structure, between the implied author or some other addresser, and the fiction.</gloss> </p> </text>
[Source file: examples/xml/EX-terms-selector-2.xml ]
<text xmlns:its="http://www.w3.org/2005/11/its" > <its:rules version="2.0"> <its:termRule selector="//term" term="yes" termInfoRefPointer="@target"/> </its:rules> <p>We may define <term target="#TDPV">discoursal point of view</term> as <gloss xml:id="TDPV">the relationship, expressed through discourse structure, between the implied author or some other addresser, and the fiction.</gloss> </p> </text>
[Source file: examples/xml/EX-terms-selector-3.xml ]
LOCAL: The following local markup is available for the 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.
<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> <head>...</head> <body> ... <p>And he said: you need a new <quote its:term="yes">motherboard</quote> </p> ... </body> </book>
[Source file: examples/xml/EX-terms-selector-4.xml ]
<!DOCTYPE html> <html lang="en"> <head><meta charset="utf-8"/><meta charset="utf-8"><meta> <title>Terminology test: default</title> </head> <body> <p>We need a new <span its-term="yes">motherboard</span> </p> </body> </html>
[Source file: examples/html5/EX-term-html5-local-1.html ]
[63] | termRule |
::= | element its:termRule { termRule.content, termRule.attributes } |
[64] | termRule.content |
::= | empty |
[65] | termRule.attributes |
::= | att.selector.attributes , attribute
term { "yes" | "no" }, attribute termInfoRef { xsd:anyURI }?,
attribute termInfoRefPointer { string }?, attribute termInfoPointer {
string }? |
[66] | att.term.attributes |
::= | att.term.attribute.termInfoRef
, att.term.attribute.term |
[67] | att.term.attribute.termInfoRef |
::= | attribute its:termInfoRef { xsd:anyURI }? |
[68] | att.term.attribute.term |
::= | attribute its:term { "yes" | "no" }? |
[69] | att.term.html5.attributes |
::= | att.term.html5.attribute.its-term-info-ref
, att.term.html5.attribute.its-term |
[70] | att.term.html5.attribute.its-term-info-ref |
::= | attribute its-term-info-ref { xsd:anyURI }? |
[71] | att.term.html5.attribute.its-term |
::= | attribute its-term { "yes" | "no" }? |
The 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".
Note:
ITS defines only the values of the 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 [Bidi Article] .
dir
to reflect HTML5.]
The Directionality data category can be expressed with global rules, or locally on an individual element. The information applies 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
XPath expression absolute selector which
selects the nodes to which this rule applies.
A required dir attribute with the value "ltr", "rtl", "lro" or "rlo".
In this document the right-to-left directionality is marked using a
direction
attribute with a value "rtlText".
<text xml:lang="en">
<body>
<par>In Hebrew, the title <quote xml:lang="he" direction="rtlText">פעילות ×”×‘×™× ×ו×, W3C</quote>
means <quote>Internationalization Activity, W3C</quote>.</par>
</body>
</text>
[Source file: examples/xml/EX-dir-selector-1.xml ]
The dirRule element indicates
that all elements with an attribute
direction="rtlText"
have right-to-left content.
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"> <its:dirRule dir="rtl" selector="//*[@direction='rtlText']"/> </its:rules>
[Source file: examples/xml/EX-dir-selector-2.xml ]
LOCAL: The following local markup is available for the Directionality data category:
A dir attribute with the value "ltr", "rtl", "lro" or "rlo".
On the first quote
element, the its:dir="rtl"
attribute indicates a right-to-left content.
<text
xmlns:its="http://www.w3.org/2005/11/its" xml:lang="en"
its:version="2.0">
<body>
<par>In Arabic, the title <quote xml:lang="ar"
its:dir="rtl">نشاط التدويل، W3C</quote>
means <quote>Internationalization Activity, W3C</quote>.</par>
</body>
</text>
[Source file: examples/xml/EX-dir-selector-3.xml ]
<!DOCTYPE html> <html lang="en"> <head><meta charset="utf-8"/><meta charset="utf-8"><meta> <title>Dir test: Default</title> </head> <body> <p>In Arabic, the title <quote xml:lang="ar" dir="rtl">نشاط التدويل، W3C</quote> means <quote>Internationalization Activity, W3C</quote>.</p> </body> </html>
[Source file: examples/html5/EX-dir-html5-local-1.html ]
Note:
Note: dir
is a native HTML5 data category and so does not
require the its- prefix used by most data categories in HTML5
representations.
[72] | dirRule |
::= | element its:dirRule { dirRule.content, dirRule.attributes } |
[73] | dirRule.content |
::= | empty |
[74] | dirRule.attributes |
::= | att.selector.attributes , attribute
dir { "ltr" | "rtl" | "lro" | "rlo" } |
[75] | att.dir.attributes |
::= | att.dir.attribute.dir |
[76] | att.dir.attribute.dir |
::= | attribute its:dir { "ltr" | "rtl" | "lro" | "rlo"
}? |
[77] | att.dir.html5.attributes |
::= | att.dir.html5.attribute.dir |
[78] | att.dir.html5.attribute.dir |
::= | attribute dir { "ltr" | "rtl" | "lro" | "rlo"
}? |
The Ruby 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.
The Ruby 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
XPath expression absolute selector which
selects the nodes to which this rule applies. This is the ruby base
text.
An optional rubyPointer attribute that contains a relative XPath expression
selector pointing to a node that
corresponds to the ruby element.
An optional rpPointer attribute that contains a relative XPath expression pointing to a
node that corresponds to the ruby parenthesis. An optional rbcPointer
attribute that contains a relative XPath expression pointing to a node that
corresponds to the ruby base container. An optional rtcPointer
selector attribute
that contains a relative XPath expression pointing to a node that
corresponds to the ruby text container. An optional
rbspanPointer attribute that contains a relative XPath expression pointing
to a node that corresponds to the rbspan attribute. parenthesis.
An optional rubyText element that contains the ruby text.
An optional rtPointer attribute that contains a relative XPath expression
selector pointing to a node that
corresponds to the ruby text.
Note:
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. element.
<text xmlns:its="http://www.w3.org/2005/11/its" > <head> ... <its:rules version="2.0"> <its:rubyRule selector="/text/body/img[1]/@alt"> <its:rubyText>World Wide Web Consortium</its:rubyText> </its:rubyRule> </its:rules> </head> <body> <img src="w3c_home.png" alt="W3C"/> ... </body> </text>
[Source file: examples/xml/EX-ruby-legacy-1.xml ]
LOCAL: In a document, the Ruby data category is realized with a ruby element. It contains the following:
An rb The ruby base
text or span element that contains the ruby base text and
allows for local ITS markup .
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 . It has an optional rbspan attribute. The rbspan
attribute allows an text.
An rt element that contains the ruby text and allows for local ITS markup.
All these elements share the attributes of the span element.
<text xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> <head> ... </head> <body> <p>ã“ã®æœ¬ã¯ <its:ruby><its:rb>慶応義塾大å¦</its:rb> <its:rp>(</its:rp>æ…¶å¿œç¾©å¡¾å¤§å¦ <its:rp>(</its:rp> <its:rt>ã‘ã„ãŠã†ãŽã˜ã‚…ãã ã„ãŒã</its:rt> <its:rp>)</its:rp> </its:ruby>ã®æ´å²ã‚’説明ã™ã‚‹ã‚‚ã®ã§ã™ã€‚</p> </body> </text>
[Source file: examples/xml/EX-ruby-implementation-1.xml ]
Note:
The structure of the content model for the ruby element is identical with the structure of ruby markup as
defined in [Ruby-TR] [HTML5] . An
implementation of the Ruby data category is encouraged, but not mandated
follow the conformance criteria for ruby defined in that
specification.
The structure of ruby defined in section 5.4 of [OpenDocument] is also compliant with ruby defined in this specification.
[79] | rubyRule |
::= | element its:rubyRule { rubyRule.content, rubyRule.attributes } |
[80] | rubyRule.content |
::= | rubyText ? |
[81] | rubyRule.attributes |
::= | att.selector.attributes , attribute
rubyPointer { string }?, attribute rtPointer { string }?, attribute
rpPointer { string |
[82] | rubyText |
::= | element its:rubyText { rubyText.content, rubyText.attributes } |
[83] | rubyText.content |
::= | text |
[84] | rubyText.attributes |
::= | att.local.no-ns.attributes |
[85] | ruby |
::= | element its:ruby { ruby.content, ruby.attributes } |
[86] | ruby.content |
::= | ( |
[87] | ruby.attributes |
::= | att.local.no-ns.attributes |
|
rt |
::= | element its:rt { rt.content, rt.attributes } |
|
rt.content |
::= | ( text | span )* |
|
rt.attributes |
::= | att.local.no-ns.attributes |
|
rp |
::= | element its:rp { rp.content, rp.attributes } |
|
rp.content |
::= | text |
|
rp.attributes |
::= | att.local.no-ns.attributes |
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 use values that conform to
[BCP47] .
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.
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 elements, and expresses
language using values conformant to [BCP47].
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"> <its:langRule selector="//p" langPointer="@mylangattribute"/> </its:rules>
[Source file: examples/xml/EX-lang-definition-1.xml ]
Note:
The 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 Example 44 45 ).
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 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 ( [BCP47] is the "Best Common Practice" for language
identification and encompasses [RFC
3066] and its successors.)
The Language Information data category can be expressed only with global rules. The information applies 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
XPath expression absolute selector which
selects the nodes to which this rule applies.
A required langPointer attribute that contains a relative XPath expression
selector pointing to a node that contains
language information.
|
langRule |
::= | element its:langRule { langRule.content, langRule.attributes } |
|
langRule.content |
::= | empty |
|
langRule.attributes |
::= | att.selector.attributes , attribute
langPointer { string } |
The 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 [XHTML 1.0] :
<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
[DITA 1.0] :
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>
The 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
XPath expression absolute selector which
selects the nodes to which this rule applies.
A required withinText attribute with the
value "yes", "no" or "nested". "no" or "nested".
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"> <its:withinTextRule withinText="yes" selector="//b | //em | //i"/> </its:rules>
[Source file: examples/xml/EX-within-text-implementation-1.xml ]
LOCAL: The following local markup is available for the Elements Within Text data category:
A withinText attribute with the values "yes", "no" or "nested".
<text xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> <body> <par>Text with <bold its:withinText="yes">bold</bold>.</par> </body> </text>
[Source file: examples/xml/EX-within-text-local-1.xml ]
<!DOCTYPE html> <html lang="en"> <head><meta charset="utf-8"/><meta charset="utf-8"><meta> <title>Within text test: Default</title> </head> <body> <p>Text with <span its-within-text="yes">bold</span>.</p> </body> </html>
[Source file: examples/html5/EX-within-text-local-html5-1.html ]
|
withinTextRule |
::= | element its:withinTextRule { withinTextRule.content,
withinTextRule.attributes
} |
|
withinTextRule.content |
::= | empty |
|
withinTextRule.attributes |
::= | att.selector.attributes , attribute
withinText { "yes" | "no" | "nested" } |
|
att.withinText.attributes |
::= | att.withinText.attribute.withinText |
|
att.withinText.attribute.withinText |
::= | attribute its:withinText { "yes" | "no" | "nested"
}? |
|
att.withinText.html5.attributes |
::= | att.withinText.html5.attribute.its-within-text |
|
att.withinText.html5.attribute.its-within-text |
::= | attribute its-within-text { "yes" | "no" | "nested"
}? |
The Domain data category is used to identify the domain of content.
This data category addresses various challenges:
Often domain related information in content does exist, e.g. keywords in
the HTML meta
element. The Domain data
category addresses this by providing a mechanism to point to this
information.
There are many flat or structured lists of domain related values, keywords, key phrases, classification codes, ontologies. The Domain data category does not propose a given list; rather it provides a mapping mechanism to associate values in content with consumer tool specific values needed for processing domain information.
The Domain data category can be expressed only with global rules. The information applies to the textual content of the element, including child elements and attributes. There is no default.
GLOBAL: The domainRule element contains the following:
A required selector attribute. It contains an
XPath expression absolute selector which
selects the nodes to which this rule applies.
A required domainPointer attribute that contains a
relative XPath expression
selector 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 be delimited by quotation marks, that is pairs of APOSTROPHE (Unicode code point U+0027) or QUOTATION MARK (U+0023).
Note:
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
expresses that the content of the HTML body
element is in the
domain expressed by the HTML meta
element with the
name
attribute, value DC.Subject
. The domainPointer attribute points to that domainPointer attribute points to that
meta
element.
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"> <its:domainRule selector="/html/body" domainPointer="/html/head/meta[@name='DC.subject']/@content"/> </its:rules>
[Source file: examples/xml/EX-domain-1.xml ]
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.
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"> <its:domainRule selector="/html/body" domainPointer="/html/head/meta[@name='DC.subject']/@content" domainMapping="automotive auto, medical medicine, 'criminal law' law, 'property law' law"/> </its:rules>
[Source file: examples/xml/EX-domain-2.xml ]
Note:
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="DC.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.
|
domainRule |
::= | element its:domainRule { domainRule.content, domainRule.attributes } |
|
domainRule.content |
::= | empty |
|
domainRule.attributes |
::= | att.selector.attributes , attribute
domainPointer { string }, attribute domainMapping { string
}? |
The Disambiguation data category is used to communicate the mentions 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 entity, for example, when handling personal names, product names or geographic names, chemical compounds, protein names and similar.
We introduce the following concepts:
Entity Type Source: a domain of valid values, an
identifier collection for entity types. Unless specified, it will be
defined derived by
default de-referencing mechanisms for the URI.
Entity Type: the type of the entity, being one of values within the entity type source identifier collection.
Disambiguation type: the level of disambiguation
(lexical concept, ontology concept, entity). The disambiguation can happen
at multiple levels. For instance, the level of lexical concepts
disambiguates individual word surface forms, the level of ontology concepts
disambiguates into deeper semantics, and the entity disambiguation works on
the level of concrete instances. 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 updated
version RDF ontology concept of a City that
could represent a subclass of a PopulatedPlace,
or the center area of a particular city, e.g. London City.
Disambiguation Source: the identifier collection source used for locating the correct underlying identifier. It can be anything that can representing a collection of identifiers for words, concepts or entities, for instance, a knowledge base, an ontology or semantic network. Unless specified, it will be derived by default de-referencing mechanisms for the URI.
Disambiguation Identifier: an identifier, unique within the current disambiguation identifier collection, specifying the actual identifier (meaning, concept or entity) behind the selected content.
Two types of Disambiguation data categories are needed to identify:
Entity type, which describes the type of the underlying entity within a particular domain of types, as specified by the type source identifier collection.
Disambiguation, which describes the actual underlying identifier or meaning that the mention refers to, either in a knowledge base, ontology or in a semantic network.
Text analysis engines, such as named entity
recognizers, named entity, concept and word sense disambiguators can offer an
easy way to create this document. For details
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.
The Disambiguation data category can be
expressed with global rules, or locally on an individual element. The
information applies to the textual content of the proposed element. There is no
inheritance. The entity type follows inheritance rules.
GLOBAL: The disambiguationRule element contains the following:
A required selector attribute. It contains an absolute selector which selects the nodes to which this rule applies.
An optional entityTypeSourceRef attribute
that contains a URI specifying the concrete identifier data
category, see source
(knowledge base, semantic network), used to determine the entity
type.
An optional entityTypeSourcePointer attribute that contains a relative XPath expression pointing to a node that represents the identifier data source (knowledge base, semantic network), used to determine the entity type.
An optional entityTypeSourceRefPointer attribute that contains a relative XPath expression pointing to a node that holds the URI that represents the identifier data source (knowledge base, semantic network), used to determine the entity type.
An optional entityTypeRef attribute that contains a URI, specifying the entity type behind the selector.
An optional entityTypePointer attribute that contains a relative XPath expression pointing to a node specifying the entity type behind the selector.
An optional entityTypeRefPointer attribute that contains a relative XPath expression pointing to a node that holds the URI that specifies the entity type behind the selector.
An optional disambigType attribute that contains a string, specifying the specific semantics of the disambiguation. It can be one of "lexicalConcept", "ontologyConcept", or "entity".
An optional disambigSourceRef attribute. It contains a URI representing the disambiguation identifier collection source.
An optional disambigSourcePointer attribute. It contains a relative XPath expression pointing to a node that represents the disambiguation identifier collection source.
An optional disambigSourceRefPointer attribute. It contains a relative XPath expression pointing to a node that holds the URI that represents the disambiguation identifier collection source.
An optional disambigIdentRef attribute. It contains a URI that represents a unique identifier within the identifier collection.
An optional disambigIdentPointer attribute. It contains a relative XPath expression pointing to a node that represents a unique identifier within the identifier collection.
An optional disambigIdentRefPointer attribute. It contains a relative XPath expression pointing to a node that represents a unique identifier within the identifier collection.
enttiyTypeRef
,disambigSourceRef ,disambigIdentRef for both entity
and word sense disambiguation.
<text xmlns:its="http://www.w3.org/2005/11/its" > <its:rules version="2.0"> <its:disambiguationRule selector="/text/body/p/*[@id=’dublin’]" entityTypeSourceRef="http:/nerd.eurecom.fr/ontology" entityTypeRef="http:/nerd.eurecom.fr/ontology#Place" disambigType="entity" disambigSourceRef="http://dbpedia.org/" disambigIdentRef="http://dbpedia.org/resource/Dublin"/> <its:disambiguationRule selector="/text/body/p/*[@id=’capital’]" disambigType="lexicalConcept" disambigSourceRef="http://www.w3.org/2006/03/wn/wn20/rdf/wordnet-synset.rdf" disambigIdentRef="http://www.w3.org/2006/03/wn/wn20/instances/worsense-capital-noun-3"/> </its:rules> <body> <p> <span id="dublin">Dublin</span> is the <span id="capital">capital of Ireland</span>.</p> </body> </text>
[Source file: examples/xml/EX-disambiguation-global-1.xml ]
LOCAL: The following local markup is available for the Disambiguation data category:
An optional entityTypeSourceRef attribute that contains an URI specifying the concrete identifier data source (knowledge base, semantic network), used to determine the entity type.
An optional entityTypeRef attribute that contains a URI specifying the entity type behind the selector.
An optional disambigType attribute that contains a string, specifying the specific semantics of the disambiguation. It can be one of "lexicalConcept", "ontologyConcept", or "entity".
An optional disambigSourceRef attribute. It contains a URI representing the disambiguation identifier collection source.
An optional disambigIdentRef attribute. It contains a URI that represents a unique identifier within the identifier collection.
enttiyTypeRef
,disambigSourceRef , disambigIdentRef in
HTML.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"><meta> <title>Entity: Local Test</title> </head> <body> <p> <span its-entity-type-source-ref="http://nerd.eurecom.fr/ontology" its-entity-type-ident-ref="http:/nerd.eurecom.fr/ontology#Place" its-disambig-source-ref="http://dbpedia.org/" its-disambig-ident-ref="http://dbpedia.org/resource/Dublin" its-disambig-type="entity">Dublin</span> is the <span its-disambig-source-ref="http://www.w3.org/2006/03/wn/wn20/rdf/wordnet-synset.rdf" its-disambig-ident-ref="http://www.w3.org/2006/03/wn/wn20/instances/worsense-capital-noun-3" its-disambig-type="lexicalConcept">capital</span> of Ireland.</p> </body> </html>
[Source file: examples/html5/EX-disambiguation-html5-local-1.html ]
Note:
While the entityTypeSourceRef attribute allows for an arbitrary domain of entity types, the 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
The distinction between disambiguating word sense and entities is mainly in the different semantics: whereas word sense disambiguation targets literal words and their senses on the lexical level, entity disambiguation targets real-world concepts that are behind the selected phrases on the conceptual level.
When serializing the ITS 2.0 Requirements document . markup 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.
See Example 54 for the companion document with the mapping data.
<!DOCTYPE html> <html xmlns:its="http://www.w3.org/2005/11/its" lang="en"> <head> <meta charset="utf-8"><meta> <title>Entity: Local Test</title> </head> <body prefix="its: http://www.w3.org/2005/11/its"> <p> <span resource="http://dbpedia.org/resource/Dublin" typeof="http:/nerd.eurecom.fr/ontology#Place" property="name">Dublin</span> is the capital of Ireland.</p> </body> </html>
[Source file: examples/html5/EX-disambiguation-html5-rdfa.html ]
Companion document, having the mapping data for Example 53.
<!DOCTYPE html> <html xmlns:its="http://www.w3.org/2005/11/its" lang="en"> <head> <meta charset="utf-8"><meta> <title>Entity: Local Test</title> </head> <body prefix="its: http://www.w3.org/2005/11/its"> <p> <span resource="http://dbpedia.org/resource/Dublin" typeof="http:/nerd.eurecom.fr/ontology#Place" property="name">Dublin</span> is the capital of Ireland.</p> </body> </html>
[Source file: examples/html5/EX-disambiguation-html5-rdfa.html ]
[107] | disambiguationRule |
::= | element its:disambiguationRule {
disambiguationRule.content, disambiguationRule.attributes } |
[108] | disambiguationRule.content |
::= | empty |
[109] | disambiguationRule.attributes |
::= | att.selector.attributes ,attribute entityTypeSourceRef { xsd:anyURI }?, attribute
entityTypeSourcePointer { string }?, attribute
entityTypeSourceRefPointer { string }?, attribute entityTypeRef {
xsd:anyURI }?, attribute entityTypePointer { string }?, attribute
entityTypeRefPointer { string }?, attribute disambigType {
"lexicalConcept" | "ontologyConcept" | "entity" }?, attribute
disambigSourceRef { xsd:anyURI }?, attribute disambigSourcePointer {
string }?, attribute disambigSourceRefPointer { string }?, attribute
disambigIdentRef { xsd:anyURI }?, attribute disambigIdentPointer {
string }?, attribute disambigIdentRefPointer { string
}? |
[110] | att.disambiguation.attributes |
::= | att.disambiguation.attribute.entityTypeSourceRef
,att.disambiguation.attribute.disambigType
,att.disambiguation.attribute.disambigSourceRef
,att.disambiguation.attribute.disambigIdentRef |
[111] | att.disambiguation.attribute.entityTypeSourceRef |
::= | attribute its:entityTypeSourceRef {
xsd:anyURI }? |
[112] | att.disambiguation.attribute.disambigType |
::= | attribute its:disambigType {
"lexicalConcept" | "ontologyConcept" | "entity" }? |
[113] | att.disambiguation.attribute.disambigSourceRef |
::= | attribute its:disambigSourceRef {
xsd:anyURI }? |
[114] | att.disambiguation.attribute.disambigIdentRef |
::= | attribute its:disambigIdentRef {
xsd:anyURI }? |
[115] | att.disambiguation.html5.attributes |
::= |
att.disambiguation.html5.attribute.its-entity-type-source-ref
,att.disambiguation.html5.attribute.its-disambig-type
,att.disambiguation.html5.attribute.its-disambig-source-ref
,att.disambiguation.html5.attribute.its-disambig-ident-ref |
[116] | att.disambiguation.html5.attribute.its-entity-type-source-ref |
::= | attribute its-entity-type-source-ref
{ xsd:anyURI }? |
[117] | att.disambiguation.html5.attribute.its-disambig-type |
::= | attribute its-disambig-type {
"lexicalConcept" | "ontologyConcept" | "entity" }? |
[118] | att.disambiguation.html5.attribute.its-disambig-source-ref |
::= | attribute its-disambig-source-ref {
xsd:anyURI }? |
[119] | att.disambiguation.html5.attribute.its-disambig-ident-ref |
::= | attribute its-disambig-ident-ref {
xsd:anyURI }? |
The Locale Filter data category specifies that a
node is only applicable to certain locales, or that it is
not 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 data category associates with
each selected node a filter type and a list of
extended language ranges conforming to [BCP47] . The list
of language ranges is a
comma-separated list of basic and can include the wildcard extended language ranges. range "*". The list can also be
empty. Whitespace surrounding language ranges is ignored.
Note: "all": The node is included in all locales.
"none": The node is included in no locales.
"include": The node is only included in locales To express that match at least one
language range in the list, using basic filtering as defined in [BCP47] .
"exclude": The node is included in all locales except those that match at least should be included, one language range
in can use the list,
using basic filtering as defined in [BCP47] . If wildcard "*" for the locale filter
type is "all" or "none", a list of language ranges SHOULD NOT be provided. If one is, it MUST be ignored.
If range. To express that the locale filter type is "include" or "exclude", a list of language
ranges SHOULD content should not be
provided. If included in
any local, one is not, it MUST default to
can use the empty list. value.
The Locale Filter data category can be expressed
with global rules, or locally on an individual element. The information applies
to the textual content of the element, including child elements and
attributes. The default is that the locale filter
type language range is "all". "*".
Implementations MUST NOT 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
XPath expression absolute selector which
selects the nodes to which this rule applies.
A required localeFilterType attribute with the
value "all", "none", "include", or "exclude". An optional localeFilterList
attribute with a comma-separated list of extended language ranges.
ranges, or an empty string value.
The localeFilterRule
element specifies that certain legal notice elements should only be shown in the specified locales. 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.
<bookxmlns:its="http://www.w3.org/2005/11/its" >xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> <info> <its:rules version="2.0"><its:localeFilterRule selector="//legalnotice[@role='Canada']" localeFilterType="include" localeFilterList="en-CA, fr-CA"/><its:localeFilterRule selector="//legalnotice[@role='Canada']" localeFilterList="en-CA, fr-CA"/> </its:rules> <legalnotice role="Canada"> <para>This legal notice is only for Canadian locales.</para> </legalnotice> </info> </book>
[Source file: examples/xml/EX-locale-filter-selector-1.xml ]
The localeFilterRule element specifies that editorial remarks should be removed from all translations.
<section xmlns:its="http://www.w3.org/2005/11/its" > <info> <its:rules version="2.0"><its:localeFilterRule selector="//remark" localeFilterType="none"/><its:localeFilterRule selector="//remark" localeFilterList=""/> </its:rules> </info> <remark>Note: This section will be written later.</remark> </section>
[Source file: examples/xml/EX-locale-filter-selector-2.xml ]
LOCAL: The following local markup is available for the Locale Filter data category:
A localeFilterType attribute with the value "all",
"none", "include", or "exclude". A localeFilterList
attribute with a comma-separated list of extended language ranges.
ranges, or an empty string value.
<book xmlns:its="http://www.w3.org/2005/11/its" > <info> <legalnoticeits:localeFilterType="include"its:localeFilterList="en-CA, fr-CA"> <para>This legal notice is only for Canadian locales.</para> </legalnotice> </info> </book>
[Source file: examples/xml/EX-locale-filter-attribute-1.xml ]
|
localeFilterRule |
::= | element its:localeFilterRule { localeFilterRule.content,
localeFilterRule.attributes
} |
|
localeFilterRule.content |
::= | empty |
|
localeFilterRule.attributes |
::= | att.selector.attributes , attribute
|
|
att.localeFilter.attributes |
::= |
|
|
att.localeFilter.attribute.localeFilterList |
::= | attribute its:localeFilterList { string }? |
|
att.localeFilter.html5.attributes |
::= |
|
|
att.localeFilter.html5.attribute.its-locale-filter-list |
::= | attribute its-locale-filter-list { string }? |
The Provenance 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 .
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 .
The External Resource 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.
The External Resource data category can be
expressed only with global rules. The information applies
to the textual content of the element, including child elements and
attributes. There is no inheritance. There is
no default.
GLOBAL: The externalResourceRefRule element contains the following:
A required selector attribute. It contains an
XPath expression absolute selector which
selects the nodes to which this rule applies.
A required externalResourceRefPointer
attribute that contains a relative XPath expression selector
pointing to a node that provides the URI of the external resource.
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.
<docxmlns:its="http://www.w3.org/2005/11/its" version="2.0"> <its:externalResourceRefRule selector="//db:imagedata | //db:audiodata | db:videodata" externalResourceRefPointer="@fileref"/>xmlns:db="http://docbook.org/ns/docbook" xmlns:its="http://www.w3.org/2005/11/its" > <its:rules version="2.0"> <its:externalResourceRefRule selector="//dbk:imagedata | //dbk:audiodata | //dbk:videodata" externalResourceRefPointer="@fileref"/> </its:rules> <db:mediaobject> <db:videoobject> <db:videodata fileref="movie.avi"/> </videoobject> <db:imageobject> <db:imagedata fileref="movie-frame.gif"/> </imageobject> <db:textobject> <db:para>This video illustrates the proper way to assemble an inverting time distortion device. </para> <db:warning> <db:para> It is imperative that the primary and secondary temporal couplings not be mounted in the wrong order. Temporal catastrophe is the likely result. The future you destroy may be your own. </para> </warning> </textobject> </mediaobject> </doc>
[Source file: examples/xml/EX-externalresource-1.xml ]
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 underlying HTML5 document is given in Example 60.
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"> <its:externalResourceRefRule selector="//html:video/@src" externalResourceRefPointer="."/> <its:externalResourceRefRule selector="//html:video/@poster" externalResourceRefPointer="."/> </its:rules>
[Source file: examples/xml/EX-externalresource-2.xml ]
<!DOCTYPE html> <html lang="en"> <head><meta charset="utf-8"/><meta charset="utf-8"><meta> <title>Video element example</title> </head> <body> <video width="640" height="360" src="http://www.example.com/video/v2.mp" poster="video-image.png"> <p>If your browser doesn't support the <code>video</code> element, you can <a href="http://www.example.com/video/v2.mp">download the video</a> instead.</p> </video> </body> </html>
[Source file: examples/html5/EX-externalresource-html5-1.html ]
|
externalResourceRefRule |
::= | element its:externalResourceRefRule {
externalResourceRefRule.content, externalResourceRefRule.attributes
} |
|
externalResourceRefRule.content |
::= | empty |
|
externalResourceRefRule.attributes |
::= | att.selector.attributes , attribute
externalResourceRefPointer { string } |
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 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.
Note:
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 †from [XML i18n BP] for further guidance.
The Target Pointer data category can be expressed only with global rules. The information applies to the textual content of the element. There is no inheritance. There is no default.
GLOBAL: The targetPointerRule element contains the following:
A required selector attribute. It contains an absolute selector which selects the nodes to which this rule applies.
A required targetPointer attribute. It contains a relative selector that points to the node for the target content corresponding to the selected source node.
Note:
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).
<file xmlns:its="http://www.w3.org/2005/11/its" > <its:rules version="2.0"> <its:translateRule selector="/file" translate="no"/> <its:translateRule selector="//source" translate="yes"/> <its:targetPointerRule selector="//source" targerPointer="../target"/> </its:rules> <entry id="one"> <source>Remember last folder</source> <target/> </entry> <entry id="two"> <source>Custom file filter:</source> <target/> </entry> </file>
[Source file: examples/xml/EX-target-pointer-global-1.xml ]
[130] | targetPointerRule |
::= | element its:targetPointerRule {
targetPointerRule.content, targetPointerRule.attributes } |
[131] | targetPointerRule.content |
::= | empty |
[132] | targetPointerRule.attributes |
::= | att.selector.attributes ,attribute targetPointer { string } |
The Id Value 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 †from [XML i18n BP] ). 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.
Note:
The Id Value 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 Example 64
).
Applying the Id Value 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.
The id Value 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 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 should be located. The identifier MUST 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 take precedence over the idValue
value.
The idValueRule element indicates that the unique identifier for each
<text>
element is the value of the attribute name
of its parent
element.
<resources xmlns:its="http://www.w3.org/2005/11/its" > <its:rules version="2.0"> <its:translateRule translate="no" selector="/resources"/> <its:translateRule translate="yes" selector="//text"/> <its:idValueRule selector="//text" idValue="../@name"/> </its:rules> <entry name="btn.OK"> <text>OK</text> <pos>1, 1</pos> <trig>sendOK</trig> </entry> <entry name="btn.CANCEL"> <text>Cancel</text> <pos>2, 1</pos> <trig>cancelAll</trig> </entry> </resources>
[Source file: examples/xml/EX-idvalue-element-1.xml ]
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>
.
<doc xmlns:its="http://www.w3.org/2005/11/its" > <its:rules version="2.0"> <its:idValueRule selector="//text" idValue="concat(../@name, '_t')"/> <its:idValueRule selector="//desc" idValue="concat(../@name, '_d')"/> </its:rules> <msg name="settingsMissing"> <text>Can't find settings file.</text> <desc>The module cannot find the default settings file. You need to re-initialize the system.</desc> </msg> </doc>
[Source file: examples/xml/EX-idvalue-element-2.xml ]
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.
<file xmlns:its="http://www.w3.org/2005/11/its" > <its:rules version="2.0"> <its:idValueRule selector="//res" idValue="@name"/> </its:rules> <res name="retryBtn" xml:id="btnAgain">Try Again</res> <res name="retryTip">click this to re-run the process with the current settings.</res> </file>
[Source file: examples/xml/EX-idvalue-attribute-1.xml ]
[133] | idValueRule |
::= | element its:idValueRule {
idValueRule.content, idValueRule.attributes } |
[134] | idValueRule.content |
::= | empty |
[135] | idValueRule.attributes |
::= | att.selector.attributes ,attribute idValue { string } |
The Preserve Space data category indicates how whitespace should be handled in content. The possible values for the Preserve Space 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".
The Preserve Space data category can be
expressed with global rules, or locally using the xml:space
attribute.
Note:
The Preserve Space data category is
not applicable to HTML5 documents because xml:space
(and by
extension Preserve
Space ) 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 which selects the nodes to which this rule applies.
A required space attribute with the value "default" or "preserve".
The preserveSpaceRule element specifies that whitespace in all verse elements must be treated literally.
<book xmlns:its="http://www.w3.org/2005/11/its" > <info> <its:rules its:version="2.0"> <its:preserveSpaceRule selector="//verse" space="preserve"/> </its:rules> </info> <verse> ’Twas brillig, and the slithy toves Did gyre and gimble in the wabe; All mimsy were the borogoves, And the mome raths outgrabe. </verse> </book>
[Source file: examples/xml/EX-preservespace-global-1.xml ]
LOCAL: The
xml:space
attribute, as defined in section 2.10 of [XML 1.0] ,maps exactly to the Preserve Space data category.
The standard xml:space
attribute specifies
that the whitespace in the verse element must be treated literally.
<book xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> <verse xml:space="preserve"> 'Twas brillig, and the slithy toves Did gyre and gimble in the wabe; All mimsy were the borogoves, And the mome raths outgrabe. </verse> </book>
[Source file: examples/xml/EX-preservespace-local-1.xml ]
[136] | preserveSpaceRule |
::= | element its:preserveSpaceRule {
preserveSpaceRule.content, preserveSpaceRule.attributes } |
[137] | preserveSpaceRule.content |
::= | empty |
[138] | preserveSpaceRule.attributes |
::= | att.selector.attributes ,attribute space { "default" | "preserve"
} |
The Localization Quality Issue 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 . |
ITS 2.0-compliant tools that use these
categories MUST map their internal
values to these types. If the type of the issue is set to
uncategorized ,a comment MUST 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. |
The Localization Quality Issue data category can be expressed with global rules, or locally on individual elements. The information applies 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 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 pointing to a node with the exact same semantics as locQualityIssuesRef .
Exactly one of the following:
A locQualityIssueType attribute that implements the type information .
A locQualityIssueTypePointer attribute that contains a relative selector pointing to a node with the exact same semantics as locQualityIssueType .
Exactly one of the following:
A locQualityIssueComment attribute that implements the comment information .
A locQualityIssueCommentPointer attribute that contains a relative selector 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 .
A locQualityIssueSeverityPointer attribute that contains a relative selector 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 .
A locQualityIssueProfileRefPointer attribute that contains a relative selector pointing to a node with the exact same semantics as locQualityIssueProfileRef .
Note:
The attributes locQualityIssuesRefPointer ,locQualityIssueTypePointer ,locQualityIssueCommentPointer ,locQualityIssueSeverityPointer and locQualityIssueProfileRefPointer do not apply to HTML as local markup is provided for direct annotation in HTML.
The locQualityIssueRule element associates the issue information with a selected span of content.
<doc xmlns:its="http://www.w3.org/2005/11/its" > <header> <its:rules version="2.0"> <its:locQualityIssueRule selector="//span[@id='q1']" locQualityIssueType="typographical" locQualitIssueyComment="Sentence without capitalization" locQualityIssueSeverity="50"/> </its:rules> </header> <para> <span id="q1">this</span> is an example</para> </doc>
[Source file: examples/xml/EX-locQualityIssue-global-1.xml ]
The locQualityIssueRule element defines what constructs are equivalent to the native ITS markup for the different pieces of information of the data category.
<doc xmlns:its="http://www.w3.org/2005/11/its" > <header> <its:rules version="2.0"> <its:locQualityIssueRule selector="//issue" locQualityIssueTypePointer="./@type" locQualityIssueCommentPointer="./@note" locQualityIssueSeverityPointer="./@value" locQualityIssueProfileRefPointer="./@profile"/> </its:rules> </header> <para> <issue type="typographical" note="Sentence without capitalization" value="50" profile="http://example.org/qaModel/v13">this</issue> is an example</para> </doc>
[Source file: examples/xml/EX-locQualityIssue-global-2.xml ]
The locQualityIssueRule element resides in a separate file ( Example 70 ) that associates the issue information with a selected span of content in the HTML document.
<html lang="en"> <head> <meta charset="utf-8"><meta> <title>Example</title> <link href="EX-locQualityIssueRule-html5-global.xml" rel="its-rules"><link> </head> <body> <p> <span id="q1">this</span> is an example.</p> </body> </html>
[Source file: examples/html5/EX-locQualityIssue-html5-global.html ]
This document is used in Example 69 :
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"> <its:locQualityIssueRule selector="//span[@id='q1']" locQualityIssueType="typographical" locQualityIssueComent="Sentence without capitalization" locQualityIssueSeverity="50"/> </its:rules>
[Source file: examples/html5/EX-locQualityIssueRule-html5-global.xml ]
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 data category:
Either (inline markup):
At least one of the following attributes:
A locQualityIssueType attribute that implements the type information .
A locQualityIssueComment attribute that implements the comment information .
An optional locQualityIssueSeverity attribute that implements the severity information .
An optional locQualityIssueProfileRef attribute that implements the profile reference information .
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:
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 .
A locQualityIssueComment attribute that implements the comment information .
An optional locQualityIssueSeverity attribute that implements the severity information .
An optional locQualityIssueProfileRef attribute that implements the profile reference information .
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.
The attributes locQualityIssueType ,locQualityIssueComment and locQualityIssueSeverity are used to associate the issue information directly with a selected span of content.
<doc xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> <para> <span its:locQualityIssueType="typographical" its:locQualityIssueComment="Sentence without capitalization" its:locQualityIssueSeverity="50">this</span> is an example</para> </doc>
[Source file: examples/xml/EX-locQualityIssue-local-1.xml ]
In this example several spans of content are associated with a quality issue.
<html lang="en"> <head> <title>Telharmonium 1897</title> <style type="text/css"> [its-loc-quality-issue-type]{ background-color:yellow; margin:2px; } [its-loc-quality-issue-severity = "100"]{ border: 2px solid red; } </style> </head> <body> <h1>Telharmonium (1897)</h1> <p> <span its-loc-quality-issue-profile-ref="http://example.org/qaMovel/v1" its-loc-quality-issue-type="inconsistent-entities" its-loc-quality-issue-comment="Should be Thomas Cahill." its-loc-quality-issue-severity="100" data-mytool-qacode="named_entity_not_found">Christian Bale</span>(1867–1934) conceived of an instrument that could transmit its sound from a power plant for hundreds of miles to listeners over telegraph wiring. Beginning in 1889 the sound quality of regular telephone concerts was very poor on account of the buzzing generated by carbon-granule microphones. As a result Cahill decided to set a new standard in perfection of sound <span its-loc-quality-issue-profile-ref="grammar" its-loc-quality-issue-type="spelling" its-loc-quality-issue-severity="50" its-loc-quality-issue-comment="should be "quality"">qulaity</span> with his instrument, a standard that would not only satisfy listeners but that would overcome all the flaws of traditional instruments.</p> </body> </html>
[Source file: examples/html5/EX-locQualityIssue-html5-local-1.html ]
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.
<xliff xmlns:its="http://www.w3.org/2005/11/its" version="1.2" its:version="2.0"> <file original="example.doc" source-language="en" datatype="plaintext"> <body> <trans-unit id="1"> <source xml:lang="en">This is the content</source> <target xml:lang="fr"> <mrk mtype="x-itslq" its:locQualityIssuesRef="#lq1">c'es</mrk> le contenu</target> <its:locQualityIssues xml:id="lq1"> <its:locQualityIssue locQualityIssueType="misspelling" locQualityIssueComment="'c'es' is unknown. Could be 'c'est'" locQualityIssueSeverity="50"/> <its:locQualityIssue locQualityIssueType="typographical" locQualityIssueComment="Sentence without capitalization" locQualityIssueSeverity="30"/> </its:locQualityIssues> </trans-unit> </body> </file> </xliff>
[Source file: examples/xml/EX-locQualityIssue-local-2.xml ]
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".
<doc xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0"> <file> <header> <its:rules> <its:locQualityIssueRule selector="//mrk[@type='x-itslq']" locQualityIssuesRefPointer="@ref"/> </its:rules> </header> <unit id="1"> <segment> <source>This is the content</source> <target> <mrk type="x-itslq" ref="#lq1">c'es</mrk> le contenu</target> </segment> <its:locQualityIssues xml:id="lq1"> <its:locQualityIssue locQualityIssueType="misspelling" locQualityIssueComment="'c'es' is unknown. Could be 'c'est'" locQualityIssueSeverity="50"/> <its:locQualityIssue locQualityIssueType="typographical" locQualityIssueComment="Sentence without capitalization" locQualityIssueSeverity="30"/> </its:locQualityIssues> </unit> </file> </doc>
[Source file: examples/xml/EX-locQualityIssue-local-3.xml ]
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.
<html> <head> <title>Test</title> <script type="text/javascript" src="qaissues.js"><script> <style type="text/css">.qaissue { background-color: yellow; } </style> </head> <body onload="addqaissueattrs()"> <p> <span its-loc-quality-issues-ref="#lq1">c'es</span> le contenu</p> <span its-loc-quality-issues="its-loc-quality-issues" id="lq1"> <span its-loc-quality-issue="its-loc-quality-issue" its-loc-quality-issue-type="typographical" its-loc-quality-issue-coment="Sentence without capitalization" its-loc-quality-issue-severity="30"><span> <span its-loc-quality-issue="its-loc-quality-issue" its-loc-quality-issue-type="misspelling" its-loc-quality-issue-coment="'c'es' is unknown. Could be 'c'est'" its-loc-quality-issue-severity="50"><span> </span> </body> </html>
[Source file: examples/html5/EX-locQualityIssue-html5-local-2.html ]
[139] | locQualityIssueRule |
::= | element its:locQualityIssueRule {
locQualityIssueRule.content, locQualityIssueRule.attributes } |
[140] | locQualityIssueRule.content |
::= | empty |
[141] | locQualityIssueRule.attributes |
::= | att.selector.attributes ,attribute locQualityIssuesRef { xsd:anyURI }?, attribute
locQualityIssuesRefPointer { string }?, attribute locQualityIssueType
{ "terminology" | "mistranslation" | "omission" | "untranslated" |
"addition" | "duplication" | "inconsistency" | "grammar" | "legal" |
"register" | "locale-specific-content" | "locale-violation" | "style"
| "characters" | "misspelling" | "typographical" | "formatting" |
"inconsistent-entities" | "numbers" | "markup" | "pattern-problem" |
"whitespace" | "internationalization" | "length" | "uncategorized" |
"other" }?, attribute locQualityIssueTypePointer { string }?,
attribute locQualityIssueComment { string }?, attribute
locQualityIssueCommentPointer { string }?, attribute
locQualityIssueSeverity { string }?, attribute
locQualityIssueSeverityPointer { string }?, attribute
locQualityIssueProfileRef { xsd:anyURI }?, attribute
locQualityIssueProfileRefPointer { string }? |
[142] | att.locqualityissue.attributes |
::= | att.locqualityissue.attribute.locQualityIssuesRef
,att.locqualityissue.attribute.locQualityIssueType
,att.locqualityissue.attribute.locQualityIssueComment
,att.locqualityissue.attribute.locQualityIssueSeverity
,att.locqualityissue.attribute.locQualityIssueProfileRef |
[143] | att.locqualityissue.attribute.locQualityIssuesRef |
::= | attribute its:locQualityIssuesRef {
xsd:anyURI }? |
[144] | att.locqualityissue.attribute.locQualityIssueType |
::= | attribute its:locQualityIssueType {
"terminology" | "mistranslation" | "omission" | "untranslated" |
"addition" | "duplication" | "inconsistency" | "grammar" | "legal" |
"register" | "locale-specific-content" | "locale-violation" | "style"
| "characters" | "misspelling" | "typographical" | "formatting" |
"inconsistent-entities" | "numbers" | "markup" | "pattern-problem" |
"whitespace" | "internationalization" | "length" | "uncategorized" |
"other" }? |
[145] | att.locqualityissue.attribute.locQualityIssueComment |
::= | attribute its:locQualityIssueComment
{ string }? |
[146] | att.locqualityissue.attribute.locQualityIssueSeverity |
::= | attribute its:locQualityIssueSeverity
{ string }? |
[147] | att.locqualityissue.attribute.locQualityIssueProfileRef |
::= | attribute
its:locQualityIssueProfileRef { xsd:anyURI }? |
[148] | locQualityIssues |
::= | element its:locQualityIssues {
locQualityIssues.content } |
[149] | locQualityIssues.content |
::= | locQualityIssue + |
[150] | locQualityIssue |
::= | element its:locQualityIssue {
locQualityIssue.content, locQualityIssue.attributes } |
[151] | locQualityIssue.content |
::= | empty |
[152] | locQualityIssue.attributes |
::= | attribute locQualityIssueType {
"terminology" | "mistranslation" | "omission" | "untranslated" |
"addition" | "duplication" | "inconsistency" | "grammar" | "legal" |
"register" | "locale-specific-content" | "locale-violation" | "style"
| "characters" | "misspelling" | "typographical" | "formatting" |
"inconsistent-entities" | "numbers" | "markup" | "pattern-problem" |
"whitespace" | "internationalization" | "length" | "uncategorized" |
"other" }?, attribute locQualityIssueComment { string }?, attribute
locQualityIssueSeverity { string }?, attribute
locQualityIssueProfileRef { xsd:anyURI }? |
[153] | att.locqualityissue.html5.attributes |
::= |
att.locqualityissue.html5.attribute.its-loc-quality-issues-ref
,att.locqualityissue.html5.attribute.its-loc-quality-issue-type
,att.locqualityissue.html5.attribute.its--loc-quality-issue-comment
,att.locqualityissue.html5.attribute.its-loc-quality-issue-severity
,att.locqualityissue.html5.attribute.its-loc-quality-issue-profile-ref |
[154] | att.locqualityissue.html5.attribute.its-loc-quality-issues-ref |
::= | attribute its-loc-quality-issues-ref
{ xsd:anyURI }? |
[155] | att.locqualityissue.html5.attribute.its-loc-quality-issue-type |
::= | attribute its-loc-quality-issue-type
{ "terminology" | "mistranslation" | "omission" | "untranslated" |
"addition" | "duplication" | "inconsistency" | "grammar" | "legal" |
"register" | "locale-specific-content" | "locale-violation" | "style"
| "characters" | "misspelling" | "typographical" | "formatting" |
"inconsistent-entities" | "numbers" | "markup" | "pattern-problem" |
"whitespace" | "internationalization" | "length" | "uncategorized" |
"other" }? |
[156] | att.locqualityissue.html5.attribute.its--loc-quality-issue-comment |
::= | attribute
its--loc-quality-issue-comment { string }? |
[157] | att.locqualityissue.html5.attribute.its-loc-quality-issue-severity |
::= | attribute
its-loc-quality-issue-severity { string }? |
[158] | att.locqualityissue.html5.attribute.its-loc-quality-issue-profile-ref |
::= | attribute
its-loc-quality-issue-profile-ref { xsd:anyURI }? |
The Localization Quality Précis data category is used to express an overall measurement of the localization quality of a document.
This data category allows to specify a quality score for a given document, as well as to indicate what constitutes a passing score. It also allows to point to a profile where the quality assessment model used for the scoring is described.
The Localization Quality Précis data category can be expressed with global rules, or locally on individual elements. The information applies 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 which selects the nodes to which this rule applies.
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 pointing to a node with the exact same semantics as locQualityPrecisScore .
None or exactly one of the following:
A locQualityPrecisThreshold attribute. Its value is an integer between 0 and 100 (inclusive) which indicates the lowest score value that constitutes a passing score in the profile used.
A locQualityPrecisThresholdPointer attribute that contains a relative selector 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 pointing to a node with the exact same semantics as locQualityPrecisProfileRef .
Note:
The attributes locQualityPrecisScorePointer ,locQualityPrecisThresholdPointer ,and locQualityPrecisProfileRefPointer do not apply to HTML as local markup is provided for direct annotation in HTML.
The following example shows how to us the locQualityPrecisRule element to specify the score, threshold and profile for a document.
<doc xmlns:its="http://www.w3.org/2005/11/its" > <header> <its:rules version="2.0"> <its:locQualityScoreRule selector="/doc" locQualityPrecisScore="100" locQualityPrecisThreshold="95" locQualityPrecisProfileRef="http://example.org/qaModel/v13"/> </its:rules> </header> <para>This is an example</para> </doc>
[Source file: examples/xml/EX-locQualityPrecis-global-1.xml ]
The following example shows how to us the locQualityPrecisScorePointer ,locQualityPrecisThresholdPointer and locQualityPrecisProfileRefPointer can be used to map the data category to an equivalent markup.
<doc xmlns:its="http://www.w3.org/2005/11/its" > <header qaScore="100" qaPassingScore="95" qaProfile="http://example.org/qaModel/v13"> <title>Example</title> <its:rules version="2.0"> <its:locQualityScoreRule selector="/doc" locQualityPrecisScorePointer="header/@qaScore" locQualityPrecisThresholdPointer="header/@qaPassingScore" locQualityPrecisProfileRefPointer="header/@qaProfile"/> </its:rules> </header> <para>This is an example</para> </doc>
[Source file: examples/xml/EX-locQualityPrecis-global-2.xml ]
The following example shows how to us the locQualityPrecisRule element to specify the score, threshold and profile for an HTML document.
<html lang="en"> <head> <meta charset="utf-8"><meta> <title>Example</title> <link href="EX-locQualityPrecisRule-html5-global.xml" rel="its-rules"><link> </head> <body> <p>This is an example.</p> </body> </html>
[Source file: examples/html5/EX-locQualityPrecis-html5-global.html ]
This document is used in Example 78 :
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"> <its:locQualityPrecisRule selector="/html" locQualityPrecisScore="100" locQualityPrecisThreshold="95" locQualityPrecisProfileRef="http://example.org/qaModel/v13"/> </its:rules>
[Source file: examples/html5/EX-locQualityPrecisRule-html5-global.xml ]
LOCAL: The following local markup is available for the Localization Quality Précis data category:
A locQualityPrecisScore attribute. Its value is an integer between 0 and 100 (inclusive) with higher values indicating a better score.
An optional locQualityPrecisThreshold attribute. Its value is an integer between 0 and 100 (inclusive) which indicates the lowest score value that constitutes a passing score 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 locQualityPrecisScore ,locQualityPrecisThreshold and locQualityPrecisProfileRef are used to score the quality of the document.
<doc xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0" its:locQualityPrecisScore="100" its:locQualityPrecisThreshold="95" its:locQualityPrecisProfileRef="http://example.org/qaModel/v13"> <title>The Adventures of Tom Sawyer</title> <para>He got home pretty late that night, and when he climbed cautiously in at the window, he uncovered an ambuscade, in the person of his aunt; and when she saw the state his clothes were in her resolution to turn his Saturday holiday into captivity at hard labor became adamantine in its firmness.</para> </doc>
[Source file: examples/xml/EX-locQualityPrecis-local-1.xml ]
The loc-quality-precis-score
,loc-quality-precis-threshold
and loc-quality-precis-profile-ref
are used to score the quality of the document.
<html lang="en" its-loc-quality-precis-score="100" its-loc-quality-precis-threshold="95" its-loc-quality-precis-profile-ref="http://example.org/qaModel/v13"> <head> <title>Rikki-tikki-tavi</title> </head> <body> <p>This is the story of the great war that Rikki-tikki-tavi fought single-handed, through the bath-rooms of the big bungalow in Segowlee cantonment. Darzee, the Tailorbird, helped him, and Chuchundra, the musk-rat, who never comes out into the middle of the floor, but always creeps round by the wall, gave him advice, but Rikki-tikki did the real fighting.</p> </body> </html>
[Source file: examples/html5/EX-locQualityPrecis-html5-local.html ]
[159] | locQualityPrecisRule |
::= | element its:locQualityPrecisRule {
locQualityPrecisRule.content, locQualityPrecisRule.attributes } |
[160] | locQualityPrecisRule.content |
::= | empty |
[161] | locQualityPrecisRule.attributes |
::= | att.selector.attributes ,attribute locQualityPrecisScore { string }?, attribute
locQualityPrecisScorePointer { string }?, attribute
locQualityPrecisThreshold { string }?, attribute
locQualityPrecisThresholdPointer { string }?, attribute
locQualityPrecisProfileRef { xsd:anyURI }?, attribute
locQualityPrecisProfileRefPointer { string }? |
[162] | att.locqualityprecis.attributes |
::= | att.locqualityprecis.attribute.locQualityPrecisScore
,att.locqualityprecis.attribute.locQualityPrecisThreshold
,att.locqualityprecis.attribute.locQualityPrecisProfileRef |
[163] | att.locqualityprecis.attribute.locQualityPrecisScore |
::= | attribute its:locQualityPrecisScore {
string }? |
[164] | att.locqualityprecis.attribute.locQualityPrecisThreshold |
::= | attribute
its:locQualityPrecisThreshold { string }? |
[165] | att.locqualityprecis.attribute.locQualityPrecisProfileRef |
::= | attribute
its:locQualityPrecisProfileRef { xsd:anyURI }? |
[166] | att.locqualityprecis.html5.attributes |
::= |
att.locqualityprecis.html5.attribute.its-loc-quality-precis-score
,att.locqualityprecis.html5.attribute.its-loc-quality-precis-threshold
,att.locqualityprecis.html5.attribute.its-loc-quality-precis-profile-ref |
[167] | att.locqualityprecis.html5.attribute.its-loc-quality-precis-score |
::= | attribute
its-loc-quality-precis-score { string }? |
[168] | att.locqualityprecis.html5.attribute.its-loc-quality-precis-threshold |
::= | attribute
its-loc-quality-precis-threshold { string }? |
[169] | att.locqualityprecis.html5.attribute.its-loc-quality-precis-profile-ref |
::= | attribute
its-loc-quality-precis-profile-ref { xsd:anyURI }? |
The locQualityIssueType attribute provides a basic level of interoperability between different localization quality assurance systems. It offers a list of high-level quality issue types common in automatic and human localization quality assessment. Tools can map their internal categories to these categories in order to exchange information about the kinds of issues they identify and take appropriate action even if another tool does not know the specific issues identified by the generating tool.
The values listed in the following table are allowed
for locQualityIssueType .The values a tool
implementing the data category produces for the attribute MUST match
one of the values provided in this table and MUST be
semantically accurate. If a tool can map its internal values to these categories
it MUST do so and MUST
NOT use the value other
,which is reserved strictly for
values that cannot be mapped to these values.
Value | Description | Example | Scope | Notes |
terminology |
An incorrect term or a term from the wrong domain was used or terms are used inconsistently. |
|
S or T | |
mistranslation |
The content of the target mistranslates the content of the source. |
|
T |
Issues related to translation of specific terms
related to the domain or task-specific language should be categorized
as terminology issues.
|
omission |
Necessary text has been omitted from the localization or source. |
|
S or T | This type should not be used for missing whitespace or formatting codes, but instead should be reserved for linguistic content. |
untranslated |
Content that should have been translated was left untranslated. |
|
T |
omission takes precedence over untranslated .Omissions are
distinct in that they address cases where text is not present, while
untranslated addresses cases where text has been carried from the source
untranslated.
|
addition |
The translated text contains inappropriate additions. |
|
T | |
duplication |
Content has been duplicated improperly. |
|
T | |
inconsistency |
The text is inconsistent with itself (NB: not for use with terminology inconsistency). |
|
S or T | |
grammar |
The text contains a grammatical error (including errors of syntax and morphology). |
|
S or T | |
legal |
The text is legally problematic (e.g., it is specific to the wrong legal system). |
|
S or T | |
register |
The text is written in the wrong linguistic register of uses slang or other language variants inappropriate to the text. |
|
S or T | |
locale-specific-content |
The localization contains content that does not apply to the locale for which it was prepared. |
|
S or T |
Legally inappropriate material should be classified
as legal .
|
locale-violation |
Text violates norms for the intended locale. |
|
S or T | |
style |
The text contains stylistic errors. |
|
S or T | |
characters |
The text contains characters that are garbled or incorrect or that are not used in the language in which the content appears. |
|
S or T | |
misspelling |
The text contains a misspelling. |
|
S or T | |
typographical |
The text has typographical errors such as omitted/incorrect punctuation, incorrect capitalization, etc. |
|
S or T | |
formatting |
The text is formatted incorrectly. |
|
S or T | |
inconsistent-entities |
The source and target text contain different named entities (dates, times, place names, individual names, etc.) |
|
S or T | |
numbers |
Numbers are inconsistent between source and target. |
|
S or T | Some tools may correct for differences in units of measurement to reduce false positives. |
markup |
There is an issue related to markup or a mismatch in markup between source and target. |
|
S or T | |
pattern-problem |
The text fails to match a pattern that defines allowable content (or matches one that defines non-allowable content). |
|
S or T | |
whitespace |
There is a mismatch in whitespace between source and target content. |
|
S or T | |
internationalization |
There is an issue related to the internationalization of content. |
|
S or T | There are many kinds of internationalization issues. This category is therefore very heterogeneous in what it can refer to. |
length |
There is a significant difference in source and target length. |
|
T or S | What constitutes a "significant" difference in length is determined by the model referred to in the locQualityIssueProfileRef . |
uncategorized |
The issue has not been categorized. |
|
S or T |
This category has two uses:
|
other |
Any issue that cannot be assigned to any values listed above. | S or T |
|
This section is informative.
[Ed. note: Needs to be updated with the additional data categories, once available.]The following list summarizes elements relating to global rules and their attributes:
<rules> Container for global rules.
href
Pointer to external rules files.
type
Type of pointer to external rules files.
Legal values are:
simple
version
Version of the ITS schema.
<dirRule> Rule about the Directionality data category.
dir
The text direction for the selection.
Legal values are:
ltr
rtl
lro
rlo
selector
XPath expression Absolute selector identifying
the nodes to be selected.
<langRule> Rule about the Language Information data category.
langPointer
Relative XPath
expression selector pointing to a
node that contains language information.
selector
XPath expression Absolute selector identifying
the nodes to be selected.
<locNote> Contains a localization note.
translate
The Translate data category information to be attached to the current node.
locNote
Localization note.
locNoteType
The type of localization note.
locNoteRef
URI referring to the location of the localization note.
termInfoRef
Pointer to a resource containing information about the term.
term
Indicates a term locally.
dir
The text direction for the context.
<locNoteRule> Rule about the Localization Note data category.
locNotePointer >
Relative XPath
expression selector pointing to a
node that holds the localization note.
locNoteType
The type of localization note.
Legal values are:
alert
description
locNoteRef
URI referring to the location of the localization note.
locNoteRefPointer
Relative XPath
expression selector pointing to a
node that holds the URI referring to the location of the localization
note.
selector
XPath expression Absolute selector identifying
the nodes to be selected.
<termRule> Rule about the Terminology data category.
term
Indicates whether the selection is a term or not.
Legal values are:
yes
no
termInfoRef
URI referring to the resource providing information about the term.
termInfoRefPointer
Relative XPath
expression selector pointing to a
node containing a URI referring to the resource providing information about
the term.
termInfoPointer
Relative XPath
selector expression pointing to a node
containing information about the term.
selector
XPath expression Absolute selector identifying
the nodes to be selected.
<translateRule> Rule about the Translate data category.
translate
The Translate data category information to be applied to selected nodes.
Legal values are:
yes
no
selector
XPath expression Absolute selector identifying
the nodes to be selected.
<withinTextRule> Rule about the Elements Within Text data category.
withinText
States whether current context is regarded as "within text".
Legal values are:
yes
no
nested
selector
XPath expression Absolute selector identifying
the nodes to be selected.
<rubyRule> Rule about the Ruby data category.
rubyPointer
Relative XPath
expression selector pointing to a
node that corresponds to a ruby
element
rtPointer
Relative XPath
expression selector pointing to a
node that corresponds to a rt
element
rpPointer
Relative XPath
expression selector pointing to a
node that corresponds to a rp
element
selector
XPath expression Absolute selector identifying
the nodes to be selected.
The following list summarizes elements that are available for local use:
<span> Inline element to contain ITS information.
<rb> Ruby base text.
<rbc> Container for rb elements in the case of complex ruby markup.
<rp> Used in the case of simple ruby 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.
<rt> Ruby text.
<rtc> Container for rt
elements in the case of complex ruby markup. <ruby> Ruby
markup.
The following list summarizes attributes that are available for local use, with the local elements mentioned above, or with other elements in a host schema:
translate
The Translate data category information to be attached to the current node.
locNote
Localization note.
locNoteType
The type of localization note.
locNoteRef
URI referring to the location of the localization note.
termInfoRef
Pointer to a resource containing information about the term.
term
Indicates a term locally.
dir
The text direction for the context.
This section is informative.
[Ed. note: This section needs to be written with a schema for HTML5; the existing schemas need to be updated with the data categories new in ITS 2.0.]The following schemas define ITS elements and attributes and could be used as building blocks when you want to integrate ITS markup into your own XML vocabulary. You can see examples of such integration in Best Practices for XML Internationalization . The schemas are not intended to be used alone for validation of documents with ITS markup.
The following schemas are provided:
This section is informative.
Several constraints of ITS markup cannot be validated with ITS schemas. The following [Schematron] document allows for validating some of these constraints.
<sch:schema xmlns:sch="http://www.ascc.net/xml/schematron" > <!-- Schematron document to test constraints for global and local ITS markup. For ITS markup definitions, see http://www.w3.org/TR/its/ . --> <sch:ns prefix="its" uri="http://www.w3.org/2005/11/its"/> <sch:pattern name="Check ITS Global Rules and Local Constraints, and Version Constraints"> <sch:rule context="*"> <!-- Tests for locNoteRule --> <sch:report test="self::its:locNoteRule and child::its:locNote and @its:locNotePointer"> locNoteRule error: A locNoteRule element must not have both a locNote child element and a locNotePointer attribute.</sch:report> <sch:report test="self::its:locNoteRule and @its:locNoteRef and @its:locNoteRefPointer"> locNoteRule error: A locNoteRule element must not have both a locNoteRef attribute and a locNoteRefPointer attribute.</sch:report> <sch:report test="self::its:locNoteRule and child::its:locNote and @its:locNoteRef"> locNoteRule error: A locNoteRule element must not have both a locNote child element and a locNoteRef attribute.</sch:report> <!-- Test for termRule --> <sch:report test="self::its:termRule and @its:termInfoRef and @its:termInfoRefPointer"> termRule error: A termRule element must not have both a termInfoRef attribute and a termInfoRefPointer attribute.</sch:report> <sch:report test="self::its:termRule and @its:termInfo and @its:termInfoPointer"> termRule error: A termRule element must not have both a termInfo attribute and a termInfoPointer attribute.</sch:report> <sch:report test="self::its:termRule and @its:termInfoRef and @its:termInfoPointer"> termRule error: A termRule element must not have both a termInfoRef attribute and a termInfoPointer attribute.</sch:report> <!-- Test for rubyRule --> <sch:report test="self::its:rubyRule and child::its:rubyText and @its:rtPointer"> rubyRule error: A rubyRule element must not have both a rubyText child element and a rtPointer attribute.</sch:report> <!-- Test for locNote (local) --> <sch:report test="@its:locNote and @its:locNoteRef"> Local ITS usage error: The locNote attribute and the locNoteRef attribute must not be used together.</sch:report> <!-- Test for term (local) --> <sch:report test="@its:termInfoRef and not(its:term) and not(self::its:termRule)"> Local ITS usage error: A termInfoRef attribute must not appear locally without a term attribute.</sch:report> <!-- Version attribute test --> <sch:report test="/*/@its:version != @its:version"> The version attribute at the root element and at the rules element must not specify different versions of ITS.</sch:report> </sch:rule> </sch:pattern> </sch:schema>
[Source file: examples/xml/its-constraints-check-schematron.xml ]
This section is informative.
The following [NVDL] document allows validation of ITS markup which has been
added to a host vocabulary. Only ITS elements and attributes are checked. Elements
and attributes of host language are ignored during validation
against this NVDL document/schema.<rules
xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"> <namespace
attributes of host language are ignored during validation
against this NVDL document/schema.
<rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"> <namespace ns="http://www.w3.org/2005/11/its"> <validate schema="its-elements.rng"/> </namespace> <namespace ns="http://www.w3.org/2005/11/its" match="attributes"> <validate schema="its-attributes.rng"/> </namespace> <anyNamespace> <allow/> </anyNamespace> </rules>
[Source file: its.nvdl ]
The NVDL schema depends on the following two schemas:
[Ed. note: These schemas need to be provided in an updated draft.]RELAX NG schema for ITS elements
RELAX NG schema for ITS attributes
The following log records major changes that have been made to this document since the ITS 2.0 Working Draft 31 July 2012 .
Added Section 6.10: Disambiguation .
Added Section 6.17: Preserve Space .
Added Section 6.16: Id Value .
Added support for different query language and reworked whole XPath and CSS Selectors integration.
Added examples to Section 6.14: External Resource .
Simplified Section 6.11: Locale Filter .
Added a note about HTML5 and the attributes dir and translate to Section 5.2.3: Local Selection in an XML Document .
Added definition of param element to Section 5.2.1: Global, Rule-based Selection .
Added Section 6.15: Target Pointer .
Original Ruby markup model changed to HTML5 Ruby model.
Updated references.
Added Section 6.17: Preserve Space .
Added Section 6.18: Localization Quality Issue and the related Appendix B: Values for the Localization Quality Issue Type .
Added a placeholder Section 6.20: MT Confidence .
The following log records major changes that have
been made to this document since the ITS 2.0 Working Draft 26 July June 2012 .
Various editorial changes (non-normative references update, style & grammar fixes).
Made clarifications to Section 1.5: Out of Scope , Section 1.6: Important Design Principles .
Added explanatory note on precedence and overriding in Section 5.4: Precedence 5.5: Precedence between Selections .
Reordered some components in Section 1: Introduction .
Restructured Section 1.1: Relation to ITS 1.0 and New Principles .
Added Section 2.1.3: queryLanguage 5.3.1: Choosing Query Language as a stub.
Added Section 6.11: Locale Filter .
Added Section 6.9: Domain .
Added local markup in Section 6.8: Elements Within Text .
Added Section 6.14: External Resource .
Updated examples to use the version
attribute with the value 2.0
.
The following log records major changes that have been made to this document between the ITS 1.0 Recommendation and this document.
Clarified introduction to cover ITS 2.0
Added a subsection on the relation to ITS 1.0 to the introduction, see Section 1.1.1: Relation to ITS 1.0
Created HTML5 based declarations for various data categories, see e.g. HTML5 declarations for the Terminology data category and the