1 <refentry xmlns="http://docbook.org/ns/docbook"
2 xmlns:xlink="http://www.w3.org/1999/xlink"
3 xmlns:xi="http://www.w3.org/2001/XInclude"
4 xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
5 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 version="5.0" xml:id="olink.lang.fallback.sequence">
8 <refentrytitle>olink.lang.fallback.sequence</refentrytitle>
9 <refmiscinfo class="other" otherclass="datatype">string</refmiscinfo>
12 <refname>olink.lang.fallback.sequence</refname>
13 <refpurpose>look up translated documents if olink not found?</refpurpose>
16 <refsynopsisdiv> <src:fragment xml:id="olink.lang.fallback.sequence.frag">
17 <xsl:param name="olink.lang.fallback.sequence"></xsl:param>
20 <refsection><info><title>Description</title></info>
23 <para>This parameter defines a list of lang values
24 to search among to resolve olinks.
27 <para>Normally an olink tries to resolve to a document in the same
28 language as the olink itself. The language of an olink
29 is determined by its nearest ancestor element with a
30 <tag class="attribute">lang</tag> attribute, otherwise the
31 value of the <parameter>l10n.gentext.default.lang</parameter>
35 <para>An olink database can contain target data for the same
36 document in multiple languages. Each set of data has the
37 same value for the <tag>targetdoc</tag> attribute in
38 the <tag>document</tag> element in the database, but with a
39 different <tag>lang</tag> attribute value.
42 <para>When an olink is being resolved, the target is first
43 sought in the document with the same language as the olink.
44 If no match is found there, then this parameter is consulted
45 for additional languages to try.</para>
47 <para>The <parameter>olink.lang.fallback.sequence</parameter>
48 must be a whitespace separated list of lang values to
49 try. The first one with a match in the olink database is used.
50 The default value is empty.</para>
52 <para>For example, a document might be written in German
53 and contain an olink with
54 <literal>targetdoc="adminguide"</literal>.
55 When the document is processed, the processor
56 first looks for a target dataset in the
57 olink database starting with:</para>
59 <literallayout><literal><document targetdoc="adminguide" lang="de"></literal>.
62 <para>If there is no such element, then the
63 <parameter>olink.lang.fallback.sequence</parameter>
64 parameter is consulted.
65 If its value is, for example, <quote>fr en</quote>, then the processor next
66 looks for <literal>targetdoc="adminguide" lang="fr"</literal>, and
67 then for <literal>targetdoc="adminguide" lang="en"</literal>.
68 If there is still no match, it looks for
69 <literal>targetdoc="adminguide"</literal> with no
73 <para>This parameter is useful when a set of documents is only
74 partially translated, or is in the process of being translated.
75 If a target of an olink has not yet been translated, then this
76 parameter permits the processor to look for the document in
77 other languages. This assumes the reader would rather have
78 a link to a document in a different language than to have