This repository has been archived by the owner on Nov 22, 2019. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathfile.xsl
90 lines (79 loc) · 3.11 KB
/
file.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
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
<?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:include href="class.xsl" />
<xsl:template match="/project" name="file">
<div id="content">
<xsl:apply-templates select="/project/file[@path=$path]" />
</div>
<small class="footer">Documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor <xsl:value-of select="$version" /></a>.</small>
</xsl:template>
<xsl:template match="/project/file">
<h1><xsl:value-of select="@path" /></h1>
<div class="file_menu">
<xsl:if test="count(include) > 0"><a href="#includes">Includes</a> |</xsl:if>
<xsl:if test="count(function) > 0"><a href="#functions">Functions</a> |</xsl:if>
<xsl:if test="count(constant) > 0"><a href="#constants">Constants</a> |</xsl:if>
<xsl:if test="count(class) > 0"><a href="#classes">Classes</a> |</xsl:if>
<xsl:if test="count(interface) > 0"><a href="#interfaces">Interfaces</a></xsl:if>
</div>
<xsl:if test="docblock/tag">
<div class="properties">
<h1>Properties</h1>
<xsl:for-each select="docblock/tag">
<xsl:sort select="@name" />
<label class="property-key"><xsl:value-of select="@name" /></label>
<div class="property-value"><xsl:value-of select="." /></div>
</xsl:for-each>
</div>
</xsl:if>
<xsl:if test="docblock/description != '' or docblock/long-description != ''">
<h2>Description</h2>
</xsl:if>
<xsl:if test="docblock/description != ''">
<xsl:value-of select="docblock/description" disable-output-escaping="yes" /><br />
<br />
</xsl:if>
<xsl:if test="docblock/long-description != ''">
<xsl:value-of select="php:function('phpDocumentor\Plugin\Core\Xslt\Extension::markdown', string(docblock/long-description))" disable-output-escaping="yes" /><br />
</xsl:if>
<xsl:if test="include">
<a name="includes"/>
<h2>Includes</h2>
<xsl:for-each select="include">
<xsl:value-of select="name" /> <span class="nb-faded-text">(<xsl:value-of select="@type" />)</span><br />
</xsl:for-each>
</xsl:if>
<xsl:if test="function">
<a name="functions" />
<h2>Functions</h2>
<xsl:for-each select="function">
<xsl:apply-templates select="." />
</xsl:for-each>
</xsl:if>
<xsl:if test="constant">
<a name="constants" />
<h2>Constants</h2>
<xsl:for-each select="constant"><xsl:apply-templates select="." /></xsl:for-each>
</xsl:if>
<xsl:if test="class">
<a name="classes" />
<h2>Classes</h2>
<xsl:for-each select="class">
<div id="{name}" class="class">
<xsl:apply-templates select="." />
</div>
</xsl:for-each>
</xsl:if>
<xsl:if test="interface">
<a name="interfaces" />
<h2>Interfaces</h2>
<xsl:for-each select="interface">
<div id="{name}" class="interface">
<xsl:apply-templates select="." />
</div>
</xsl:for-each>
</xsl:if>
</xsl:template>
</xsl:stylesheet>