comparison xsls/link.xsls @ 604:b2db67ca29cc

Made a link to original relative.
author Ruslan Ermilov <ru@nginx.com>
date Fri, 20 Jul 2012 13:14:50 +0000
parents 89a4e934d207
children 9ff0bc734b77
comparison
equal deleted inserted replaced
603:e0544f2c4a70 604:b2db67ca29cc
6 X:stylesheet { 6 X:stylesheet {
7 7
8 X:template = "img" { <img src="{@href}"> !!; </img> } 8 X:template = "img" { <img src="{@href}"> !!; </img> }
9 9
10 X:template = "origin" { 10 X:template = "origin" {
11 <a href="{document($ORIGIN)/*/@link}"> !!; </a> 11 <a>
12 X:attribute "href" {
13 !root(path = "$ORIGIN")
14 !{ concat(substring-before($ORIGIN, '.xml'), '.html') }
15 }
16 !!;
17 </a>
12 } 18 }
13 19
14 X:template = "link[@url]" { 20 X:template = "link[@url]" {
15 <a href="{@url}"> 21 <a href="{@url}">
16 X:if "count(node()) != 0" { !!; } else { !{@url} } 22 X:if "count(node()) != 0" { !!; } else { !{@url} }