-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy paththread.xsl
More file actions
75 lines (62 loc) · 2.34 KB
/
thread.xsl
File metadata and controls
75 lines (62 loc) · 2.34 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE xsl:stylesheet>
<!--*
* Create the HTML version of a thread
*
* To do:
*
* Parameters:
* imglinkicon, string, required
* location of the image, relative to the top-level for this site,
* for the image to use at the end of "image" links
* e.g. imgs/imageicon.gif
*
* imglinkiconwidth, integer, required
* width of imglinkicon in pixels
*
* imglinkiconheight, integer, required
* height of imglinkicon in pixels
*
*-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:extfuncs="http://hea-www.harvard.edu/~dburke/xsl/extfuncs"
extension-element-prefixes="extfuncs">
<!--* Change this if the filename changes *-->
<xsl:variable name="hack-import-thread" select="extfuncs:register-import-dependency('thread.xsl')"/>
<!--* we create the HTML files using xsl:document statements *-->
<xsl:output method="text"/>
<!--* load in the set of "global" parameters *-->
<xsl:include href="globalparams_thread.xsl"/>
<!--*
* NOTE:
* currently the default values for these parameters are set
* by the calling process, which in this case is publish.pl
*-->
<xsl:param name="imglinkicon" select='""'/>
<xsl:param name="imglinkiconwidth" select='0'/>
<xsl:param name="imglinkiconheight" select='0'/>
<!--* include the stylesheets *-->
<xsl:include href="thread_common.xsl"/>
<xsl:include href="helper.xsl"/>
<xsl:include href="links.xsl"/>
<xsl:include href="myhtml.xsl"/>
<!--* really need to sort out the newline template issue *-->
<xsl:template name="newline">
<xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="/">
<!--* check the params are okay *-->
<xsl:call-template name="is-site-valid"/>
<xsl:call-template name="check-param-ends-in-a-slash">
<xsl:with-param name="pname" select="'install'"/>
<xsl:with-param name="pvalue" select="$install"/>
</xsl:call-template>
<xsl:call-template name="check-param-ends-in-a-slash">
<xsl:with-param name="pname" select="'canonicalbase'"/>
<xsl:with-param name="pvalue" select="$canonicalbase"/>
</xsl:call-template>
<xsl:apply-templates select="thread" mode="html-viewable-standard"/>
</xsl:template> <!-- match="/" *-->
</xsl:stylesheet>