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
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:pdx="http://xml.phpdox.net/src"
xmlns:pdxf="http://xml.phpdox.net/functions"
xmlns:pu="http://schema.phpunit.de/coverage/1.0"
xmlns:func="http://exslt.org/functions"
xmlns:idx="http://xml.phpdox.net/src"
xmlns:git="http://xml.phpdox.net/gitlog"
xmlns:ctx="ctx://engine/html"
extension-element-prefixes="func"
exclude-result-prefixes="idx pdx pdxf pu git ctx">
<xsl:import href="components.xsl" />
<xsl:output method="xml" indent="yes" encoding="UTF-8" doctype-system="about:legacy-compat" />
<xsl:template match="/">
<html lang="en">
<xsl:call-template name="head" />
<body>
<xsl:call-template name="nav" />
<div id="mainstage">
<h1>Namespaces</h1>
<div class="container">
<h2>Namespaces</h2>
<table class="styled">
<thead>
<tr>
<th>Name</th>
<th>Interfaces</th>
<th>Classes</th>
<th>Traits</th>
</tr>
</thead>
<xsl:apply-templates select="//idx:namespace">
<xsl:sort select="@name" order="ascending" />
</xsl:apply-templates>
</table>
</div>
</div>
<xsl:call-template name="footer" />
</body>
</html>
</xsl:template>
<xsl:template match="idx:namespace">
<tr>
<td>\<xsl:value-of select="@name" /></td>
<td class="nummeric">
<xsl:call-template name="countlink">
<xsl:with-param name="ctx" select="idx:interface" />
<xsl:with-param name="mode" select="'interfaces'" />
</xsl:call-template>
</td>
<td class="nummeric">
<xsl:call-template name="countlink">
<xsl:with-param name="ctx" select="idx:class" />
<xsl:with-param name="mode" select="'classes'" />
</xsl:call-template>
</td>
<td class="nummeric">
<xsl:call-template name="countlink">
<xsl:with-param name="ctx" select="idx:trait" />
<xsl:with-param name="mode" select="'traits'" />
</xsl:call-template>
</td>
</tr>
</xsl:template>
<xsl:template name="countlink">
<xsl:param name="ctx" />
<xsl:param name="mode" />
<xsl:variable name="count" select="count($ctx)" />
<xsl:choose>
<xsl:when test="$count > 0">
<a href="{$base}{$mode}.{$extension}#{translate(@name, '\', '_')}"><xsl:value-of select="$count" /></a>
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
|