aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authordakkar <dakkar@luxion>2008-01-02 13:55:03 +0000
committerdakkar <dakkar@luxion>2008-01-02 13:55:03 +0000
commit8650f17901d87666f80aff7a5538c0edd4e382dc (patch)
tree91ecfd8f8dd1cc6b57c941c71cc2f029ceac1b5b /t
parentnew directory structure works (diff)
downloadWebCoso-8650f17901d87666f80aff7a5538c0edd4e382dc.tar.gz
WebCoso-8650f17901d87666f80aff7a5538c0edd4e382dc.tar.bz2
WebCoso-8650f17901d87666f80aff7a5538c0edd4e382dc.zip
ugly way to get titles... may require double-run
git-svn-id: svn://luxion/repos/WebCoso/trunk@318 fcb26f47-9200-0410-b104-b98ab5b095f3
Diffstat (limited to 't')
-rw-r--r--t/test-site/src/common/du2html.xsl29
-rw-r--r--t/test-site/src/foo/document.it.rest.txt6
2 files changed, 31 insertions, 4 deletions
diff --git a/t/test-site/src/common/du2html.xsl b/t/test-site/src/common/du2html.xsl
index d7a9b62..b67dbe6 100644
--- a/t/test-site/src/common/du2html.xsl
+++ b/t/test-site/src/common/du2html.xsl
@@ -1,21 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<x:stylesheet xmlns:x="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:wc="http://webcoso.thenautilus.net/"
version="1.0"
>
<x:import href="reST.xsl"/>
<x:param name="language" select="'en'"/>
+ <x:param name="path"/>
+ <x:param name="filename"/>
<x:output method="html" encoding="utf-8"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
indent="yes"/>
+ <x:template match="reference">
+ <x:element name="a">
+ <x:attribute name="href">
+ <x:choose>
+ <x:when test="@refid">
+ <x:value-of select="concat('#', @refid)" />
+ </x:when>
+ <x:when test="@refuri">
+ <x:value-of select="@refuri" />
+ </x:when>
+ </x:choose>
+ </x:attribute>
+
+ <x:choose>
+ <x:when test="@refuri and string(.)=string(@refuri)">
+ <x:apply-templates select="wc:title-for($language,$filename,@refuri)"/>
+ </x:when>
+ <x:otherwise>
+ <x:apply-templates />
+ </x:otherwise>
+ </x:choose>
+ </x:element>
+ </x:template>
+
<x:template match="/document">
<html xml:lang="{$language}" lang="{$language}">
<head>
- <title><x:apply-templates select="title/node()"/></title>
+ <title><x:value-of select="title"/></title>
</head>
<body>
<h1><x:apply-templates select="title/node()"/></h1>
diff --git a/t/test-site/src/foo/document.it.rest.txt b/t/test-site/src/foo/document.it.rest.txt
index e4d7333..7fc3936 100644
--- a/t/test-site/src/foo/document.it.rest.txt
+++ b/t/test-site/src/foo/document.it.rest.txt
@@ -1,6 +1,6 @@
-============
- Pagina foo
-============
+==============
+ Pagina *foo*
+==============
:tags: * one
* two