Doc: "Shapes" and "<str-Shapes />".
[shapes.git] / doc / parts / algo-tol / formats / html.xsl
blobeab9928b7be6c138aac2871499f7310901af9da0
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="2.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4 <xsl:output method="xml" indent="no" />
6 <xsl:include href="../../formats/html.xsl" />
8 <xsl:template match="/book">
9 <html>
10 <head>
11 <title><xsl:apply-templates select="title" /></title>
12 <xsl:element name="link">
13 <xsl:attribute name="rel">stylesheet</xsl:attribute>
14 <xsl:attribute name="href"><xsl:value-of select="/book/base/@href" />shapes.css</xsl:attribute>
15 </xsl:element>
16 </head>
17 <body>
18 <xsl:call-template name="head-navigation" />
19 <h1><xsl:apply-templates select="title" /></h1>
20 <hr class="thick"/>
21 <xsl:apply-templates select="top" />
22 <p><b>Algorithms:</b>
23 <xsl:for-each select="section">
24   
25 <xsl:element name="a">
26 <xsl:attribute name="href">#<xsl:value-of select="@id" /></xsl:attribute>
27 <xsl:apply-templates select="title" />
28 </xsl:element>
29 </xsl:for-each>
30 </p>
32 <hr class="thin"/>
33 <p class="center"><b>Tolerance parameters</b></p>
34 <xsl:for-each select="/book/tolerance-parameter[@name]">
35 <xsl:sort select="@name" />
36 <h4>
37 <xsl:element name="a">
38 <xsl:attribute name="name">tol-<xsl:value-of select="@name" /></xsl:attribute>
39 <tolparam><xsl:value-of select="@name" /></tolparam>
40 </xsl:element>
41 <xsl:text> : </xsl:text><xsl:apply-templates select="default" /><xsl:text> :: </xsl:text><xsl:apply-templates select="type" />
42 </h4>
43 <xsl:apply-templates select="description" />
44 </xsl:for-each>
45 <hr class="thin"/>
47 <xsl:for-each select="section">
48 <h2>
49 <xsl:element name="a">
50 <xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute>
51 <xsl:value-of select="title" />
52 </xsl:element>
53 </h2>
54 <xsl:apply-templates select="top" />
55 <xsl:apply-templates select="body" />
56 <xsl:for-each select="section">
57 <h3><xsl:apply-templates select="title" /></h3>
58 <xsl:apply-templates select="top" />
59 <xsl:apply-templates select="body" />
60 <xsl:for-each select="section">
61 <h4><xsl:apply-templates select="title" /></h4>
62 <xsl:apply-templates select="top" />
63 <xsl:apply-templates select="body" />
64 </xsl:for-each>
65 </xsl:for-each>
66 </xsl:for-each>
67 </body>
68 </html>
69 </xsl:template>
71 <xsl:template match="system-binding[@identifier]">
72 <h3>
73 <xsl:element name="a">
74 <xsl:attribute name="name"><xsl:value-of select="@identifier" /></xsl:attribute>
75 <xsl:value-of select="@identifier" />
76 </xsl:element>
77 </h3>
78 <xsl:apply-templates />
79 </xsl:template>
81 <xsl:template match="system-binding[@identifier]/function">
82 <xsl:apply-templates select="case"/>
83 </xsl:template>
85 <xsl:template match="system-binding[@identifier]/function/case[@constructor-of]">
86 <h4 class="plain">
87 <b>Case</b>  
88 <xsl:apply-templates select="arguments"/>→ <typename><xsl:value-of select="@constructor-of" /></typename>
89 </h4>
90 <xsl:apply-templates select="dynamic-references"/>
91 <xsl:apply-templates select="description"/>
92 </xsl:template>
94 <xsl:template match="function/case/arguments/arg[@identifier]">
95 <xsl:call-template name="name-to-argument"><xsl:with-param name="name"><xsl:value-of select="@identifier" /></xsl:with-param></xsl:call-template>
96 <xsl:apply-templates select="default"/>
97 <xsl:apply-templates select="type"/>
98 <xsl:text> </xsl:text>
99 </xsl:template>
100 <xsl:template match="function/case/arguments/arg[not(@identifier)]">
101 <xsl:apply-templates select="default"/>
102 <xsl:apply-templates select="type"/>
103 <xsl:text> </xsl:text>
104 </xsl:template>
105 <xsl:template match="function/case/arguments/arg/default">:<xsl:apply-templates /></xsl:template>
106 <xsl:template match="function/case/arguments/arg/type"><xsl:text>::</xsl:text><xsl:apply-templates /></xsl:template>
108 <xsl:template match="dynamic-references[not(dynvar)]">
109 <p><b>Dynamic references:</b><xsl:text> </xsl:text><em>none</em></p>
110 </xsl:template>
111 <xsl:template match="dynamic-references[dynvar]">
112 <p><b>Dynamic references:</b><xsl:text> </xsl:text>
113 <xsl:apply-templates />
114 </p>
115 </xsl:template>
117 <xsl:template match="system-binding[@identifier]/hot">
118 <p><b>Hot value</b></p>
119 <p>Spawns states of type <xsl:apply-templates select="constructor-of" />.</p>
120 </xsl:template>
124 </xsl:stylesheet>