-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdivs.xsl
56 lines (53 loc) · 1.69 KB
/
divs.xsl
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
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="no"/>
<!--
<xsl:strip-space elements="n"/>
-->
<xsl:template match="n[n]">
<DIV id="{generate-id(.)}" class="e"><DIV class="c" nowrap="true">
<A class="b" onclick="ch('{generate-id(.)}')">[+]</A>
<xsl:choose>
<xsl:when test="@h">
<A class="t" target="article" href="{@h}" onclick="cl2(event)"><xsl:value-of select="@b"/></A>
</xsl:when>
<xsl:otherwise>
<A class="t" onclick="cl2t(event,'{@s}')"><xsl:value-of select="@b"/></A>
</xsl:otherwise>
</xsl:choose>
</DIV>
<DIV style="display:none">
<xsl:apply-templates/>
</DIV></DIV>
</xsl:template>
<xsl:template match="n">
<DIV class="e" nowrap="true">
<xsl:choose>
<xsl:when test='@x'>
<A class="b" onclick="cl2t(event,'{@s}')" target="tree" href="{@x}">[X]</A>
<xsl:choose>
<xsl:when test='@h'>
<A class="t" target="article" href="{@h}" onclick="cl2(event)"><xsl:value-of select="@b"/></A>
</xsl:when>
<xsl:otherwise>
<A class="t" onclick="cl2t(event,'{@s}')"><xsl:value-of select="@b"/></A>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="@h">
<A class="b">. :</A>
<xsl:if test="not(@t)">
<A class="t" target="article" href="{@h}" onclick="cl2(event)"><xsl:value-of select="@b"/></A>
</xsl:if>
<xsl:if test="contains(@t, ' wn ')">
<A class="t" target="_new" href="{@h}" onclick="cl2(event)"><xsl:value-of select="@b"/></A>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<A class="b">. :</A>
<A class="t" onclick="cl2t(event,'{@s}')"><xsl:value-of select="@b"/></A>
</xsl:otherwise>
</xsl:choose>
</DIV>
</xsl:template>
</xsl:stylesheet>