File: faq-txt-pass2.xsl

package info (click to toggle)
nedit 1%3A5.7-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 8,648 kB
  • sloc: ansic: 95,124; xml: 1,427; yacc: 679; makefile: 341; awk: 40; sh: 12
file content (103 lines) | stat: -rw-r--r-- 2,235 bytes parent folder | download | duplicates (9)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0"
                xmlns:xt="http://www.jclark.com/xt"
                extension-element-prefixes="xt">

<xsl:output method="text"/>






<xsl:template match="I">
	<xsl:param name="indent"/>
	<xsl:text>
PREFIXED</xsl:text>
	<xsl:apply-templates>
		<xsl:with-param name="indent"><xsl:value-of select="$indent"/></xsl:with-param>
	</xsl:apply-templates>
	<xsl:text>NOT_PREFIXED
</xsl:text>
</xsl:template>


<xsl:template match="BLOCKQUOTE">
	<xsl:param name="indent"/>
	<xsl:apply-templates select="*">
		<xsl:with-param name="indent"><xsl:value-of select="concat($indent, '    ')"/></xsl:with-param>
	</xsl:apply-templates>
</xsl:template>



<xsl:template match="P">
	<xsl:param name="indent"/>
<xsl:text>
</xsl:text>
	<xsl:apply-templates>
		<xsl:with-param name="indent"><xsl:value-of select="$indent"/></xsl:with-param>
	</xsl:apply-templates>
<xsl:text>
</xsl:text>
</xsl:template>



<xsl:template match="UL">
	<xsl:param name="indent"/>
<xsl:text>
</xsl:text>
	<xsl:apply-templates>
		<xsl:with-param name="indent"><xsl:value-of select="$indent"/></xsl:with-param>
	</xsl:apply-templates>
<xsl:text>
</xsl:text>
</xsl:template>




<xsl:template match="H1">
<xsl:text>


</xsl:text>
	<xsl:variable name="val"><xsl:apply-templates/></xsl:variable>
	<xsl:variable name="len"><xsl:value-of select="string-length($val)"/></xsl:variable>
	<xsl:variable name="underscore"><xsl:value-of
		select="substring('----------------------------------------------------------------------', 1, $len)"/></xsl:variable>
	<xsl:value-of select="translate($val, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
<xsl:text>
</xsl:text>
	<xsl:value-of select="$underscore"/>
<xsl:text>

</xsl:text>
</xsl:template>



<xsl:template match="PRE">
	<xsl:text>
PRE</xsl:text>
	<xsl:for-each select="text()">
		<xsl:value-of select="."/>
	</xsl:for-each>
	<xsl:text>NOT_PRE
</xsl:text>
</xsl:template>





<xsl:template match="text()">
	<xsl:param name="indent"/>
	<xsl:value-of select="$indent"/>
	<xsl:value-of select="normalize-space()" />
</xsl:template>

</xsl:stylesheet>

<!-- $Id: faq-txt-pass2.xsl,v 1.3 2002/09/26 12:37:37 ajhood Exp $ -->