Mercurial > hg > nginx-site
view xsls/link.xsls @ 596:19c9bd574db0
Replaced development.xslt, stable.xslt and legacy_stable.xslt with
one parameterized version.xslt.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 19 Jul 2012 15:04:14 +0000 |
parents | be54c443235a |
children | 89a4e934d207 |
line wrap: on
line source
<!-- Copyright (C) Igor Sysoev Copyright (C) Nginx, Inc. --> X:stylesheet { X:template = "img" { <img src="{@href}"> !!; </img> } X:template = "link[@url]" { <a href="{@url}"> X:if "count(node()) != 0" { !!; } else { !{@url} } </a> } X:template = "link[@id and not(@doc)]" { <a href="#{@id}"> X:if "count(node()) != 0" { !!; } else { !{@id} } </a> } X:template = "link[@doc and not(@id)]" { <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]" { <a href="{substring-before(@doc, '.xml')}.html#{@id}"> X:if "count(node()) != 0" { !!; } else { !{@id} } </a> } X:template = "links" { X:for-each "link", X:sort "@id" { <a href="{substring-before(@doc, '.xml')}.html#{@id}">!{@id}</a> <br/> } } }