comparison html.xsl @ 13:2925b0e246c6 default tip

Fix a lot of things, and add a TODO.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 17 Feb 2012 12:54:08 +0100
parents 79dfd9765a67
children
comparison
equal deleted inserted replaced
12:79dfd9765a67 13:2925b0e246c6
31 <x:if test="o:name != ''"> 31 <x:if test="o:name != ''">
32 <x:text> - </x:text><small><x:value-of select="o:name"/></small> 32 <x:text> - </x:text><small><x:value-of select="o:name"/></small>
33 </x:if> 33 </x:if>
34 </h3> 34 </h3>
35 35
36 <x:variable name="ref" select="o:params/@ref"/>
36 <x:choose> 37 <x:choose>
38 <x:when test="o:params/@ref">
39 <x:call-template name="params">
40 <x:with-param name="params" select="/o:opcodes/o:op[o:num = $ref]/o:params/o:param"/>
41 </x:call-template>
42 </x:when>
37 <x:when test="o:params"> 43 <x:when test="o:params">
38 <x:apply-templates select="o:params"/> 44 <x:apply-templates select="o:params"/>
39 </x:when> 45 </x:when>
40 <x:otherwise> 46 <x:otherwise>
41 <p>Takes no parameters.</p> 47 <p>Takes no parameters.</p>
43 </x:choose> 49 </x:choose>
44 50
45 <x:apply-templates select="o:desc"/> 51 <x:apply-templates select="o:desc"/>
46 </x:template> 52 </x:template>
47 53
48 <x:template match="o:params"> 54 <x:template name="params" match="o:params">
55 <x:param name="params" select="o:param"/>
49 <table> 56 <table>
50 <tr> 57 <tr>
51 <th>Type</th> 58 <th>Type</th>
52 <x:if test="o:param/@name"><th>Name</th></x:if> 59 <x:if test="$params/@name"><th>Name</th></x:if>
53 <x:if test="o:param/@unit"><th>Unit</th></x:if> 60 <x:if test="$params/@unit"><th>Unit</th></x:if>
54 <x:if test="o:param/@var"><th>Variable</th></x:if> 61 <x:if test="$params/@var"><th>Variable</th></x:if>
55 <x:if test="o:param != ''"><th>Notes</th></x:if> 62 <x:if test="$params != ''"><th>Notes</th></x:if>
56 <x:if test="o:param/@values"><th>Values</th></x:if> 63 <x:if test="$params/@values"><th>Values</th></x:if>
57 </tr> 64 </tr>
58 <x:apply-templates select="o:param"/> 65 <x:apply-templates select="$params"/>
59 </table> 66 </table>
60 </x:template> 67 </x:template>
61 68
62 <x:template match="o:param"> 69 <x:template match="o:param">
63 <tr> 70 <tr>
95 <x:otherwise><x:value-of select="."/></x:otherwise> 102 <x:otherwise><x:value-of select="."/></x:otherwise>
96 </x:choose> 103 </x:choose>
97 </x:template> 104 </x:template>
98 105
99 <x:template match="o:desc"> 106 <x:template match="o:desc">
107 <p>
100 <x:choose> 108 <x:choose>
101 <x:when test="count(*) &gt; 1"> 109 <x:when test="h:div">
102 <x:apply-templates/> 110 <x:for-each select="h:div/*">
111 <x:call-template name="xhtml"/>
112 </x:for-each>
103 </x:when> 113 </x:when>
104 <x:otherwise> 114 <x:otherwise>
105 <p><x:apply-templates/></p> 115 <x:apply-templates/>
106 </x:otherwise> 116 </x:otherwise>
107 </x:choose> 117 </x:choose>
118 </p>
108 </x:template> 119 </x:template>
109 120
110 <x:template name="xhtml" match="node() | @*"> 121 <x:template name="xhtml" match="node() | @*">
111 <x:copy> 122 <x:copy>
112 <x:apply-templates select="node() | @*" /> 123 <x:apply-templates select="node() | @*" />