summaryrefslogtreecommitdiff
path: root/gentoobrowse/xslt/use-detail.xslt
blob: 9a940dd3bcb18fdaab83e1759ad73243c3c339bd (plain)
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
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:import href="base.xslt" />
  <xsl:output encoding="utf-8" method="html" version="5" media-type="text/html" indent="no" />

  <xsl:template name="head">
		<title>Packages with the <xsl:value-of select="/gentoo/usage/use[1]/use" /> use flag &#183; Gentoo Browse</title>
		<meta name="description">
			<xsl:attribute name="content">Packages with the <xsl:value-of select="/gentoo/usage/use[1]/use" /> use flag</xsl:attribute>
		</meta>
  </xsl:template>

  <xsl:template name="header">
  	<h1>
			Packages with the
			<xsl:call-template name="split">
				<xsl:with-param name="pText" select="/gentoo/usage/use[1]/use" />
				<xsl:with-param name="pBy" select="'_'" />
			</xsl:call-template>
			use flag
		</h1>
		<xsl:if test="/gentoo/usage/use[not(packageid)]">
			<p class="lead">Global definition: <xsl:value-of select="/gentoo/usage/use[not(packageid)]/description" />.</p>
		</xsl:if>
  </xsl:template>

  <xsl:template name="content">
		<xsl:apply-templates select="/gentoo/usage" />
  </xsl:template>

  <xsl:template match="/gentoo/usage">
		<xsl:variable name="categories" select="/gentoo/categories/category[categoryid = /gentoo/packages/package/categoryid]" />
		<div class="span3 bs-docs-sidebar">
			<ul class="nav nav-list bs-docs-sidenav">
				<xsl:for-each select="$categories">
					<li>
						<a>
							<xsl:attribute name="href">#<xsl:value-of select="name" /></xsl:attribute>
							<i class="icon-chevron-right">&#160;</i> <xsl:value-of select="name" />
						</a>
					</li>
				</xsl:for-each>
			</ul>
		</div>
		<div class="span9">
			<xsl:for-each select="$categories">
				<section>
					<xsl:attribute name="id"><xsl:value-of select="name" /></xsl:attribute>
					<h2 class="page-header">
						<xsl:value-of select="name" />
					</h2>
					<xsl:apply-templates select="/gentoo/packages/package[categoryid = current()/categoryid]" />
				</section>
			</xsl:for-each>
		</div>
  </xsl:template>
</xsl:stylesheet>