<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.6.2">
</HEAD>
<BODY>
On Mon, 2005-09-19 at 21:17 +0200, Martin Wunderlich wrote:<BR>
<BR>
Hi,<BR>
<BR>
<BR>
<FONT COLOR="#000000"> </FONT>
<BLOCKQUOTE TYPE=CITE>
<FONT SIZE="2"><FONT COLOR="#0000ff"> I presume I might have missed the section in the specs where it talks about inheritance of attributes. </FONT></FONT><BR>
</BLOCKQUOTE>
<BR>
Definition of "source-language" at <A HREF="http://www.oasis-open.org/committees/xliff/documents/xliff-specification.htm#source-language">http://www.oasis-open.org/committees/xliff/documents/xliff-specification.htm#source-language</A> says:<BR>
<BR>
<BLOCKQUOTE>
The source language can be also specified by <TT><A HREF="http://www.oasis-open.org/committees/xliff/documents/xliff-specification.htm#xml:lang">xml:lang</A></TT> in each <TT><A HREF="http://www.oasis-open.org/committees/xliff/documents/xliff-specification.htm#source"><source></A></TT> element. The values of <TT> source-language</TT> and <TT><A HREF="http://www.oasis-open.org/committees/xliff/documents/xliff-specification.htm#xml:lang">xml:lang</A></TT> in <TT><A HREF="http://www.oasis-open.org/committees/xliff/documents/xliff-specification.htm#source"><source></A></TT> can be different only in an <TT> <A HREF="http://www.oasis-open.org/committees/xliff/documents/xliff-specification.htm#alt-trans"><alt-trans></A></TT> element.<BR>
</BLOCKQUOTE>
<BR>
In definition of <source> at <A HREF="http://www.oasis-open.org/committees/xliff/documents/xliff-specification.htm#source">http://www.oasis-open.org/committees/xliff/documents/xliff-specification.htm#source</A> you can read:<BR>
<BR>
<BLOCKQUOTE>
The optional <TT><A HREF="http://www.oasis-open.org/committees/xliff/documents/xliff-specification.htm#xml:lang">xml:lang</A></TT> attribute is used to specify the content language of the <TT><source></TT>; this should always match <TT><A HREF="http://www.oasis-open.org/committees/xliff/documents/xliff-specification.htm#source-language">source-language</A></TT> as a child of <TT><trans-unit></TT> but can vary as a child of <TT><alt-trans></TT>.<BR>
</BLOCKQUOTE>
<BR>
The word inheritance is not used directly, but if you read carefully you will realise that as the only allowed value is the one declared at higher level, you can safely assume that the value is "inherited" if not explicitly declared.<BR>
<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<FONT SIZE="2"><FONT COLOR="#0000ff">It still leaves the question of how to deal with any conflicts, e.g. if the source-language of the file is set to one value and the xml:lang att in the source elements that are children of the file is set to a different value. Which one would take precedence? </FONT></FONT><BR>
</BLOCKQUOTE>
<BR>
If the language declared in <source> is different from the one declared in <file> then you are in presence of an invalid XLIFF file. This may be difficult to enforce with an schema and impossible with a DTD, but the spirit of the spec is clear. An XLIFF validator should contemplate this case. For what it's worth, the TMXValidator program at my web site (www.maxprograms.com) checks details like this.<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<FONT SIZE="2"><FONT COLOR="#0000ff">Also, any ideas on what the xml:lang att in the xliff element would specify exactly?</FONT></FONT><BR>
</BLOCKQUOTE>
<BR>
The "xml:lang" attribute is defined in XML standard and adopted by XLIFF. The specs say:<BR>
<BR>
<BLOCKQUOTE>
A special <A HREF="http://www.w3.org/TR/REC-xml/#dt-attr">attribute</A> named <TT>xml:lang</TT> <I>MAY</I> be inserted in documents to specify the language used in the contents and attribute values of any element in an XML document.<BR>
<BR>
The intent declared with <TT>xml:lang</TT> is considered to apply to all attributes and content of the element where it is specified, unless overridden with an instance of <TT>xml:lang</TT> on another element within that content.<BR>
</BLOCKQUOTE>
<BR>
This can be interpreted in several ways. My personal interpretation is that you can declare a default language at top level, which could be either source or target language, and then override it as needed at <target> or <source > level. Somewhat silly, but possible. Just ignore this attribute. I think it was included in the specs for completeness only.<BR>
<BR>
Regards,<BR>
Rodolfo
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
Rodolfo M. Raya <<A HREF="mailto:rodolfo@heartsome.net">rodolfo@heartsome.net</A>><BR>
Heartsome Holdings Pte Ltd
</TD>
</TR>
</TABLE>
</BODY>
</HTML>