1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <xsl:stylesheet version="1.0"
|
---|
3 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
---|
4 |
|
---|
5 | <!-- some global parameters - these are set by whoever is invoking the transformation -->
|
---|
6 | <xsl:param name="interface_name"/>
|
---|
7 |
|
---|
8 | <!-- Display the appropriate image, depending on the node type -->
|
---|
9 | <xsl:template match="documentNode" mode="displayNodeIcon">
|
---|
10 |
|
---|
11 | <!-- Root node: book icon (open or closed) -->
|
---|
12 | <xsl:choose>
|
---|
13 | <xsl:when test="@nodeType='root'">
|
---|
14 | <xsl:choose>
|
---|
15 | <xsl:when test="documentNode">
|
---|
16 | <xsl:call-template name="openbookimg">
|
---|
17 | </xsl:call-template>
|
---|
18 | </xsl:when>
|
---|
19 | <xsl:otherwise>
|
---|
20 | <xsl:call-template name="closedbookimg">
|
---|
21 | </xsl:call-template>
|
---|
22 | </xsl:otherwise>
|
---|
23 | </xsl:choose>
|
---|
24 | </xsl:when>
|
---|
25 |
|
---|
26 | <!-- Internal node: folder icon (open or closed) -->
|
---|
27 | <xsl:when test="@nodeType='internal'">
|
---|
28 | <xsl:choose>
|
---|
29 | <xsl:when test="documentNode">
|
---|
30 | <xsl:call-template name="openfolderimg">
|
---|
31 | </xsl:call-template>
|
---|
32 | </xsl:when>
|
---|
33 | <xsl:otherwise>
|
---|
34 | <xsl:call-template name="closedfolderimg">
|
---|
35 | </xsl:call-template>
|
---|
36 | </xsl:otherwise>
|
---|
37 | </xsl:choose>
|
---|
38 | </xsl:when>
|
---|
39 |
|
---|
40 | <!-- Leaf node: page icon, and this is the default -->
|
---|
41 | <xsl:otherwise>
|
---|
42 | <xsl:call-template name="textpageimg">
|
---|
43 | </xsl:call-template>
|
---|
44 | </xsl:otherwise>
|
---|
45 | </xsl:choose>
|
---|
46 | </xsl:template>
|
---|
47 |
|
---|
48 | <xsl:template name="openbookimg">
|
---|
49 | <xsl:param name="title"/>
|
---|
50 | <xsl:param name="alt"/>
|
---|
51 | <img border="0" width="28" height="23"
|
---|
52 | src="interfaces/default/images/openbook.gif"
|
---|
53 | alt="{$alt}" class="getTextFor null this.title.{$title}" />
|
---|
54 | </xsl:template>
|
---|
55 |
|
---|
56 | <xsl:template name="closedbookimg">
|
---|
57 | <xsl:param name="alt"/>
|
---|
58 | <img border="0" width="18" height="11"
|
---|
59 | src="interfaces/default/images/book.gif"
|
---|
60 | alt="{$alt}" class="getTextFor null this.title.open_book" />
|
---|
61 | </xsl:template>
|
---|
62 |
|
---|
63 | <xsl:template name="openfolderimg">
|
---|
64 | <xsl:param name="title"/>
|
---|
65 | <xsl:param name="alt"/>
|
---|
66 | <img border="0" width="23" height="15"
|
---|
67 | src="interfaces/default/images/openfldr.gif"
|
---|
68 | alt="{$alt}" class="getTextFor null this.title.{$title}" />
|
---|
69 | </xsl:template>
|
---|
70 |
|
---|
71 | <xsl:template name="closedfolderimg">
|
---|
72 | <xsl:param name="title"/>
|
---|
73 | <xsl:param name="alt"/>
|
---|
74 | <img border="0" width="23" height="15"
|
---|
75 | src="interfaces/default/images/clsdfldr.gif"
|
---|
76 | alt="{$alt}" class="getTextFor null this.title.{$title}" />
|
---|
77 | </xsl:template>
|
---|
78 |
|
---|
79 | <xsl:template name="textpageimg">
|
---|
80 | <xsl:param name="alt"/>
|
---|
81 | <img border="0" width="16" height="21"
|
---|
82 | src="interfaces/default/images/itext.gif"
|
---|
83 | alt="{$alt}" class="getTextFor null this.title.view_document,parent.class.text:'clientDocView'" />
|
---|
84 | <span><xsl:value-of select="$alt" /></span>
|
---|
85 | </xsl:template>
|
---|
86 |
|
---|
87 | <xsl:template name="bookshelfimg">
|
---|
88 | <xsl:param name="alt"/>
|
---|
89 | <xsl:param name="title"/>
|
---|
90 | <img border="0" width="20" height="16"
|
---|
91 | src="interfaces/default/images/bshelf.gif"
|
---|
92 | alt="{$alt}" title="{$title}"/>
|
---|
93 | </xsl:template>
|
---|
94 |
|
---|
95 | <xsl:template name="iconpdf">
|
---|
96 | <xsl:param name="alt">PDF</xsl:param>
|
---|
97 | <img border="0" width='26' height='26'
|
---|
98 | src='interfaces/default/images/ipdf.gif'
|
---|
99 | alt='{$alt}' class="getTextFor null this.title.texticonpdf" />
|
---|
100 | </xsl:template>
|
---|
101 |
|
---|
102 | <xsl:template name="icondoc">
|
---|
103 | <xsl:param name="alt">Word</xsl:param>
|
---|
104 | <img border="0" width='26' height='26'
|
---|
105 | src='interfaces/default/images/imsword.gif'
|
---|
106 | alt='{$alt}' class="getTextFor null this.title.texticonmsword" />
|
---|
107 | </xsl:template>
|
---|
108 |
|
---|
109 | </xsl:stylesheet>
|
---|
110 |
|
---|