comparison 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
comparison
equal deleted inserted replaced
371:e5e7d6365612 372:978b9e3897f7
69 X:if "count(node()) != 0" { !!; } else { !{@id} } 69 X:if "count(node()) != 0" { !!; } else { !{@id} }
70 </a> 70 </a>
71 } 71 }
72 72
73 X:template = "link[@doc and not(@id)]" { 73 X:template = "link[@doc and not(@id)]" {
74 <a href="{substring-before(@doc, '.xml')}.html"> !!; </a> 74 <a href="{substring-before(@doc, '.xml')}.html">
75 X:if "count(node()) != 0" {
76 !!;
77 } else {
78 !{ document(@doc)/article/@name | document(@doc)/module/@name }
79 }
80 </a>
75 } 81 }
76 82
77 X:template = "link[@id and @doc]" { 83 X:template = "link[@id and @doc]" {
78 <a href="{substring-before(@doc, '.xml')}.html#{@id}"> 84 <a href="{substring-before(@doc, '.xml')}.html#{@id}">
79 X:if "count(node()) != 0" { !!; } else { !{@id} } 85 X:if "count(node()) != 0" { !!; } else { !{@id} }