-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvim-help.toc.html-template.xsl
More file actions
52 lines (46 loc) · 1.5 KB
/
Copy pathvim-help.toc.html-template.xsl
File metadata and controls
52 lines (46 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8" indent="yes"/>
<xsl:template match="/root">
<html>
<head>
<title>vim-help</title>
</head>
<body>
<xsl:for-each select="chapter">
<xsl:call-template name="gen-chapter"/>
</xsl:for-each>
</body>
</html>
</xsl:template>
<xsl:template name="gen-chapter" match="chapter">
<h3>
<a>
<xsl:attribute name="href">
<xsl:value-of select="section[1]/@src"/>
</xsl:attribute>
<xsl:value-of select="@title"/>
</a>
</h3>
<div>
<ul>
<xsl:for-each select="section">
<xsl:call-template name="gen-section"/>
</xsl:for-each>
</ul>
</div>
</xsl:template>
<xsl:template name="gen-section" match="section">
<li>
<a>
<!--<xsl:attribute name="title">-->
<!--<xsl:value-of select="@title"/>-->
<!--</xsl:attribute>-->
<xsl:attribute name="href">
<xsl:value-of select="@href"/>
</xsl:attribute>
<xsl:value-of select="text()"/>
</a>
</li>
</xsl:template>
</xsl:stylesheet>