changeset 106:56457a474903

If text of the link is not provided, the @id is used.
author Ruslan Ermilov <ru@nginx.com>
date Wed, 19 Oct 2011 10:39:49 +0000
parents 1aa4f50144e4
children ee725af08951
files xml/en/docs/http/ngx_http_core_module.xml xml/ru/docs/control.xml xml/ru/docs/hash.xml xml/ru/docs/http/ngx_http_core_module.xml xml/ru/docs/http/ngx_http_dav_module.xml xml/ru/docs/http/ngx_http_fastcgi_module.xml xml/ru/docs/http/ngx_http_gzip_module.xml xml/ru/docs/http/ngx_http_gzip_static_module.xml xml/ru/docs/http/ngx_http_log_module.xml xml/ru/docs/http/ngx_http_perl_module.xml xml/ru/docs/http/ngx_http_proxy_module.xml xml/ru/docs/http/ngx_http_rewrite_module.xml xml/ru/docs/http/ngx_http_ssl_module.xml xml/ru/docs/http/ngx_http_upstream.xml xsls/link.xsls
diffstat 15 files changed, 78 insertions(+), 74 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_core_module.xml	Wed Oct 19 08:30:46 2011 +0000
+++ b/xml/en/docs/http/ngx_http_core_module.xml	Wed Oct 19 10:39:49 2011 +0000
@@ -66,7 +66,7 @@
 
 <para>
 For AIO to work,
-<link id="sendfile">sendfile</link>
+<link id="sendfile"/>
 needs to be disabled:
 <example>
 location /video/ {
@@ -94,14 +94,14 @@
 one byte. The FreeBSD kernel then loads the first 128K bytes
 of a file into memory, however next reads will only load data
 in 16K chunks. This can be tuned using the
-<link id="read_ahead">read_ahead</link>
+<link id="read_ahead"/>
 directive.
 </para>
 
 <para>
 On Linux, AIO is usable starting from kernel version 2.6.22;
 plus, it is also necessary to enable
-<link id="directio">directio</link>,
+<link id="directio"/>,
 otherwise reading will be blocking:
 <example>
 location /video/ {
@@ -114,7 +114,7 @@
 
 <para>
 On Linux,
-<link id="directio">directio</link>
+<link id="directio"/>
 can only be used for reading blocks that are aligned on 512-byte
 boundaries (or 4K for XFS).
 Reading of unaligned file's end is still made in blocking mode.
@@ -122,9 +122,9 @@
 not from the beginning of a file: reading of unaligned data at the
 beginning and end of a file will be blocking.
 There is no need to turn off
-<link id="sendfile">sendfile</link>
+<link id="sendfile"/>
 explicitly as it is turned off automatically when
-<link id="directio">directio</link>
+<link id="directio"/>
 is used.
 </para>
 
@@ -175,7 +175,7 @@
 }
 </example>
 it is better to use the
-<link id="root">root</link>
+<link id="root"/>
 directive instead:
 <example>
 location /images/ {
@@ -324,7 +324,7 @@
 it may not fit into 1K.
 If a request line, or a request header field do not fit entirely into
 this buffer then larger buffers are allocated, configured by the
-<link id="large_client_header_buffers">large_client_header_buffers</link>
+<link id="large_client_header_buffers"/>
 directive.
 </para>
 
@@ -382,7 +382,7 @@
 
 <para>
 Defines a default MIME-type of a response.
-See also the <link id="types">types</link> directive.
+See also the <link id="types"/> directive.
 </para>
 
 </directive>
@@ -402,13 +402,13 @@
 or the <c-func>directio</c-func> function (Solaris),
 when reading files that are larger than the specified <argument>size</argument>.
 It automatically disables (0.7.15) the use of
-<link id="sendfile">sendfile</link>
+<link id="sendfile"/>
 for a given request.
 It could be useful for serving large files:
 <example>
 directio 4m;
 </example>
-or when using <link id="aio">aio</link> on Linux.
+or when using <link id="aio"/> on Linux.
 </para>
 
 </directive>
@@ -423,7 +423,7 @@
 
 <para>
 Sets an alignment for
-<link id="directio">directio</link>.
+<link id="directio"/>.
 In most cases, a 512-byte alignment is enough, however, when
 using XFS under Linux, it needs to be increased to 4K.
 </para>
@@ -553,7 +553,7 @@
 <list type="bullet">
 
 <listitem>
-requests redirected by the <link id="error_page">error_page</link> directive;
+requests redirected by the <link id="error_page"/> directive;
 </listitem>
 
 <listitem>
@@ -565,7 +565,7 @@
 
 <listitem>
 requests changed by the
-<link doc="ngx_http_rewrite_module.xml" id="rewrite">rewrite</link>
+<link doc="ngx_http_rewrite_module.xml" id="rewrite"/>
 directive of the module
 <link doc="ngx_http_rewrite_module.xml">ngx_http_rewrite_module</link>.
 </listitem>
@@ -722,7 +722,7 @@
 <para>
 This directive is not applicable if one wants to rate limit
 a group of clients on the
-<link id="server">server</link>
+<link id="server"/>
 level.
 If that is the case, the desired limit can be specified in the
 <var>$limit_rate</var>
@@ -1104,7 +1104,7 @@
 
 <para>
 Enables or disables logging of errors about not found files into the
-<link doc="../ngx_core_module.xml" id="error_log">error_log</link>.
+<link doc="../ngx_core_module.xml" id="error_log"/>.
 </para>
 
 </directive>
@@ -1119,7 +1119,7 @@
 
 <para>
 Enables or disables logging of subrequests into the
-<link doc="ngx_http_log_module.xml" id="access_log">access_log</link>.
+<link doc="ngx_http_log_module.xml" id="access_log"/>.
 </para>
 
 </directive>
@@ -1158,7 +1158,7 @@
 
 <para>
 If a directive is specified on the
-<link id="server">server</link>
+<link id="server"/>
 level, which is also a default server, its value will cover
 all virtual servers listening on the same address and port.
 </para>
@@ -1222,7 +1222,7 @@
 file lookup errors, such as “file not found”, “no read permission”,
 and so on.
 Caching of errors should be enabled separately by the
-<link id="open_file_cache_errors">open_file_cache_errors</link>
+<link id="open_file_cache_errors"/>
 directive.
 </listitem>
 
@@ -1285,7 +1285,7 @@
 
 <para>
 Enables or disables caching of file lookup errors by
-<link id="open_file_cache">open_file_cache</link>.
+<link id="open_file_cache"/>.
 </para>
 
 </directive>
@@ -1302,10 +1302,10 @@
 
 <para>
 Enables to use kernel events to validate
-<link id="open_file_cache">open_file_cache</link>
+<link id="open_file_cache"/>
 elements.
 This directive works with the
-<link doc="../events.xml" id="kqueue">kqueue</link>
+<link doc="../events.xml" id="kqueue"/>
 method only.
 Note that only NetBSD&nbsp;2.0+ and FreeBSD&nbsp;6.0+
 support events for arbitrary file system types.
@@ -1328,7 +1328,7 @@
 <para>
 Sets the minimum <argument>number</argument> of file accesses during
 the period configured by the <parameter>inactive</parameter> parameter
-of the <link id="open_file_cache">open_file_cache</link> directive,
+of the <link id="open_file_cache"/> directive,
 after which a file descriptor will remain open in the cache.
 </para>
 
@@ -1344,11 +1344,11 @@
 
 <para>
 Sets a time after which
-<link id="open_file_cache">open_file_cache</link>
+<link id="open_file_cache"/>
 elements should be validated.
 <!--
 When
-<link id="open_file_cache_events">open_file_cache_events</link>
+<link id="open_file_cache_events"/>
 is enabled, open file descriptors
 are checked only once, and then updated right after they get changed.
 -->
@@ -1365,7 +1365,7 @@
 
 <para>
 This directive is made obsolete by the
-<link id="server_name_in_redirect">server_name_in_redirect</link> directive.
+<link id="server_name_in_redirect"/> directive.
 </para>
 
 <!--
@@ -1436,7 +1436,7 @@
 
 <para>
 Enables or disables doing several redirects using the
-<link id="error_page">error_page</link>
+<link id="error_page"/>
 directive.
 </para>
 
@@ -1536,7 +1536,7 @@
 A path to the file is constructed by merely adding a URI to the value
 of the <code>root</code> directive.
 If a URI need to be modified, the
-<link id="alias">alias</link> directive should be used.
+<link id="alias"/> directive should be used.
 </para>
 
 </directive>
@@ -1630,9 +1630,9 @@
 There is no clean separation between IP-based (based on the IP address)
 and name-based (based on the <header>Host</header> request header field)
 virtual servers.
-Instead, the <link id="listen">listen</link> directives describe all
+Instead, the <link id="listen"/> directives describe all
 addresses and ports that should accept connections for a server, and the
-<link id="server_name">server_name</link> directive lists all server names.
+<link id="server_name"/> directive lists all server names.
 An example configuration is provided in the
 <link doc="../virtual_hosts.xml">
 Setting Up Virtual Servers</link> document.
@@ -1784,7 +1784,7 @@
 
 <para>
 Enables or disables the use of the primary server name, specified by the
-<link id="server_name">server_name</link>
+<link id="server_name"/>
 directive, in redirects issued by nginx.
 When disabled, the name from the <header>Host</header> request header field
 is used.
@@ -1865,7 +1865,7 @@
 Enables or disables the use of
 the <c-def>TCP_NOPUSH</c-def> socket option on FreeBSD
 or the <c-def>TCP_CORK</c-def> socket option on Linux.
-Options are enabled only when <link id="sendfile">sendfile</link> is used.
+Options are enabled only when <link id="sendfile"/> is used.
 Enabling the option allows to
 <list type="bullet">
 
@@ -2176,7 +2176,7 @@
 
 <tag-name><var>$document_root</var></tag-name>
 <tag-desc>
-<link id="root">root</link> directive's value for the current request
+<link id="root"/> directive's value for the current request
 </tag-desc>
 
 <tag-name><var>$document_uri</var></tag-name>
@@ -2228,7 +2228,7 @@
 
 <tag-name><var>$realpath_root</var></tag-name>
 <tag-desc>
-<link id="root">root</link> directive's value
+<link id="root"/> directive's value
 for the current request, with all symbolic links resolved to real paths
 </tag-desc>
 
@@ -2258,9 +2258,9 @@
 <para>
 The variable's value is made available in locations
 processed by the
-<link doc="ngx_http_proxy_module.xml" id="proxy_pass">proxy_pass</link>
+<link doc="ngx_http_proxy_module.xml" id="proxy_pass"/>
 and
-<link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass">fastcgi_pass</link>
+<link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass"/>
 directives.
 </para>
 </tag-desc>
@@ -2276,11 +2276,9 @@
 When passing the name of a temporary file in a proxied request,
 or in a request to a FastCGI server,
 passing of the request body should be disabled by the
-<link doc="ngx_http_proxy_module.xml"
-id="proxy_pass_request_body">proxy_pass_request_body</link>
+<link doc="ngx_http_proxy_module.xml" id="proxy_pass_request_body"/>
 and
-<link doc="ngx_http_fastcgi_module.xml"
-id="fastcgi_pass_request_body">fastcgi_pass_request_body</link>
+<link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass_request_body"/>
 directives, respectively.
 </para>
 </tag-desc>
@@ -2294,7 +2292,7 @@
 <tag-name><var>$request_filename</var></tag-name>
 <tag-desc>
 file path for the current query, based on the
-<link id="root">root</link> and <link id="alias">alias</link>
+<link id="root"/> and <link id="alias"/>
 directives, and the request URI
 </tag-desc>
 
@@ -2324,7 +2322,7 @@
 an address of the server which accepted a request
 <para>
 Computing a value of this variable usually requires one system call.
-To avoid a system call, the <link id="listen">listen</link> directives
+To avoid a system call, the <link id="listen"/> directives
 must specify addresses and use the <parameter>bind</parameter> parameter
 </para>
 </tag-desc>
--- a/xml/ru/docs/control.xml	Wed Oct 19 08:30:46 2011 +0000
+++ b/xml/ru/docs/control.xml	Wed Oct 19 10:39:49 2011 +0000
@@ -11,7 +11,7 @@
 записывается в файл <command>/usr/local/nginx/logs/nginx.pid</command>.
 Изменить имя этого файла можно при конфигурации сборки или же в
 <command>nginx.conf</command> директивой
-<link doc="ngx_core_module.xml" id="pid">pid</link>.
+<link doc="ngx_core_module.xml" id="pid"/>.
 Главный процесс поддерживает следующие сигналы:
 <note>
 <table>
--- a/xml/ru/docs/hash.xml	Wed Oct 19 08:30:46 2011 +0000
+++ b/xml/ru/docs/hash.xml	Wed Oct 19 10:39:49 2011 +0000
@@ -19,8 +19,8 @@
 hash max size.
 Для большинства хэшей есть директивы, которые позволяют менять эти параметры,
 например, для хэшей имён серверов директивы называются
-<link doc="http/ngx_http_core_module.xml" id="server_names_hash_max_size">server_names_hash_max_size</link>
-и <link doc="http/ngx_http_core_module.xml" id="server_names_hash_bucket_size">server_names_hash_bucket_size</link>.
+<link doc="http/ngx_http_core_module.xml" id="server_names_hash_max_size"/>
+и <link doc="http/ngx_http_core_module.xml" id="server_names_hash_bucket_size"/>.
 </para>
 
 <para>
--- a/xml/ru/docs/http/ngx_http_core_module.xml	Wed Oct 19 08:30:46 2011 +0000
+++ b/xml/ru/docs/http/ngx_http_core_module.xml	Wed Oct 19 10:39:49 2011 +0000
@@ -79,13 +79,13 @@
 читая только один байт. При этом ядро FreeBSD подгружает в память
 первые 128K файла, однако при последующих чтениях файл подгружается
 частями только по 16K. Изменить это можно с помощью директивы
-<link id="read_ahead">read_ahead</link>.
+<link id="read_ahead"/>.
 </para>
 
 <para>
 В Linux AIO можно использовать, только начиная с версии ядра 2.6.22,
 и, кроме того, ещё необходимо дополнительно включать
-<link id="directio">directio</link>, иначе чтение будет блокирующимся:
+<link id="directio"/>, иначе чтение будет блокирующимся:
 <example>
 location  /video/ {
     aio             on;
@@ -327,7 +327,7 @@
 <example>
 directio  4m;
 </example>
-или при использовании <link id="aio">aio</link> в Linux.
+или при использовании <link id="aio"/> в Linux.
 </para>
 
 </directive>
@@ -340,7 +340,7 @@
 
 <para>
 Директива (0.8.11) устанавливает выравнивание для
-<link id="directio">directio</link>.
+<link id="directio"/>.
 В большинстве случае достаточно выравнивания 512 байт, однако
 при использовании XFS под Linux его нужно увеличить до 4K.
 </para>
@@ -841,7 +841,7 @@
 
 <para>
 Директива разрешает или запрещает записывать в
-<link doc="ngx_http_log_module.xml" id="access_log">access_log</link>
+<link doc="ngx_http_log_module.xml" id="access_log"/>
 подзапросы.
 </para>
 
@@ -1757,8 +1757,8 @@
 <listitem>
 $request_body, эта переменная содержит тело запроса.
 Значение переменной появляется в location'ах, обрабатываемых директивами
-<link doc="ngx_http_proxy_module.xml" id="proxy_pass">proxy_pass</link>
-и <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass">fastcgi_pass</link>.
+<link doc="ngx_http_proxy_module.xml" id="proxy_pass"/>
+и <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass"/>.
 </listitem>
 
 <listitem>
--- a/xml/ru/docs/http/ngx_http_dav_module.xml	Wed Oct 19 08:30:46 2011 +0000
+++ b/xml/ru/docs/http/ngx_http_dav_module.xml	Wed Oct 19 10:39:49 2011 +0000
@@ -87,7 +87,7 @@
 одной файловой системы файл копируется с одной файловой системы на другую.
 Поэтому лучше, если сохраняемые файлы будут находиться на той же файловой
 системе, что и каталог с временными файлами, задаваемый директивой
-<link doc="ngx_http_core_module.xml" id="client_body_temp_path">client_body_temp_path</link>
+<link doc="ngx_http_core_module.xml" id="client_body_temp_path"/>
 для данного location.
 </para>
 
--- a/xml/ru/docs/http/ngx_http_fastcgi_module.xml	Wed Oct 19 08:30:46 2011 +0000
+++ b/xml/ru/docs/http/ngx_http_fastcgi_module.xml	Wed Oct 19 10:39:49 2011 +0000
@@ -555,8 +555,8 @@
 <para>
 Директива разрешает сохранение на диск файлов.
 Параметр "on" сохраняет файлы в соответствии с путями, указаными в директивах
-<link doc="ngx_http_core_module.xml" id="alias">alias</link> или
-<link doc="ngx_http_core_module.xml" id="root">root</link>.
+<link doc="ngx_http_core_module.xml" id="alias"/> или
+<link doc="ngx_http_core_module.xml" id="root"/>.
 Параметр "off" запрещает сохранение файлов.
 Кроме того, имя файла можно явно задать с помощью строки с переменными:
 <example>
--- a/xml/ru/docs/http/ngx_http_gzip_module.xml	Wed Oct 19 08:30:46 2011 +0000
+++ b/xml/ru/docs/http/ngx_http_gzip_module.xml	Wed Oct 19 10:39:49 2011 +0000
@@ -204,7 +204,7 @@
 Разрешает или запрещает выдавать в ответе строку заголовка
 "Vary: Accept-Encoding", если директивы
 <link id="gzip"/> или
-<link doc="ngx_http_gzip_static_module.xml" id="gzip_static">gzip_static</link>
+<link doc="ngx_http_gzip_static_module.xml" id="gzip_static"/>
 активны.
 </para>
 
--- a/xml/ru/docs/http/ngx_http_gzip_static_module.xml	Wed Oct 19 08:30:46 2011 +0000
+++ b/xml/ru/docs/http/ngx_http_gzip_static_module.xml	Wed Oct 19 10:39:49 2011 +0000
@@ -44,10 +44,10 @@
 <para>
 Разрешает или запрещает проверку готового сжатого файла.
 При использовании также учитываются директивы
-<link doc="ngx_http_gzip_module.xml" id="gzip_http_version">gzip_http_version</link>,
-<link doc="ngx_http_gzip_module.xml" id="gzip_proxied">gzip_proxied</link>,
-<link doc="ngx_http_gzip_module.xml" id="gzip_disable">gzip_disable</link>
-и <link doc="ngx_http_gzip_module.xml" id="gzip_vary">gzip_vary</link>.
+<link doc="ngx_http_gzip_module.xml" id="gzip_http_version"/>,
+<link doc="ngx_http_gzip_module.xml" id="gzip_proxied"/>,
+<link doc="ngx_http_gzip_module.xml" id="gzip_disable"/>
+и <link doc="ngx_http_gzip_module.xml" id="gzip_vary"/>.
 </para>
 
 <para>
--- a/xml/ru/docs/http/ngx_http_log_module.xml	Wed Oct 19 08:30:46 2011 +0000
+++ b/xml/ru/docs/http/ngx_http_log_module.xml	Wed Oct 19 10:39:49 2011 +0000
@@ -76,7 +76,7 @@
 <listitem>
 при каждой записи в лог проверяется существование каталога root'а для
 запроса — если этот каталог не существует, то лог не создаётся.
-Поэтому <link doc="ngx_http_core_module.xml" id="root">root</link>
+Поэтому <link doc="ngx_http_core_module.xml" id="root"/>
 и access_log нужно описывать на одном уровне:
 <example>
 server {
--- a/xml/ru/docs/http/ngx_http_perl_module.xml	Wed Oct 19 08:30:46 2011 +0000
+++ b/xml/ru/docs/http/ngx_http_perl_module.xml	Wed Oct 19 10:39:49 2011 +0000
@@ -353,9 +353,9 @@
 клиента при условии, что тело не записано во временный файл.
 Для того, чтобы тело запроса клиента гарантировано находилось в памяти,
 нужно ограничить его размер с помощью
-<link doc="ngx_http_core_module.xml" id="client_max_body_size">client_max_body_size</link>
+<link doc="ngx_http_core_module.xml" id="client_max_body_size"/>
 и задать достаточной размер для буфера
-<link doc="ngx_http_core_module.xml" id="client_body_buffer_size">client_body_buffer_size</link>.
+<link doc="ngx_http_core_module.xml" id="client_body_buffer_size"/>.
 </listitem>
 
 <listitem>
--- a/xml/ru/docs/http/ngx_http_proxy_module.xml	Wed Oct 19 08:30:46 2011 +0000
+++ b/xml/ru/docs/http/ngx_http_proxy_module.xml	Wed Oct 19 10:39:49 2011 +0000
@@ -714,8 +714,8 @@
 <para>
 Директива разрешает сохранение на диск файлов.
 Параметр "on" сохраняет файлы в соответствии с путями, указаными в директивах
-<link doc="ngx_http_core_module.xml" id="alias">alias</link> или
-<link doc="ngx_http_core_module.xml" id="root">root</link>.
+<link doc="ngx_http_core_module.xml" id="alias"/> или
+<link doc="ngx_http_core_module.xml" id="root"/>.
 Параметр "off" запрещает сохранение файлов.
 Кроме того, имя файла можно явно задать с помощью строки с переменными:
 <example>
--- a/xml/ru/docs/http/ngx_http_rewrite_module.xml	Wed Oct 19 08:30:46 2011 +0000
+++ b/xml/ru/docs/http/ngx_http_rewrite_module.xml	Wed Oct 19 10:39:49 2011 +0000
@@ -129,7 +129,7 @@
     }
 </example>
 Значение встроенной переменной $invalid_referer задаётся директивой
-<link doc="ngx_http_referer_module.xml" id="valid_referers">valid_referers</link>.
+<link doc="ngx_http_referer_module.xml" id="valid_referers"/>.
 </para>
 
 </directive>
--- a/xml/ru/docs/http/ngx_http_ssl_module.xml	Wed Oct 19 08:30:46 2011 +0000
+++ b/xml/ru/docs/http/ngx_http_ssl_module.xml	Wed Oct 19 10:39:49 2011 +0000
@@ -334,7 +334,7 @@
 <para>
 Модуль ngx_http_ssl_module поддерживает несколько нестандартных кодов ошибок,
 которые можно использовать для перенаправления с помощью директивы
-<link doc="ngx_http_core_module.xml" id="error_page">error_page</link>:
+<link doc="ngx_http_core_module.xml" id="error_page"/>:
 <list type="bullet">
 
 <listitem>
@@ -376,7 +376,7 @@
 для установленного SSL-соединения в формате PEM
 перед каждой строкой которого, кроме первой, вставляется символ табуляции;
 предназачен для использования в директиве
-<link doc="ngx_http_proxy_module.xml" id="proxy_set_header">proxy_set_header</link>.
+<link doc="ngx_http_proxy_module.xml" id="proxy_set_header"/>.
 </listitem>
 
 <listitem>
--- a/xml/ru/docs/http/ngx_http_upstream.xml	Wed Oct 19 08:30:46 2011 +0000
+++ b/xml/ru/docs/http/ngx_http_upstream.xml	Wed Oct 19 10:39:49 2011 +0000
@@ -11,8 +11,8 @@
 <para>
 Модуль позволяет описывать группы серверов,
 которые могут использоваться в директивах
-<link doc="ngx_http_proxy_module.xml" id="proxy_pass">proxy_pass</link>
-и <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass">fastcgi_pass</link>.
+<link doc="ngx_http_proxy_module.xml" id="proxy_pass"/>
+и <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass"/>.
 </para>
 
 </section>
@@ -107,8 +107,8 @@
 По умолчанию число попыток равно одной.
 Нулевое значение запрещает учёт попыток.
 Что считается неудачной попыткой, задаётся директивами
-<link doc="ngx_http_proxy_module.xml" id="proxy_next_upstream">proxy_next_upstream</link>
-и <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_next_upstream">fastcgi_next_upstream</link>.
+<link doc="ngx_http_proxy_module.xml" id="proxy_next_upstream"/>
+и <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_next_upstream"/>.
 Состояние http_404 не считается неудачной попыткой.
 </listitem>
 
--- a/xsls/link.xsls	Wed Oct 19 08:30:46 2011 +0000
+++ b/xsls/link.xsls	Wed Oct 19 10:39:49 2011 +0000
@@ -66,14 +66,20 @@
 
 X:template = "link[@url]" { <a href="{@url}"> !!; </a> }
 
-X:template = "link[@id and not(@doc)]" { <a href="#{@id}"> !!; </a> }
+X:template = "link[@id and not(@doc)]" {
+    <a href="#{@id}">
+    X:if "count(node()) != 0" { !!; } else { !{@id} }
+    </a>
+}
 
 X:template = "link[@doc and not(@id)]" {
     <a href="{substring-before(@doc, '.xml')}.html"> !!; </a>
 }
 
 X:template = "link[@id and @doc]" {
-    <a href="{substring-before(@doc, '.xml')}.html#{@id}"> !!; </a>
+    <a href="{substring-before(@doc, '.xml')}.html#{@id}">
+    X:if "count(node()) != 0" { !!; } else { !{@id} }
+    </a>
 }
 
 }