Doc: Initiate transition to next generation documentation
[shapes.git] / doc / parts / namespace-index / formats / html.xsl
blobff08ca292bfc4314fda0d0ed9cab9b52724533f0
1 <?xml version="1.0" encoding="UTF-8"?>
3 <!-- This file is part of Shapes. -->
4 <!-- -->
5 <!-- Shapes is free software: you can redistribute it and/or modify -->
6 <!-- it under the terms of the GNU General Public License as published by -->
7 <!-- the Free Software Foundation, either version 3 of the License, or -->
8 <!-- any later version. -->
9 <!-- -->
10 <!-- Shapes is distributed in the hope that it will be useful, -->
11 <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
12 <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
13 <!-- GNU General Public License for more details. -->
14 <!-- -->
15 <!-- You should have received a copy of the GNU General Public License -->
16 <!-- along with Shapes. If not, see <http://www.gnu.org/licenses/>. -->
17 <!-- -->
18 <!-- Copyright 2015 Henrik Tidefelt -->
20 <xsl:stylesheet
21 version="2.0"
22 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
23 xmlns="http://www.w3.org/1999/xhtml"
25 <xsl:output method="xml" indent="no"
26 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
27 doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
30 <xsl:include href="../../formats/html.xsl" />
31 <xsl:include href="../../formats/bindings-html.xsl" />
32 <xsl:include href="../../formats/language-elements-html.xsl" />
34 <xsl:template match="/book">
35 <html>
36 <head>
37 <title><xsl:apply-templates select="title" /></title>
38 <xsl:element name="link">
39 <xsl:attribute name="rel">stylesheet</xsl:attribute>
40 <xsl:attribute name="href"><xsl:value-of select="/book/base/@href" />shapes.css</xsl:attribute>
41 </xsl:element>
42 </head>
43 <body>
44 <xsl:call-template name="head-navigation" />
45 <h2><xsl:apply-templates select="title" /></h2>
46 <hr class="thick"/>
47 <xsl:apply-templates select="top" />
49 <hr class="thin"/>
50 <div class="p" style="text-align:center;"><b>Alphabetical list of namespaces</b></div>
51 <div class="p" style="text-align:center;">
52 <xsl:for-each select="/book/external/book[namespace]">
53 <xsl:sort select="@name" />
54 <xsl:variable name="ns"><xsl:value-of select="namespace" /></xsl:variable>
55 <xsl:element name="a">
56 <xsl:attribute name="class">discrete</xsl:attribute>
57 <xsl:attribute name="href">
58 #ns:<xsl:call-template name="namespace-to-a-id"><xsl:with-param name="name"><xsl:value-of select="$ns" /></xsl:with-param></xsl:call-template>
59 </xsl:attribute>
60 <xsl:call-template name="name-to-namespace">
61 <xsl:with-param name="name"><xsl:value-of select="$ns" /></xsl:with-param>
62 </xsl:call-template>
63 </xsl:element>
64 <xsl:text>  </xsl:text>
65 </xsl:for-each>
66 </div>
67 <hr class="thin"/>
69 <xsl:for-each select="/book/external/book[namespace]">
70 <xsl:sort select="namespace" />
71 <xsl:variable name="ns"><xsl:value-of select="namespace" /></xsl:variable>
72 <h4>
73 <xsl:element name="a">
74 <xsl:attribute name="name">ns:<xsl:call-template name="namespace-to-a-id"><xsl:with-param name="name"><xsl:value-of select="$ns" /></xsl:with-param></xsl:call-template></xsl:attribute>
75 <xsl:call-template name="name-to-linked-namespace"><xsl:with-param name="name"><xsl:value-of select="$ns" /></xsl:with-param></xsl:call-template>
76 </xsl:element>
77 </h4>
78 <xsl:element name="table">
79 <xsl:attribute name="class">loose</xsl:attribute>
80 <xsl:element name="tr">
81 <xsl:element name="th">Name</xsl:element>
82 <xsl:element name="th">Summary</xsl:element>
83 </xsl:element>
84 <xsl:for-each select="/book/external/book[namespace = $ns]//system-binding[@name] | /book/external/book[namespace = $ns]//dynamic-variable[@name] | /book/external/book[namespace = $ns]//escape-continuation[@name] | /book/external/book[namespace = $ns]//system-state[@name] | /book/external/book[namespace = $ns]//coretype[@name] | /book/external/book[namespace = $ns]//core-state-type[@name] | /book/external/book[within-namespace = $ns]//system-binding[@name] | /book/external/book[within-namespace = $ns]//dynamic-variable[@name] | /book/external/book[within-namespace = $ns]//escape-continuation[@name] | /book/external/book[within-namespace = $ns]//system-state[@name]">
85 <xsl:sort select="@name" />
86 <xsl:variable name="ext"><xsl:apply-templates mode="extension-of-binding" select="ancestor::book[1]"/></xsl:variable>
87 <xsl:variable name="kind"><xsl:apply-templates mode="kind-of-binding" select="."/></xsl:variable>
88 <xsl:element name="tr">
89 <xsl:element name="td">
90 <xsl:element name="span">
91 <xsl:attribute name="class">weak</xsl:attribute>
92 <xsl:call-template name="name-to-namespace"><xsl:with-param name="name"><xsl:value-of select="$ns" /></xsl:with-param></xsl:call-template><xsl:text>^</xsl:text>
93 </xsl:element>
94 <xsl:call-template name="ns-kind-name-to-linked-binding">
95 <xsl:with-param name="placed">true</xsl:with-param>
96 <xsl:with-param name="namespace"><xsl:value-of select="$ns" /></xsl:with-param>
97 <xsl:with-param name="extension"><xsl:value-of select="$ext" /></xsl:with-param>
98 <xsl:with-param name="kind"><xsl:value-of select="$kind" /></xsl:with-param>
99 <xsl:with-param name="name"><xsl:value-of select="@name" /></xsl:with-param>
100 </xsl:call-template>
101 <xsl:element name="span">
102 <xsl:attribute name="class">weak</xsl:attribute>
103 <xsl:text>$</xsl:text>
104 </xsl:element>
105 </xsl:element>
106 <xsl:element name="td">
107 <xsl:apply-templates select="summary"/>
108 </xsl:element>
109 </xsl:element> <!-- tr -->
110 </xsl:for-each>
111 </xsl:element> <!-- table -->
112 </xsl:for-each>
113 <xsl:call-template name="SF-placeholder" />
114 </body>
115 </html>
116 </xsl:template>
118 <xsl:template mode="extension-of-binding" match="book[namespace]"></xsl:template>
119 <xsl:template mode="extension-of-binding" match="book[within-namespace and extension]"><xsl:value-of select="extension" /></xsl:template>
121 <xsl:template mode="kind-of-binding" match="system-binding">
122 <xsl:text>value</xsl:text>
123 </xsl:template>
124 <xsl:template mode="kind-of-binding" match="dynamic-variable">
125 <xsl:text>dynamic</xsl:text>
126 </xsl:template>
127 <xsl:template mode="kind-of-binding" match="escape-continuation">
128 <xsl:text>escape</xsl:text>
129 </xsl:template>
130 <xsl:template mode="kind-of-binding" match="system-state">
131 <xsl:text>state</xsl:text>
132 </xsl:template>
133 <xsl:template mode="kind-of-binding" match="coretype">
134 <xsl:text>type</xsl:text>
135 </xsl:template>
136 <xsl:template mode="kind-of-binding" match="core-state-type">
137 <xsl:text>state-type</xsl:text>
138 </xsl:template>
140 </xsl:stylesheet>