~ubuntu-branches/debian/sid/libembperl-perl/sid

« back to all changes in this revision

Viewing changes to test/html/xml/pod.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Angus Lees
  • Date: 2004-02-15 14:23:39 UTC
  • Revision ID: james.westby@ubuntu.com-20040215142339-n21gqf7mx9tmyb8d
Tags: upstream-2.0b10
ImportĀ upstreamĀ versionĀ 2.0b10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version='1.0'?>
 
2
 
 
3
 
 
4
<xsl:stylesheet version="1.0"
 
5
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 
6
                xmlns="http://www.w3.org/TR/xhtml1/strict">
 
7
 
 
8
 
 
9
<xsl:output
 
10
   method="xml"
 
11
   indent="yes"
 
12
   encoding="iso-8859-1"
 
13
/>
 
14
 
 
15
 
 
16
    <xsl:template match="/">                         
 
17
        <html><head><title><xsl:value-of select="/pod/head/title"/></title></head><body>
 
18
        
 
19
 
 
20
        <xsl:apply-templates select="/pod"/> 
 
21
        </body></html>
 
22
    </xsl:template>
 
23
 
 
24
 
 
25
    <xsl:template match="sect1/title">                         
 
26
            <h1><xsl:value-of select="."/></h1>
 
27
    </xsl:template>
 
28
 
 
29
    <xsl:template match="sect2/title">                         
 
30
            <h2><xsl:value-of select="."/></h2>
 
31
    </xsl:template>
 
32
 
 
33
    <xsl:template match="sect3/title">                         
 
34
            <h2><xsl:value-of select="."/></h2>
 
35
    </xsl:template>
 
36
 
 
37
    <xsl:template match="sect1">                         
 
38
        <xsl:apply-templates/> 
 
39
    </xsl:template>
 
40
 
 
41
    <xsl:template match="sect2">                         
 
42
        <xsl:apply-templates/> 
 
43
    </xsl:template>
 
44
 
 
45
    <xsl:template match="para">                         
 
46
        <p><xsl:apply-templates/></p>
 
47
    </xsl:template>
 
48
 
 
49
    <xsl:template match="verbatim">                         
 
50
        <pre><xsl:apply-templates/>
 
51
        </pre>
 
52
    </xsl:template>
 
53
 
 
54
    <xsl:template match="code">                         
 
55
            <code><xsl:value-of select="."/></code>
 
56
    </xsl:template>
 
57
 
 
58
    <xsl:template match="underline">                         
 
59
            <u><xsl:value-of select="."/></u>
 
60
    </xsl:template>
 
61
 
 
62
    <xsl:template match="emphasis">                         
 
63
            <i><xsl:value-of select="."/></i>
 
64
    </xsl:template>
 
65
 
 
66
    <xsl:template match="strong">                         
 
67
            <b><xsl:value-of select="."/></b>
 
68
    </xsl:template>
 
69
 
 
70
    <xsl:template match="list">                         
 
71
            <ul>
 
72
                <xsl:apply-templates/> 
 
73
            </ul>
 
74
    </xsl:template>
 
75
 
 
76
 
 
77
    <xsl:template match="item">                         
 
78
            <li><b><xsl:apply-templates/></b></li><br/>
 
79
    </xsl:template>
 
80
 
 
81
 
 
82
 
 
83
    <xsl:template name="link">
 
84
        <xsl:param name="txt"/>
 
85
        <xsl:param name="uri"/>
 
86
        <a href="{$uri}"><xsl:value-of select="$txt"/></a>
 
87
    </xsl:template>
 
88
 
 
89
 
 
90
 
 
91
    <xsl:template match="xlink">                         
 
92
            <xsl:choose>
 
93
                <xsl:when test="@uri">
 
94
                    <xsl:call-template name="link">
 
95
                        <xsl:with-param name="uri" select="@uri"/>
 
96
                        <xsl:with-param name="txt" select="."/>
 
97
                    </xsl:call-template>
 
98
                </xsl:when>
 
99
                <xsl:otherwise>
 
100
                    <xsl:call-template name="link">
 
101
                        <xsl:with-param name="uri" select="."/>
 
102
                        <xsl:with-param name="txt" select="."/>
 
103
                    </xsl:call-template>
 
104
                </xsl:otherwise>
 
105
            </xsl:choose>
 
106
                 
 
107
    </xsl:template>
 
108
 
 
109
 
 
110
 
 
111
</xsl:stylesheet> 
 
 
b'\\ No newline at end of file'