diff xsls/link.xsls @ 372:978b9e3897f7

For links to documents, use the document name as the link's text by default.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 30 Jan 2012 09:54:25 +0000
parents 7db449e89e92
children fa74f8061fc5
line wrap: on
line diff
--- a/xsls/link.xsls	Mon Jan 30 07:32:54 2012 +0000
+++ b/xsls/link.xsls	Mon Jan 30 09:54:25 2012 +0000
@@ -71,7 +71,13 @@
 }
 
 X:template = "link[@doc and not(@id)]" {
-    <a href="{substring-before(@doc, '.xml')}.html"> !!; </a>
+    <a href="{substring-before(@doc, '.xml')}.html">
+    X:if "count(node()) != 0" {
+        !!;
+    } else {
+        !{ document(@doc)/article/@name | document(@doc)/module/@name }
+    }
+    </a>
 }
 
 X:template = "link[@id and @doc]" {