comparison xsls/link.xsls @ 491:5a3362234a4d

If text of the link given by URL is not provided, the URL is used.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 19 Apr 2012 12:44:09 +0000
parents 04ad7c1b1b04
children be54c443235a
comparison
equal deleted inserted replaced
490:9913f1d51c07 491:5a3362234a4d
1 X:stylesheet { 1 X:stylesheet {
2 2
3 X:template = "img" { <img src="{@href}"> !!; </img> } 3 X:template = "img" { <img src="{@href}"> !!; </img> }
4 4
5 X:template = "link[@url]" { <a href="{@url}"> !!; </a> } 5 X:template = "link[@url]" {
6 <a href="{@url}">
7 X:if "count(node()) != 0" { !!; } else { !{@url} }
8 </a>
9 }
6 10
7 X:template = "link[@id and not(@doc)]" { 11 X:template = "link[@id and not(@doc)]" {
8 <a href="#{@id}"> 12 <a href="#{@id}">
9 X:if "count(node()) != 0" { !!; } else { !{@id} } 13 X:if "count(node()) != 0" { !!; } else { !{@id} }
10 </a> 14 </a>