OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

dita message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [Bulk] RE: [dita] Revised xml:lang proposal


My bad. Thanks Paul for picking that up. I've attached the fix file.

Best Regards,
Gershon


-----Original Message-----
From: Grosso, Paul [mailto:pgrosso@ptc.com] 
Sent: Tuesday, April 11, 2006 5:23 PM
To: dita@lists.oasis-open.org
Subject: [Bulk] RE: [dita] Revised xml:lang proposal

 

> -----Original Message-----
> From: Gershon L Joseph [mailto:gershon@tech-tav.com]
> Sent: Tuesday, 2006 April 11 03:15
> To: dita@lists.oasis-open.org
> Subject: [dita] Revised xml:lang proposal
> 
> Here is the revised and hopefully final xml:lang proposal based on TC 
> feedback over the past week and discussions with the translation SC 
> yesterday.

The good news is that I don't have any more quibbles about "boundary"
language.

But I note in the example that the conref attribute refers to
warningsAcme.xml, but the "comments" refer to the file name of the included
topic as warningsAcme.dita

paul
Title: Proposal for xml:lang Attribute

Proposal for xml:lang Attribute

Gershon Joseph


Name

xml:lang

Description

Specifies the language (and optionally the locale) of the element content. The intent declared with xml:lang is considered to apply to all attributes and content of the element where it is specified, unless overridden with an instance of xml:lang on another element within that content. When no xml:lang value is supplied, the processor should assume a default value.

This attribute must be set to a language identifier, as defined by IETF RFC 3066 (http://www.ietf.org/rfc/rfc3066.txt) or successor.

Data Type

NMTOKEN

Default Value

Not set

Required

#IMPLIED

Recommended Usage

For a DITA document that contains a single language, the highest level element containing content should always set the xml:lang attribute to the language (and optionally the locale) that applies to the document. Since the dita element does not support the xml:lang element, the highest level element that should set the xml:lang attribute is the topic element (or derivatives at the same level).

For a DITA document that contains more than one language, the highest level element should always set the xml:lang attribute to the primary language (and optionally the locale) that applies to the document. Wherever an alternate language occurs in the document, the element containing the text or structure in the alternate language should set the xml:lang attribute appropriately. The above way of overriding the default document language applies to both block and inline elements that use the alternate language.

Using markup to identify language is strongly recommended to make the document as portable as possible. In addition, the marked-up document can be read and understood by humans. Finally, when updating the document, the boundaries of each language are clear, which makes it much easier for the author to update the document.

Maps

The xml:lang attribute can be specified on the map element. The expected language inheritance behavior on the map is similar to that on the topic. That is, the primary language for the map should be set on the map element (or assumed by the application if not explicitly set), and should remain in effect for all children unless a child specifies a different value for xml:lang.

If the xml:lang value on a topicref does not match the xml:lang value on a topic, the value on the topic takes precedence.

Conrefs

When conref is used to include content from one topic in another topic, the xml:lang value must be obtained from the topic being included. If the included content does not explicitly set xml:lang, the processor must obtain the xml:lang value from the nearest parent of the included content. If the included content does not have a parent element that sets xml:lang, the application should default to the same value used for topics that do not set the xml:lang attribute.

This behavior is shown in the following example, where the xml:lang value of the included note is obtained from its ancestor section element (id="qqwwee") that sets xml:lang. In this example, the xml:lang value applied to the note whose id is "mynote" is "fr".

****************installingAcme.xml*********************
<?xml version="1.0"?>
<!DOCTYPE dita PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<dita>
    <topic id="topic_3FD87D" xml:lang="en">
        <title>Installing Acme</title>
        <shortdesc>Step by step details on how to install Acme</shortdesc>
        <body>
            <p id="p_60A72">Welcome message goes here</p>
            <section id="section_C25">
                <title>Before you begin</title>
                <p id="p_E57324D">Special notes when installing Acme in
                    France:</p>
                <note id="mynote" conref="warningsAcme.xml#topic_warnings/frenchwarnings"></note>
            </section>
        </body>
    </topic>
</dita>
*******************************************


****************warningsAcme.xml*********************
<?xml version="1.0"?>
<!DOCTYPE dita PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<dita>
    <topic id="topic_warnings">
        <title>Warnings</title>
        <shortdesc>warnings in all languages</shortdesc>
        <body>
            <section id="qqwwee" xml:lang="fr">
                <title>French warnings</title>
                <p id="p_F2A">These are our French warnings.</p>
                <note id="frenchwarnings">Note in French!</note>
            </section>
            <section xml:lang="en" id="aassdd">
                <title>English warnings</title>
                <p id="p_5F961">These are our English warnings.</p>
                <note id="englishwarnings">Note in English!</note>
            </section>
        </body>
    </topic>
</dita>
*************************************

Use Case

Technical manuals frequently contain entire topics that are in languages different from the primary source languages of most of the topics. A manual in English, for example, may contain warnings that are in multiple languages, or have multiple topics of warnings each in individual languages. A manual may also contain regulatory notices as individual topics in different languages.

Therefore, a map might reference topics that are written in more than one language. In this case, each topic (or section within the topic) would use the xml:lang attribute to specify the language of the topic or section. Processors identify the language of each topic or section by the xml:lang attribute set in the topic file. However, it may be useful to specify the xml:lang attribute at the map level (on topicref elements) to help identify the language of each topic the map refers to.

Note to Vendors/Implementors

Applications should ensure every highest level topic element and the root map element explicitly assign the xml:lang attribute.



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]