XLIFF 1.0 Specification

Note: This document is superceded by the specification defined by the OASIS XLIFF TC.

[Source: http://www.oasis-open.org/committees/xliff/documents/contribution-xliff-20010530.htm]

The document is structured as follows:

  1. Introduction
  2. General Structure
  3. Detailed Specification
  4. Elements and attributes
  5. References
  6. Change Log

Introduction

XLIFF is the XML Localisation Interchange File Format designed by a group of software providers, localisation service providers, and localisation tools providers. It is intended to give any software provider a single interchange file format that can be understood by any localisation provider.  It is loosely based on the OpenTag version 1.2 specification and borrows from the TMX 1.2 specification. However, it is different enough from either one to be its own format.

Naming Convention

Elements and Attributes

The following naming conventions were used in writing this specification.

  1. Standard English letters
  2. Lower case only
  3. Hyphen, '-', may be used for concatenation
  4. Elements and attributes should not have the same name, even attributes of different elements
  5. Attribute names must be consistently defined throughout
  6. Industry standard terminology should be followed where possible
Values

Values are case sensitive. It is strongly recommended that lower-case values are used. The specification recommends a number of values for some attributes, these are all lower-case. The specification also recommends the use of the semi-colon as a concatenation separator for values. For example, multiple contacts may be listed for a <file> with the attribute-value written thusly, 'contact-name="Peter;Mark".'

Processing Instructions

XLIFF reserves processing instructions that begin with "xliff-" for definition at some future time. This specification has recommended "xliff-show-context-group" and "xliff-show-context" as a means of displaying context information to anyone processing a XLIFF file. Also, the processing instruction "xliff-update-count-group" has been given as an example. 

XLIFF File Extension

XLIFF documents use the '.xlf' extension. This conforms to a 8.3 standard. No other extension is recommended by the specification.


General Structure

XLIFF is XML, as such it begins with an XML declaration. After the XML declaration comes the XLIFF document itself, enclosed within the <xliff> element. A XLIFF document is composed of zero, one or more sections, each enclosed within a <file> element. The <file> element consists of a <header> element, which contains meta-data about the <file>, and a <body> element, which contains the extracted translatable data from the <file>. The translatable data is contained within <trans-unit> elements in <source> and <target> paired elements. These <trans-unit> elements can be grouped recursively in <group> elements. 

In addition, XLIFF provides the ability to maintain information about the processing of the file via the <phase> element. Possible translations for a specific <source> element can be generated from any number of MT/CAT systems and stored near the <source> in <alt-trans> elements. Context for a <source> that could be used by a translator or a TM system is provided by the <context> element. Binary data can be made available via the <bin-unit>, which may also be translated and contain an associated <trans-unit>.

Header

The XLIFF <header> contains meta-data about the file and the localisation process. It contains the <skl>, <phase-group>, <glossary>, <reference>, <count-group>, <prop-group>, and <note> elements. The <skl> element contains either a skeleton file of the file submitted for localisation or a hypertext link to that file. The <phase-group> element contains information about each processing phase used in localising the file; references to these phases are stored along with the translations. The <glossary> and <reference> elements may contain hypertext links to a glossary and reference file, respectively, or the actual glossary and reference data that can be used in the localisation process. The <count-group> element is a grouping element of count information of the entire file. The <prop-group> element contains tool-specific information used in combining the data with the skeleton file or storing the data in a repository. The <note> element contains instructions for the localisation process. The <count-group>, <prop-group>, and <note> elements can also appear in the body of the file.

File Body

The XLIFF <body> contains the structure and the localisable content from the file. It contains the <group>, <trans-unit> and <bin-unit> elements. The structure is described using the <group>, <trans-unit>, <bin-unit> elements. The <group> element is a general purpose structural element that allows describing the hierarchy of the file; it can contain other <group> elements as children as well as <trans-unit> and <bin-unit> elements. The <trans-unit> and <bin-unit> elements are the leaf nodes of the tree structure. The <trans-unit> element contains the text to be translated, the translations, and other related information. The <bin-unit> contains binary data that may or may not need to be translated; it also can contain translated versions of the binary object as well as other related information. In the <trans-unit> element the text to be translated is contained in a <source> element. This element may contain in-line elements that either remove the codes from the source (<g>, <x/>, <bx/>, <ex/>) or that mask off codes left in-line (<bpt>, <ept>, <sub>, <it>, <ph>).  The translated text is contained in a <target> element that has the same in-line codes available to it as does the <source> element. Translation matches generated by a TM or MT or entered by a translator may be provided in a <alt-trans> element, which also contains the <source> and <target> elements. At every structural level contextual information for the localisation process can be provided by the <context-group> named group element, count information by the <count-group> named group element, and tool-specific information by the <prop-group> named group element.

Named Groups

XLIFF allows grouping of certain elements into named groups. A named group is simply a grouping element with a name attribute. These named groups can be interspersed throughout the file with information designed for specific purposes. Using XML processing instructions different actions can be performed with specific named groups. The named group elements are <context-group>, <count-group> and <prop-group>

The <context-group> element contains context information for the source strings to be used in the translation process. There could be context information that is useful to the translator that should be shown and context information that is designed specifically for a translation tool. Each of these groups of context information can be grouped in a named <context-group> and processing instructions can tell the systems which <context-group> to use for each purpose. 

The <count-group> element contains counts of words, translations, dialogs, or anything else that may need to be counted in the file. A different named group could be stored by the client, translator, reviewer, and localisation engineer. Processing instructions could inform a system which of these <count-group> to update during the localisation process.

The <prop-group> element contains tool specific data that can be used in creating the translated file, storing the translations, and any other specific task. Processing instructions can indicate to the tools which named <prop-group> to use when updating the repository or combining the localised data with the skeleton file to create a translated file.

XLIFF Tree structure

The following figure shows the possible structure as a tree. Each element is followed by notation indicating its possible occurrence according to the following table. 


  1 = one
  + = one or more
  ? = zero or one
  * = zero, one or more



 <xliff>1

 |

 +---- <file>+

       |

       +---- <header>1

       |     |

       |     +---- <skl>?

       |     |     |

       |     |     +---- (<internal-file> | <external-file>)1

       |     |

       |     +---- <phase-group>?

       |     |     |

       |     |     +---- <phase>+

       |     |           |

       |     |           +---- <note>*

       |     |

       |     +---- <glossary>*

       |     |     |

       |     |     +---- (<internal-file> | <external-file>)1

       |     |

       |     +---- <reference>*

       |     |     |

       |     |     +---- (<internal-file> | <external-file>)1

       |     |

       |     +---- <note>*

       |     |

       |     +---- <count-group>*

       |     |     |

       |     |     +---- <count>*

       |     |

       |     +---- <prop-group>*

       |           |

       |           +---- <prop>*

       |

       +---- <body>1

             |

             +---- <group>*

             |     |

             |     +---- <context-group>*

             |     |     |

             |     |     +---- <context>+

             |     |

             |     +---- <count-group>*

             |     |

             |     +---- <prop-group>*

             |     |

             |     +---- <note>*

             |     |

             |     +---- <group>*

             |     |

             |     +---- <trans-unit>*

             |     |

             |     +---- <bin-unit>*

             |

             +---- <trans-unit>*

             |     |

             |     +---- <source>1 & <target>?

             |     |     |

             |     |     +---- <bpt>* or <ept>* or <ph>* or <it>*

             |     |     |     |

             |     |     |     +---- <sub>*

             |     |     |           |

             |     |     |           +---- <bpt>* or <ept>* or <ph>* or <it>*

             |     |     |           |

             |     |     |           +---- <g>* or <mrk>*

             |     |     |           |

             |     |     |           +---- <x/>* or <bx/>* or <ex/>*

             |     |     |

             |     |     +---- <g>* or <mrk>*

             |     |     |     |

             |     |     |     +---- <bpt>* or <ept>* or <ph>* or <it>*

             |     |     |     |

             |     |     |     +---- <g>* or <mrk>*

             |     |     |     |

             |     |     |     +---- <x/>* or <bx/>* or <ex/>*

             |     |     |

             |     |     +---- <x/>* or <bx/>* or <ex/>*

             |     |

             |     +---- <context-group>*

             |     |

             |     +---- <count-group>*

             |     |

             |     +---- <prop-group>*

             |     |

             |     +---- <note>*

             |     |

             |     +---- <alt-trans>*

             |           |

             |           +---- <context-group>*

             |           |

             |           +---- <source>? & <target>+

             |           |

             |           +---- <note>*

             |           |

             |           +---- <prop-group>*

             |

             +---- <bin-unit>*

                   |

                   +---- <bin-source>1 & <bin-target>?

                   |     |

                   |     +---- (<internal-file> | <external-file>)1

                   |

                   +---- <context-group>*

                   |

                   +---- <count-group>*

                   |

                   +---- <prop-group>*

                   |

                   +---- <note>*

                   |

                   +---- <trans-unit>*

 


Detailed Specifications

XML Declaration

The XML declaration is strongly recommended. It indicates the XML version and sets the defaults for the encoding of the file. 
<?xml version="1.0" encoding="iso-8859-1" ?>
As in all XML files, the default encoding for an XLIFF file is assumed to be either UTF-8, which is a superset of the 7-bit ASCII character set, or UTF-16, which is UCS-2 with surrogate pairs for code points above 65,535. Thus, for these character sets, the encoding declaration is not necessary. Further, all XML parsers support these character sets. If the encoding is in UCS-2 the first character of the file must be the Unicode Byte-Order-Mark, #xFEFF, which indicates the endianness of the file. Other character sets may be desirable and may be generally supported by XML parsers. These must be declared using the encoding declaration. The names of these character sets can be found in the XML 1.0 Specification.

In addition to the XML declaration, it is recommended to use the following DOCTYPE declaration:

<!DOCTYPE xliff PUBLIC "-//XLIFF//DTD XLIFF//EN">

Entities

There are five entity references predefined by XLIFF (these same five are also predefined by XML). Those entity references are listed below. The &lt; and &amp; entity references must always be used in place of the character they reference.

&lt; the less than sign, (<)
&gt; the greater than sign, (>)
&amp; the ampersand, (&)
&apos; the apostrophe or single quote, (')
&quot; the straight, double quotation mark (")

Minimum XLIFF

An ideal minimum XLIFF document will look something like this:

<?xml version="1.0" ?>

<!DOCTYPE xliff PUBLIC "-//XLIFF//DTD XLIFF//EN">

<xliff version="1.0">

 <file source-language="EN" datatype="plaintext" original="file.ext">

  <header></header>

  <body>

   <trans-unit id="1">

    <source>Hello World!</source>

   </trans-unit>

  </body>

 </file>

</xliff>

Elements and Attributes

XLIFF elements can be divided into five main categories: the top-level and header elements, the named group elements, the structural elements, the in-line elements, and the delimiter elements. Attributes are shared among them.
 
Top Level and Header elements

<xliff> <file> <header> <skl> <external-file> <internal-file> <glossary> <reference> <phase-group> <phase> <note>  

Named Group Elements <context-group>, <context>, <count-group>, <count>, <prop-group>, <prop>  
Structural elements

<body> <group> <trans-unit> <source> <target> <bin-unit> <bin-source> <bin-target> <alt-trans>  

In-line elements

<g> <x/> <bx/> <ex/> <bpt> <ept> <sub> <it> <ph>  

Delimiter elements

<mrk>  

Top-level and Header Elements

<xliff>
XLIFF document - The <xliff> element encloses all the other elements of the document.
Required attributes: version.
Optional attributes: xml:lang,  
Contents: One or more <file> elements.

<file>
File - The <file> element corresponds to a single extracted original document.
Required attributes: originalsource-language, datatype
Optional attributes: tool, date, xml:space, ts, category, target-language, product-name, product-version, build-num.
Contents: One <header> followed by one <body> element

<header>
File Header - The <header> element contains data relating to the <file> element.
Required attributes: None.
Optional attributes: None.
Contents: zero or one <skl> followed by
zero or one <phase-group>.followed by
zero, one or more <prop-group>, <glossary>, <reference>, <note>, <count-group> elements in any order

<skl>
SKL file - The <skl> element contains the skeleton file or the location of the skeleton file.
Required attributes: None.
Optional attributes: None
Contents: Either exactly one <internal-file> or one <external-file> element.

<internal-file>
Internal File - The <internal-file> element will contain the data for the skeleton file.
Required attributes: None.
Optional attributes: form, crc
Contents: embedded file

<external-file>
External File - an empty element that specifies the file location
Required attributes: href
Optional attributes: uid, crc
Contents: The <external-file> is an empty element, including attributes only.

<glossary>
Glossary - element points to the glossary source
Required attributes: None
Optional attributes:  
Contents: The glossary description and either exactly one <internal-file> or one <external-file> element.

<reference>
Reference - contains information about the reference material
Required attributes: None
Optional attributes:  
Contents: A description of the reference material and either exactly one <internal-file> or one <external-file> element.

<note>
Note - The <note> element is used to add localisation-related comments to the XLIFF document. The content of <note> may be instructions from developers about how to handle the <source>, comments from the translator about the translation, or any comment from anyone involved in processing the XLIFF file.
Required attributes: None.
Optional attributes:

xml:lang, from, priority

Contents: Text, no standard elements.

<phase-group>
Phase Group - The <phase-group> element contains phase information. This phase information is specific to the users.
Required attributes: None.
Optional attributes: None.
Contents: One or more <phase> elements.

<phase>
Phase information - The <phase> contains metadata about a particular version of XLIFF data.
Required attributes: phase-name, process-name
Optional attributes: company-name, tool, date, job-idcontact-name, contact-email, contact-phone
Contents: Zero, one or more <note> elements 

Named Group Elements

<count-group>
Count Group - The <count-group> element holds count elements relating to the level in the tree in which it occurs. Each group for <count> elements must be named, allowing different uses for each group. These uses can be controlled through the use of XML processing instructions. For example, the following instruction could indicate that any <count-group> element with a name set to 'value' should be updated during translation.

<?xliff-update-count-group name='value' ?>

Required attributes: name
Optional attributes:  
Contents: One or more <count> elements

<count>
Count - For each <count> element the required value attribute would hold the actual count amount, the required count-type attribute would indicate what kind of count the value attribute represents, and the optional unit attribute would indicate the unit of the count (by default: 'word'). A list of recommended values for count-type and unit is provided by the specification.
Required attributes: count-type
Optional attributes: unit
Contents: Number (the count value). No standard elements.

<context-group>
Context Group - The <context-group> element holds context elements relating to the level in the tree in which it occurs. Thus context can be set at a <group> level, a <trans-unit> level, or a <alt-trans> level. Each <context-group> element must be named, allowing different uses for each group. These uses can be controlled through the use of XML processing instructions.  For example, the following instruction could indicate that any <context-group> element with a name set to 'value' should be displayed to the end-user.

<?xliff-show-context-group name='value' ?>

Because the <context-group> element may occur at a very high level, a default context can be established for all <trans-unit> elements within a file. This default can be overridden at many subsequent levels.

Required attributes: name
Optional attributes: crc
Contents: One or more <context> elements

<context>
Context - The <context> element describes the context of a <source> within a <trans-unit> or a <alt-trans>.  The purpose of this context information is to allow certain pieces of text to have different translations depending on where they came from.  The translation of a piece of text may differ if it is a web form or a dialog or an Oracle form or a Lotus form for example.  This information is thus required by a translator when working on the file.  Likewise, the information may be used by any tool proposing to automatically leverage the text successfully. The visibility of <context> information can be controlled by XML processing instructions. For example, the following instruction may indicate that any <context> element with a context-type set to 'value' should be displayed to the end-user.

<?xliff-show-context context-type='value' ?>

Required attributes: context-type
Optional attributes: match-mandatory, crc
Contents: Text, no standard elements.

<prop-group>
Property Group - The <prop-group> element contains <prop> elements. Each <prop-group> element may be named, allowing different uses for each group. These uses can be controlled through the use of XML processing instructions.  
Required attributes: None.
Optional attributes: name
Contents: One or more <prop> elements

<prop>
Property - The <prop> element allows the tools to specify non-standard information in the XLIFF document. This information can be used by the tools that have produced the file or that translate the file or that do any other amount of processing specific to the producer.
Required attributes: prop-type.
Optional attributes: xml:lang 
Contents: Tool-specific data or text, no standard elements.

Structural Elements

The structural elements specify the frame of a XLIFF document as well as contextual and processing information. The <source> element contains the extracted data and, possibly, in-line elements.

<body>
File Body - The <body> element contains the structural elements.
Required attributes: None.
Optional attributes: None.
Contents: Zero, one or more <group>, <trans-unit>, <bin-unit> elements in any order

<group>
Group - The <group> element specifies a set of elements that should be processed together. For example: all the items of a menu, etc. 
Note: A <group> element can contain other <group> elements.
Required attributes: None.
Optional attributes: id, datatype, xml:space, ts, restype, resname, extradata, help-id, menu, menu-option, menu-name, coord, font, css-style, style, exstyle, extype
Contents: Zero, one or more <context-group> elements followed by:
Zero, one or more <count-group> elements followed by:
Zero, one or more <prop-group> elements followed by:
Zero, one or more <note> elements followed by:
Zero, one or more <group>, <trans-unit>, <bin-unit> elements in any order
All <context-group>, <count-group>, <prop-group>, and <note> elements pertain to the subsequent elements in the tree but can be overridden within a child element.

<trans-unit>
Translation Unit - The <trans-unit> elements contains a <source>, <target> and associated elements. Lists of recommended values for the datatype, restype, size-unit, and charclass attributes are available.
Required attributes: id
Optional attributes: approved, translate, reformat, xml:space, datatype, ts, phase-name, restype, resname, extradata, help-id, menu, menu-option, menu-name coord, font, css-style, style, exstyle, extype, maxbytes, minbytes, size-unit, maxheight, minheight, maxwidth, minwidth, charclass
Contents: One <source> element followed by 
Zero or one <target> elements followed by 
Zero, one or more <note>, <context-group>, <prop-group>, <alt-trans>, <count-group> elements in any order
All child elements of <trans-unit> pertain to their sibling <source> element

<source>
Source text - The <source> element is used to delimit a unit of text that could be a paragraph, a title, a menu item, a caption, etc. 
Required attributes:  
Optional attributes: xml:lang, ts
Contents:

Text, 
Zero, one or more of the following elements: <g>, <x/>, <bx/>, <ex/>, <bpt>, <ept>, <ph>, <it>, <mrk>

<target>
Target - The <target> element is used to delimit a unit of text. A paragraph in XLIFF does not necessarily correspond to a "paragraph" in a word-processor. It's simply a unit of text that could be a paragraph, a title, a menu item, a caption, etc. A list of preferred values for the restype attribute is available.
Required attributes:
Optional attributes: state, phase-name, xml:langts, restype, resnamecoord, font, css-style, style, exstyle
Contents:

Text, 
Zero, one or more of the following elements: <g>, <x/>, <bx/>, <ex/>, <bpt>, <ept>, <ph>, <it>, <mrk>

<alt-trans>
Translation Match - The <alt-trans> element contains a possible translation in a <target> along with optional context, notes, etc.
Required attributes:  
Optional attributes: match-qualitytool, crc, xml:lang, datatype, xml:spacets , restype, resnameextradata, help-idmenu, menu-option, menu-name, coord, fontcss-style, style, exstyle, extype, origin
Contents: Zero or One <source>, followed by 
One or more <target>, followed by 
Zero, one or more <note>, <context-group>, <prop-group> elements in any order
All child elements of <alt-trans> pertain to their sibling <target> element

<bin-unit>
Binary Unit - The bin-unit element contains a binary object that may or may not be translatable
Required attributes: id, mime-type
Optional attributes: approved, translate, reformat, ts, phase-name, restype, resname
Contents:

One  <bin-source> element followed by 
Zero or one <bin-target> elements followed by  
Zero, one or more <note>, <context-group>, <prop-group><trans-unit>, <count-group> elements in any order
All child elements of <bin-unit> pertain to their sibling <source> element

<bin-source>
Binary Source -  is the container for the binary source data
Required attributes:  
Optional attributes: ts
Contents:

one of <internal-file> or <external-file>

<bin-target>
Binary Target - is the container for the translated version of the binary data
Required attributes:  
Optional attributes:

mime-type, ts, state, phase-name, restype, resname

Contents:

one of <internal-file> or <external-file>


In-Line Elements

The in-line elements are the elements that can appear inside the <source> and <target> elements.

<g>
Generic group place-holder - The <g> element is used to replace any in-line code of the original document that has a beginning and an end and can be moved within its parent structural element. When possible, the ctype allows you to specify what kind of attribute the place-holder represents. A list of preferred values for the ctype attribute in <g> is available. 
Note: A <g> element can contain another <g> element. In this case, if the embedded group has an id attribute, it should never be moved outside of its parent group.
Required attributes: id 
Optional attributes: ctype, ts, clone
Contents:

Text, 
Zero, one or more of the following elements: <g>, <x/>, <bx/>, <ex/>, <bpt>, <ept>, <ph>, <it>, <mrk>

<x/>
Generic place-holder - The <x/> element is used to replace any code of the original document.
Required attributes: id
Optional attributes: ctypets, clone
Contents: Empty.

<bx/>
Begin Paired Code - The <bx/> element is used to replace a beginning paired code of the original document. It should be used for paired codes that do not follow XML well-formedness rules; i.e. no overlapping elements. If the paired codes follow that rule, it is strongly recommended that the <g> element is used because it simplifies processing. The <bx/> element should be followed by a matching <ex/> element. These paired elements are related via their 'rid' attribute.
Required attributes: id
Optional attributes: rid, ctypets, clone
Contents: Empty.

<ex/>
End Paired Code - The <ex/> element is used to replace a beginning paired code of the original document. It should be used for paired codes that do not follow XML well-formedness rules; i.e. no overlapping elements. If the paired codes follow that rule, it is strongly recommended that the <g> element is used because it simplifies processing. The <ex/> element should be preceded by a matching <bx/> element. These paired elements are related via their 'rid' attribute.
Required attributes: id
Optional attributes: rid, ts.
Contents: Empty.

<ph>
Place holder - The <ph> element is used to delimit a sequence of native stand-alone codes in the segment.
Required attributes: id
Optional attributes: ctype, ts, crcassoc(might delete), 
Contents: Code text. 
Zero, one or more <sub> elements.

<bpt>
Begin paired tag - The <bpt> element is used to delimit the beginning of a paired sequence of native codes. Each <bpt> has a corresponding <ept> element within the segment.
Required attributes: id
Optional attributes: rid, ctype , ts, crc
Contents: Code text. 
Zero, one or more <sub> elements.

<ept>
End paired tag - The <ept> element is used to delimit the end of a paired sequence of native codes. Each <ept> has a corresponding <bpt> element within the segment.
Required attributes: id
Optional attributes: ridts, crc
Contents: Code text. 
Zero, one or more <sub> elements.

<it>
Isolated tag - The <it> element is used to delimit a beginning/ending sequence of native codes that does not have its corresponding ending/beginning within the segment.
Required attributes: pos, id
Optional attributes: ctype, crc, ridts.
Contents: Code text. 
Zero, one or more <sub> elements.

<sub>
Sub-flow - The <sub> element is used to delimit sub-flow text inside a sequence of native code, for example: the definition of a footnote or the text of a title in a HTML anchor element.
Required attributes: None.
Optional attributes: datatype and ctype.
Contents:

Text, 
Zero, one or more of the following elements: <g>, <x/>, <bx/>, <ex/>, <bpt>, <ept>, <ph>, <it>, <mrk>

 

Delimiter Elements

XLIFF defines additional elements to support various types of text processing. These elements are usually not generated by the extraction module and are ignored most of the time during merging, but they can be very powerful with tools such as Machine Translation, glossary handling, quality assurance, etc.

<mrk>
Marker - The <mrk> element delimits a section of text that has special meaning, such as a terminological unit, a proper name, an item that should not be modified, etc. It can be used for various processing tasks. For example, to indicate to a Machine Translation tool, proper names that should not be translated, for terminology verification, to mark suspect expressions after a grammar checking. The <mrk> element is usually not generated by the extraction tool and it is not part of the tags used to merge the XLIFF file back into its original format. A list of preferred values for the type attribute in <mrk> is available.
Required attributes: mtype.
Optional attributes: mid, ts., comment
Contents:

Text, 
Zero, one or more of the following elements: <g>, <x/>, <bx/>, <ex/>, <bpt>, <ept>, <ph>, <it>, <mrk>


Attributes

This section lists the various attributes used in the XLIFF elements. An attribute is never specified more than once for each element. Along with some of the attributes are the Recommended Attribute Values. Values for these attributes are case sensitive. These lists are purely informative, the goal is to specify a preferred syntax so tools can have some level of compatibility.

 

Attributes

approved assoc build-num ctype category charclass comment company-name contact-email contact-name contact-phone coord count-type crc css-style datatype date exstyle extradata extype font form from name help-id href id job-id match-mandatory match-quality maxheight maxbytes maxwidth menu menu-name menu-option mid mime-type minheight minbytes minwidth mtype name original phase-name pos priority process-name product-name product-version prop-type reformat resname restype rid source-language state style tool target-language translate ts uid unit value version word-count  

XML Namespace Attributes xml:lang xml:space 
XLIFF Attributes

approved
Approved - the final status
Value description: Boolean: "yes" or "no"
Default value: "no"
Element using it: <trans-unit> <bin-unit>

assoc
Association - of a <ph> with the text prior or after
Value description: Alphanumeric
Default value: blank
Element using it: <ph>

build-num
Build Number - the build number of this version
Value description: Alphanumeric
Default value: blank
Element using it: <file>

category
category - This would give information on the subject of what is being translated.
Value description: Text
Default value: Empty string.
Element using it: <file>  

charclass
Character class - This would indicate that a translation is restricted to some character class (ascii only, katakana only, uppercase only, etc.).
Value description: Text
Default value: Empty string.
Element using it: <trans-unit>

clone
Clone - This indicates that a copy of the in-line element can be made and placed in the <target>
Value description: Boolean: "yes" or "no"
Default value: "yes"
Element using it: <g>, <x/>, <bx/> 

comment
Comment - a comment in a tag
Value description: Alphanumeric
Default value: blank
Element using it: <mrk>  

company-name
Company-name - The client name.
Value description: Text
Default value: Empty string.
Element using it: <phase>  

contact-email
Contact-email - The contact email at the client company (email of the contact-name person)
Value description: Text
Default value: Empty string.
Element using it: <phase>

contact-name
Contact-name - The contact at the client company
Value description: Text
Default value: Empty string.
Element using it: <phase>

contact-phone
Contact-phone - phone number of the contact-name person
Value description: Text
Default value: Empty string.
Element using it: <phase>

context-type
Context Type - The type attribute specifies the context and the type of resource or style of the data of a given element. For example, to define if it is a label, or a menu item in the case of resource-type data, or the style in the case of document-related data.
Value description: The value will depend on each element. A list of recommended values is provided by the standard, below.
Default value: Empty string.
Elements using it: <context>

Values for the context-type attribute of the <context> element. This list is not exhaustive.

coord
Coordinates - The coord attribute specifies the x, y, cx and cy coordinates of the text for a given element. The cx and cy values must represent the width and the height (like in a Windows resource file). The extraction and merging tools must make the right corrections for the original format that uses a top-left/bottom-right coordinate system.
Value description: Four decimal (possibly negative) values, in the order: x,y,cx and cy, separated by semi-colons. NULL values may be entered as "#"; e.g. "#,#,183,272".
Default value: Empty string.
Elements using it: <group>, <trans-unit> <target> <alt-trans>

count-type
Count Type - The count-type attribute specifies the purpose of the count.
Value description: Text. The value will depend on the purpose. These values may correspond to phases. A list of recommended values is provided by the standard, below.
Default value: None
Elements using it: <count>

Values for the count-type attribute of the <count> element. This list is not exhaustive.

crc
crc - A private crc value used to verify data as it is returned to the producer. The generation and verification of this number is tool-specific.
Value description: number
Default value: null
Element using it: <internal-file> <external-file> <context-group>, <context> <alt-trans> <bpt> <ept> <it> <ph> 

css-style
Cascading Style Sheet Style - The css-style attribute allows any valid CSS style statement to be specified.
Value description: Text, the value is subject to CSS syntax rules.
Default value: Empty string.
Elements using it: <group>, <trans-unit> <target> <alt-trans>

ctype
Content Type - The type attribute specifies the content and the type of resource or style of the data of a given element. For example, to define if it is a label, or a menu item in the case of resource-type data, or the style in the case of document-related data.
Value description: The value will depend on each element. A list of recommended values is provided by the standard, below.
Default value: Empty string.
Elements using it: <g>, <x/> <bx/> <bpt> <sub> <it> <ph>

Values for the ctype attribute. This list is not exhaustive.


Values for the ctype attribute of the <x/> element. This list is not exhaustive.

datatype
Data type - The datatype attribute specifies the kind of text contained in the element. Depending on that type, you may apply different processes to the data.
Value description: Not defined by the standard. A list of recommended values is provided by the standard, below.
Default value: Empty string.
Elements using it: <file>, <group>, <trans-unit> <alt-trans> <sub>

Recommended values for the datatype attribute. This list is not exhaustive.

date
Date - The date attribute indicates when a given element was created or modified.
Value description:

ISO 8601 Date

Recommended: CCYY-MM-DDThh:mm:ssZ 
 Where:
CCYY ... year (4 digits), MM ... month (2 digits), DD ... day (2 digits)
hh ... hour (2 digits), mm ... minute (2 digits), ss ... second (2 digits)
Z ... UTC time 

Default value: Empty string.
Element using it:

<file> <phase>

exstyle
Extended style of the window control
Value description: text
Default value: Empty string.
Element using it: <group>, <trans-unit>, <target>, <alt-trans>

extradata
Extra data for the window control
Value description: Text
Default value: Empty string.
Element using it: <group>. <trans-unit> <alt-trans>

extype
Extended Type
Value description: Text
Default value: Empty string.
Elements using it: <group> <trans-unit> <alt-trans>

font
Font - The font attribute specifies the font name, size, and weight of the text for a given element. The font attribute would generally be used for resource-type data: change of font in document-type data can be marked with the <g> element.
Value description: Name of the font and its size , weight separated by a semi-colon.
Default value: Empty string.
Elements using it: <group>, <trans-unit> <target> <alt-trans>

form
Format - Describes the type of encoding used in <internal-file> element.
Value description: Text. The value will depend on each element. 
Default value: text.
Element using it: <internal-file>.

Values for the form attribute of the <internal-file> element. This list is not exhaustive. Other values may come from IETF specifications for MIME http://www.ietf.org/rfc/rfc1341.txt.

from
From - The person entering the note
Value description: Text
Default value: Empty string.
Element using it: <note>.

help-id
help id of the window control
Value description: A number.
Default value: Empty string.
Element using it: <group>. <trans-unit> <alt-trans>

href
href - The location of file or an URL.
Value description: Text
Default value: Empty string.
Element using it: <external-file>

id
Identifier - The id attribute is used in many elements, usually as a unique reference to the original corresponding format for the given element.
Value description:

Alpha-numeric. It is recommended to not use spaces.

Default value: Empty string.
Elements using it:

<group>, <trans-unit>, <bin-unit>, <g>, <x/>, <bx/>, <ex/>, <bpt> <ept> <it> <ph>

job-id
Job-id - The id given to the localisation job
Value description: Text
Default value: Empty string.
Element using it: <phase>

match-mandatory
Match Mandatory - requires that any alt-trans of the parent <trans-unit> must have the same <context> as the <trans-unit>
Value description: Boolean: "yes" or "no"
Default value: "no"
Element using it: <context>

match-quality
Match Quality - The match quality of the <alt-trans>. This will be tool specific and could be a percentage or an arbitrary value; e.g. "high".
Value description: text
Default value: empty
Element using it: <alt-trans> 

maxheight
Maximum Height - The maximum height for the <target> of a <trans-unit>. This could be interpretted as lines, pixels, or any other relevant unit. The units are determined by the size-unit attribute, which defaults to pixels.
Value description: Number
Default value: undefined
Element using it: <trans-unit> 

maxbytes
Maximum Bytes - The maximum number of bytes for the <target> of a <trans-unit>. The encoding is tool-specific.
Value description: Number
Default value: undefined
Element using it: <trans-unit> 

maxwidth
Maximum Width - The maximum width for the <target> of a <trans-unit>. This could be interpretted as lines, pixels, or any other relevant unit. The units are determined by the size-unit attribute, which defaults to pixels.
Value description: Number
Default value: undefined
Element using it: <trans-unit> 

menu
Menu of the window control
Value description: Text
Default value: Empty string.
Element using it: <group>. <trans-unit> <alt-trans>

menu-name
Menu name of the window control
Value description: Text
Default value: Empty string.
Element using it: <group>, <trans-unit> <alt-trans>

menu-option
Menu Option of the window control
Value description: Number
Default value: Empty string.
Element using it: <group>. <trans-unit> <alt-trans>

mid
Marker ID - Identifier for a <mrk> element.
Value description: A number.
Default value: Empty string.
Element using it: <mrk>

mime-type
Mime Type - indicates what the binary object is. This is important in determining how to edit the binary object.
Value description: The value will depend on each element. A list of preferred values is available from the MIME specification (http://www.ietf.org/rfc/rfc1341.txt)..
Default value: Empty string.
Elements using it: <bin-unit> <bin-target>

minheight
Mininum Height - The minimum height for the <target> of a <trans-unit>. This could be interpretted as lines, pixels, or any other relevant unit. The units are determined by the size-unit attribute, which defaults to pixels.
Value description: Number
Default value: undefined
Element using it: <trans-unit> 

minbytes
Mininum Bytes - The minimum number of bytes for the <target> of a <trans-unit>. The encoding is tool-specific.
Value description: Number
Default value: undefined
Element using it: <trans-unit> 

minwidth
Minimum Width - The minimum width for the <target> of a <trans-unit>. This could be interpretted as lines, pixels, or any other relevant unit. The units are determined by the size-unit attribute, which defaults to pixels.
Value description: Number
Default value: undefined
Element using it: <trans-unit> 

mtype
Marker Type - This attribute defines what the <mrk> element is defining within the content of a <source> or <target>.
Value description: The value will depend on each element. A list of recommended values is provided by the standard, below.
Default value: Empty string.
Elements using it: <mrk>

Values for the mtype attribute of the <mrk> element. This list is not exhaustive.

 

name
Name - The name attribute specifies the user-defined name of an element.
Value description: Text
Default value: Empty string.
Elements using it: <prop-group>, <context-group>, <count-group>

origin
Translation Match Origin - The origin attribute specifies where a translation match came from; i.e. from a previous version of the same product, a different product, a shared translation memory, etc.
Value description: Text.
Default value: Empty string.
Element using it: <alt-trans>

original
Original file - The original attribute specifies the name of the original file from which the contents of a <file> element has been extracted.
Value description: Text.
Default value: Empty string.
Element using it: <file>.

phase-name
Phase Name - The name of version. This attribute is also used in the whole XLIFF file as an attribute, refering to the <phase> element.
Value description: Text
Default value: Empty string.
Element using it: <phase>, <trans-unit>, <target>, <bin-unit>, <bin-target>

pos
Position - The beginning or end of an isolated tag
Value description: "open" or "close"
Default value:  
Element using it: <it>

priority
Priority - The priority of a <note>
Value description: Number 1 - 10, 1 being highest
Default value: "1"
Element using it: <note>

process-name
Process Name - The name of used process for given version (e.g. Translation, Proofreading, Sizing, etc.)
Value description: Text
Default value: Empty string.
Element using it: <phase>

product-name
Product Name - The name of the product which uses this file
Value description: Text
Default value: Empty string.
Element using it: <file>

product-version
Product Version - the version of the product
Value description: Alphanumeric
Default value: blank
Element using it: <file>

prop-type
Property Type - The type attribute specifies the context and the type of resource or style of the data of a given element. For example, to define if it is a label, or a menu item in the case of resource-type data, or the style in the case of document-related data.
Value description: This is a user-defined value. 
Default value: Empty string.
Elements using it: <prop>

reformat
Reformat - indicates whether the target can be formatted (size, font, etc.) different than the source.
Value description: Boolean: "yes" or "no"
Default value: "yes"
Element using it: <trans-unit> <bin-unit>

resname
Resource Name of the window control
Value description: text
Default value: Empty string.
Element using it: <group>. <trans-unit>, <alt-trans> <target>, <bin-unit>, <bin-target>

restype
Resource Type - of the container element.
Value description: Text. A list of recommended values is provided by the standard, below.
Default value: Empty string.
Element using it: <group>. <trans-unit> <target> <alt-trans>, <bin-unit>, <bin-target>

Recommended values for the restype attribute. This list is not exhaustive.

rid
Reference identifier - The rid attribute is used to link different elements that are related. For example, a reference to its definition, or paragraphs belonging to the same group, etc.
Value description: Alpha-numeric. It is recommended to not use spaces.
Default value: Empty string.
Elements using it: <bpt> <ept> <it> <bx/> <ex/>

size-unit
Units of Size Attributes - The size-unit attribute specifies the units of measure used in the maxheight, minheight, maxwidth, and minwidth attributes.
Value description: Text. A list of recommended values is provided by the standard, below.
Default value: "pixel"
Element using it: <trans-unit> 

Recommended values for the size-unit attribute. This list is not exhaustive.

source-language
Source Language - The source language for the file
Value description: A language/locale code as described in the IETF RFC 1766 (http://www.ietf.org/rfc/rfc1766.txt).  
Note: Unlike other attributes, the values for source-language are not case-sensitive.
Note: IETF RFC 3066 (http://www.ietf.org/rfc/rfc3066.txt) has superceded IETF RFC 1766. It specifies the use of ISO 639 3-letter codes when an appropriate ISO 639 2-letter codes is not available.
Default value: Empty string.
Element using it: <file>

state
State - the status of a particular translation in a <target> or <bin-target>. 
Value description: Text. A list of recommended values is provided by the standard, below.
Default value: empty
Element using it: <target> <bin-target>

Recommended values for the state attribute. This list is not exhaustive.

style
Style - resource style of the window control
Value description: Text
Default value: Empty string.
Element using it: <group>, <trans-unit>, <target>, <alt-trans>

target-language
Target Language - The target language for the file
Value description: A language/locale code as described in the IETF RFC 1766 (http://www.ietf.org/rfc/rfc1766.txt).
Note: Unlike other attributes, the values for source-language are not case-sensitive.
Note: IETF RFC 3066 (http://www.ietf.org/rfc/rfc3066.txt) has superceded IETF RFC 1766. It specifies the use of ISO 639 3-letter codes when an appropriate ISO 639 2-letter codes is not available.
Default value: Empty string.
Element using it: <file>

tool
Creation tool - The tool attribute is used to specify the signature and version of the tool that created or modified the document.
Value description: Text
Default value: "manual"
Elements using it:

<file>, <phase>, <alt-trans>

translate
Translate - Whether or not the text referred to should be translated
Value description: A boolean: "yes" or "no".
Default value: "yes"
Element using it: <trans-unit> <bin-unit>

ts
Tool-specific data - The ts attribute allows you to include short data understood by a specific toolset. 
Note: You can also use the <prop> element to define large properties at the element level.
Value description: Not defined by the standard.
Default value: Empty string.
Elements using it: <file>, <group>, <trans-unit>, <source>, <target>, <bin-unit>, <bin-source>, <bin-target>, <alt-trans>, <mrk>, <g>, <x/>, <bx/>, <ex/>, <bpt>, <ept>, <ph>, <it>

uid
uid - The id used in the skeleton file
Value description: text
Default value: Empty string.
Element using it: <external-file>.

unit
Unit - The units counted in a <count> element
Value description: Text. A list of recommended values is provided by the standard, below.
Default value: Empty string.
Element using it: <count>.

  Recommended values for the unit attribute. This list is not exhaustive.

 

version
XLIFF version - The version attribute is used to specify the format version of the XLIFF document.
Value description: Text
Default value: Fixed as "1.0".
Element using it: <xliff>.

 

XML Namespace Attributes

xml:lang
xml:lang - The xml:lang attribute specifies the locale of the text of a given element. 
Value description: A language/locale code as described in the IETF RFC 1766 (http://www.ietf.org/rfc/rfc1766.txt). This declared value is considered to apply to all elements within the content of the element where it is specified, unless overriden with another instance of the xml:lang attribute.
Note: Unlike the other XLIFF attributes, the values for xml:lang are not case-sensitive.
Note: IETF RFC 3066 (http://www.ietf.org/rfc/rfc3066.txt) has superceded IETF RFC 1766. It specifies the use of ISO 639 3-letter codes when an appropriate ISO 639 2-letter codes is not available.
Default value: Empty string.
Elements using it: <xliff> <note> <prop> <source> <target> <alt-trans>.

xml:space
White spaces - The xml:space attribute specifies how white spaces (ASCII spaces, tabs and line-breaks) should be treated.
Value description: default or preserve
The value "default" signals that applications' default white-space processing modes are acceptable for this element; the value "preserve" indicates the intent that applications preserve all the white space. This declared intent is considered to apply to all elements within the content of the element where it is specified, unless overriden with another instance of the xml:space attribute.
Default value: default
Elements using it: <file>, <group>, <trans-unit>, <alt-trans>

 


References

XML specifications repository : at W3C
IETF RFC 3066 : Language / Locale codes, supercedes RFC 1766
IETF RFC 1766 : Language / Locale codes
ISO 639:1988 : Code for the representation of names of languages
ISO 3166:1993 : Code for the representation of names of countries
IANA character set names : Official character sets naming conventions
MIME Specification : IETF specifications for MIME
W3C Site
Unicode Consortium Site
ISO Site

 


Change Log

Date changed Who changed notes
Apr 27, 2001 John Reid XLIFF 1.0 Specification posted
May 21, 2001 John Reid Corrected Minimum XLIFF example. Added phase-name attribute to <trans-unit> and <bin-unit>.
May 30, 2001 John Reid Reserved processing instructions beginning with "xliff-".