Mercurial > hg > nginx-site
changeset 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 | e5e7d6365612 |
children | e179a6487bbd |
files | xsls/link.xsls |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
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]" {