forked from phpDocumentor/template.old_ocean
-
Notifications
You must be signed in to change notification settings - Fork 0
/
markers.xsl
54 lines (49 loc) · 1.8 KB
/
markers.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
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" method="html" />
<xsl:include href="chrome.xsl" />
<xsl:template match="/project">
<div id="content">
<div class="tabs">
<ul>
<xsl:for-each select="marker">
<xsl:variable name="marker" select="." />
<li><a href="#{$marker}"><xsl:value-of select="$marker" /> (
<xsl:if test="$marker='todo'">
<xsl:value-of select="count(../file/markers/*[name()=$marker]|//tag[@name='todo'])" />
</xsl:if>
<xsl:if test="not($marker='todo')">
<xsl:value-of select="count(../file/markers/*[name()=$marker])" />
</xsl:if>
)</a></li>
</xsl:for-each>
</ul>
<xsl:for-each select="marker">
<xsl:variable name="marker" select="." />
<div id="{$marker}">
<table>
<tr>
<th>Path</th>
<th>Description</th>
</tr>
<xsl:if test="$marker='todo'">
<xsl:for-each select="//tag[@name='todo']">
<tr>
<td><xsl:value-of select="../../../../@path|../../@path|../../../@path" />:<xsl:value-of select="./@line" /></td>
<td><xsl:value-of select="./@description" /></td>
</tr>
</xsl:for-each>
</xsl:if>
<xsl:for-each select="../file/markers/*[name()=$marker]">
<tr>
<td><xsl:value-of select="../../@path" />:<xsl:value-of select="./@line" /></td>
<td><xsl:value-of select="./@description" /></td>
</tr>
</xsl:for-each>
</table>
</div>
</xsl:for-each>
</div>
</div>
</xsl:template>
</xsl:stylesheet>