diff 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
line wrap: on
line diff
--- a/xsls/link.xsls
+++ b/xsls/link.xsls
@@ -8,7 +8,13 @@ X:stylesheet {
 X:template = "img" { <img src="{@href}"> !!; </img> }
 
 X:template = "origin" {
-    <a href="{document($ORIGIN)/*/@link}"> !!; </a>
+    <a>
+    X:attribute "href" {
+        !root(path = "$ORIGIN")
+        !{ concat(substring-before($ORIGIN, '.xml'), '.html') }
+    }
+    !!;
+    </a>
 }
 
 X:template = "link[@url]" {