| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286 |
- <?xml version="1.0" ?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <!-- Version: $Id: pawndoc.xsl 3612 2006-07-22 09:59:46Z thiadmer $ -->
- <xsl:template match="/">
- <HTML>
- <HEAD>
- <META http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <TITLE><xsl:value-of select="doc/assembly/name"/></TITLE>
- <STYLE type="text/css">
- BODY { FONT-FAMILY: "Verdana", sans-serif; FONT-SIZE: x-small; }
- CODE { FONT-SIZE: x-small; }
- DL { MARGIN-LEFT: 4em; DISPLAY: compact }
- DT { FONT-WEIGHT: bold }
- A:link { COLOR: #4e4887 }
- A:visited { COLOR: #8080c8 }
- A:active { COLOR: #f16043 }
- A:hover { COLOR: #f16043 }
- P { MARGIN-BOTTOM: 0.5em; MARGIN-TOP: 0.5em; MARGIN-LEFT: 4em }
- P.noindent { MARGIN-LEFT: 0em }
- P.syntax { FONT-WEIGHT: bold }
- HR.para { HEIGHT: 0; BORDER: 0; COLOR: transparent; BACKGROUND-COLOR: transparent; MARGIN-TOP: 0.5em; MARGIN-BOTTOM: 0; }
- XMP { BACKGROUND-COLOR: #ddeeff; FONT-SIZE: x-small; MARGIN: 1em }
- PRE { BACKGROUND-COLOR: #ddeeff; FONT-SIZE: x-small; MARGIN: 1em }
- TABLE { BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-RIGHT: medium none; BORDER-TOP: medium none }
- TABLE.param { BACKGROUND-COLOR: #ddeeff; }
- TABLE.transition { BACKGROUND-COLOR: #ddeeff; }
- TD { BACKGROUND-COLOR: #ddeeff; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-RIGHT: medium none; BORDER-TOP: medium none; FONT-SIZE: x-small; MARGIN: 2px; PADDING-BOTTOM: 2px; PADDING-LEFT: 2px; PADDING-RIGHT: 2px; PADDING-TOP: 2px; TEXT-ALIGN: left }
- TD.header { BACKGROUND-COLOR: transparent; FONT-WEIGHT: bold; COLOR: #4e4887; WIDTH: 3.3em; PADDING-LEFT: 0px; MARGIN-BOTTOM: 0.5em }
- TD.inline { BACKGROUND-COLOR: transparent }
- TD.param { FONT-WEIGHT: bold; FONT-STYLE: italic; PADDING-RIGHT: 20px; }
- TD.transition { PADDING-RIGHT: 10px; }
- TH { BACKGROUND-COLOR: #336699; COLOR: #ddeeff; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-RIGHT: medium none; BORDER-TOP: medium none; FONT-SIZE: x-small; MARGIN: 2px; PADDING-BOTTOM: 2px; PADDING-LEFT: 4px; PADDING-RIGHT: 4px; PADDING-TOP: 2px; TEXT-ALIGN: left }
- UL { MARGIN-TOP: 0.5em; }
- LI.referrer { DISPLAY: inline; PADDING-RIGHT: 8px }
- LI.dependency { DISPLAY: inline; PADDING-RIGHT: 8px }
- LI.seealso { DISPLAY: inline; PADDING-RIGHT: 8px }
- LI.attribute { DISPLAY: inline; PADDING-RIGHT: 8px }
- OL { MARGIN-TOP: 0.5em; }
- SPAN.paraminfo { FONT-WEIGHT:Bold; COLOR: #336699; }
- H1 { COLOR: #336699; FONT-SIZE: x-large; MARGIN-BOTTOM: 0.5em; MARGIN-TOP: 1em; PADDING-LEFT: 4px }
- H2 { BORDER-RIGHT: #4e4887 8px solid; BORDER-TOP: #4e4887 2px solid; COLOR: #4e4887; MARGIN-BOTTOM: 0.5em; MARGIN-TOP: 1em; }
- H2.general { BORDER: none; }
- H3 { COLOR: #4e4887; FONT-SIZE: x-small; MARGIN-BOTTOM: 0.5em }
- H4 { COLOR: #4e4887; FONT-SIZE: x-small; FONT-STYLE: italic; MARGIN-BOTTOM: 0.5em }
- H5 { COLOR: #4e4887; FONT-SIZE: xx-small; MARGIN-BOTTOM: 0.5em }
- H6 { COLOR: #4e4887; FONT-SIZE: xx-small; FONT-STYLE: italic; MARGIN-BOTTOM: 0.5em }
- </STYLE>
- </HEAD>
- <BODY>
- <h1><xsl:value-of select="doc/assembly/name"/></h1>
- <xsl:apply-templates select="doc/general"/>
- <xsl:apply-templates select="doc/members/member"/>
- </BODY>
- </HTML>
- </xsl:template>
- <xsl:template match="general">
- <xsl:apply-templates/>
- <br/>
- </xsl:template>
- <xsl:template match="member">
- <xsl:choose>
- <xsl:when test="substring(@name,1,2) = 'T:'">
- <a><xsl:attribute name="name"><xsl:value-of select="substring(@name,3)"/></xsl:attribute><h2><span style="float:right; padding-right:2px">enumeration</span><xsl:value-of select="substring(@name,3)"/></h2></a>
- <xsl:apply-templates select="summary"/>
- <xsl:if test="remarks">
- <h3>Remarks</h3>
- <xsl:apply-templates select="remarks"/>
- </xsl:if>
- <xsl:if test="member">
- <h3>Members</h3>
- <blockquote>
- <xsl:apply-templates select="member"/>
- </blockquote>
- </xsl:if>
- <xsl:apply-templates select="example"/>
- <xsl:if test="referrer">
- <h3>Used by</h3>
- <ul><xsl:apply-templates select="referrer"/></ul>
- </xsl:if>
- <xsl:if test="dependency">
- <h3>Depends on</h3>
- <ul><xsl:apply-templates select="dependency"/></ul>
- </xsl:if>
- <xsl:if test="seealso">
- <h3>See Also</h3>
- <ul><xsl:apply-templates select="seealso"/></ul>
- </xsl:if>
- </xsl:when>
- <xsl:when test="substring(@name,1,2) = 'C:'">
- <a><xsl:attribute name="name"><xsl:value-of select="substring(@name,3)"/></xsl:attribute><h2><span style="float:right; padding-right:2px">constant</span><xsl:value-of select="substring(@name,3)"/></h2></a>
- <p class="noindent"><table><tr><td class="header inline">Value</td><td class="inline"><xsl:value-of select="@value"/></td></tr></table></p>
- <xsl:apply-templates select="summary"/>
- <xsl:apply-templates select="tagname"/>
- <xsl:apply-templates select="size"/>
- <xsl:if test="remarks">
- <h3>Remarks</h3>
- <xsl:apply-templates select="remarks"/>
- </xsl:if>
- <xsl:apply-templates select="example"/>
- <xsl:if test="referrer">
- <h3>Used by</h3>
- <ul><xsl:apply-templates select="referrer"/></ul>
- </xsl:if>
- <xsl:if test="dependency">
- <h3>Depends on</h3>
- <ul><xsl:apply-templates select="dependency"/></ul>
- </xsl:if>
- <xsl:if test="seealso">
- <h3>See Also</h3>
- <ul><xsl:apply-templates select="seealso"/></ul>
- </xsl:if>
- </xsl:when>
- <xsl:when test="substring(@name,1,2) = 'M:'">
- <a><xsl:attribute name="name"><xsl:value-of select="substring(@name,3)"/></xsl:attribute><h2><span style="float:right; padding-right:2px">function</span><xsl:value-of select="substring(@name,3)"/></h2></a>
- <xsl:apply-templates select="summary"/>
- <h3>Syntax</h3><p class="syntax"><xsl:value-of select="@syntax"/></p>
- <xsl:if test="param">
- <p><table class="param"><xsl:apply-templates select="param"/></table></p>
- </xsl:if>
- <xsl:apply-templates select="tagname"/>
- <xsl:apply-templates select="returns"/>
- <xsl:if test="remarks">
- <h3>Remarks</h3>
- <xsl:apply-templates select="remarks"/>
- </xsl:if>
- <xsl:apply-templates select="example"/>
- <xsl:if test="referrer">
- <h3>Used by</h3>
- <ul><xsl:apply-templates select="referrer"/></ul>
- </xsl:if>
- <xsl:if test="dependency">
- <h3>Depends on</h3>
- <ul><xsl:apply-templates select="dependency"/></ul>
- </xsl:if>
- <xsl:if test="attribute">
- <h3>Attributes</h3>
- <ul><xsl:apply-templates select="attribute"/></ul>
- </xsl:if>
- <xsl:apply-templates select="automaton"/>
- <xsl:if test="transition">
- <h3>Transition table</h3>
- <p>
- <table class="transition">
- <tr><th>Source</th><th>Target</th><th>Condition</th></tr>
- <xsl:apply-templates select="transition"/>
- </table>
- </p>
- </xsl:if>
- <xsl:apply-templates select="stacksize"/>
- <xsl:if test="seealso">
- <h3>See Also</h3>
- <ul><xsl:apply-templates select="seealso"/></ul>
- </xsl:if>
- </xsl:when>
- <xsl:when test="substring(@name,1,2) = 'F:'">
- <a><xsl:attribute name="name"><xsl:value-of select="substring(@name,3)"/></xsl:attribute><h2><span style="float:right; padding-right:2px">variable</span><xsl:value-of select="substring(@name,3)"/></h2></a>
- <xsl:apply-templates select="summary"/>
- <xsl:apply-templates select="tagname"/>
- <xsl:if test="remarks">
- <h3>Remarks</h3>
- <xsl:apply-templates select="remarks"/>
- </xsl:if>
- <xsl:apply-templates select="example"/>
- <xsl:if test="referrer">
- <h3>Used by</h3>
- <ul><xsl:apply-templates select="referrer"/></ul>
- </xsl:if>
- <xsl:if test="dependency">
- <h3>Depends on</h3>
- <ul><xsl:apply-templates select="dependency"/></ul>
- </xsl:if>
- <xsl:if test="seealso">
- <h3>See Also</h3>
- <ul><xsl:apply-templates select="seealso"/></ul>
- </xsl:if>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="summary">
- <p><xsl:apply-templates/></p>
- </xsl:template>
- <xsl:template match="param">
- <tr>
- <td class="param"><xsl:value-of select="@name"/></td>
- <td><xsl:apply-templates/></td>
- </tr>
- </xsl:template>
- <xsl:template match="paraminfo">
- <span class="paraminfo"><<xsl:apply-templates/>></span>
- </xsl:template>
- <xsl:template match="tagname">
- <p class="noindent"><table><tr>
- <td class="header inline">Tag</td>
- <td class="inline"><xsl:value-of select="@value"/></td>
- </tr></table></p>
- </xsl:template>
- <xsl:template match="size">
- <p class="noindent"><table><tr>
- <td class="header inline">Size</td>
- <td class="inline"><xsl:value-of select="@value"/></td>
- </tr></table></p>
- </xsl:template>
- <xsl:template match="returns">
- <h3>Returns</h3>
- <p><xsl:apply-templates/></p>
- </xsl:template>
- <xsl:template match="remarks">
- <p><xsl:apply-templates/></p>
- </xsl:template>
- <xsl:template match="example">
- <h3>Example</h3>
- <p><xsl:apply-templates/></p>
- </xsl:template>
- <xsl:template match="attribute">
- <li class="attribute"><xsl:value-of select="@name"/></li>
- </xsl:template>
- <xsl:template match="referrer">
- <li class="referrer"><a><xsl:attribute name="href">#<xsl:value-of select="@name"/></xsl:attribute><xsl:value-of select="@name"/>()</a></li>
- </xsl:template>
- <xsl:template match="dependency">
- <li class="dependency"><a><xsl:attribute name="href">#<xsl:value-of select="@name"/></xsl:attribute><xsl:value-of select="@name"/>()</a></li>
- </xsl:template>
- <xsl:template match="stacksize">
- <h3>Estimated stack usage</h3>
- <p><xsl:value-of select="@value"/> cells</p>
- </xsl:template>
- <xsl:template match="automaton">
- <h3>Automaton</h3>
- <p><xsl:value-of select="@name"/></p>
- </xsl:template>
- <xsl:template match="transition">
- <tr>
- <td class="transition"><xsl:value-of select="@source"/></td>
- <td class="transition"><xsl:value-of select="@target"/></td>
- <td><xsl:value-of select="@condition"/></td>
- </tr>
- </xsl:template>
- <xsl:template match="code">
- <pre><xsl:apply-templates/></pre>
- </xsl:template>
- <xsl:template match="seealso">
- <li class="seealso"><a><xsl:attribute name="href">#<xsl:value-of select="@name"/></xsl:attribute><xsl:value-of select="@name"/>()</a></li>
- </xsl:template>
- <xsl:template match="paramref">
- <i><xsl:value-of select="@name"/></i>
- </xsl:template>
- <xsl:template match="c"><code><xsl:apply-templates/></code></xsl:template>
- <xsl:template match="em"><em><xsl:apply-templates/></em></xsl:template>
- <xsl:template match="ul"><ul><xsl:apply-templates/></ul></xsl:template>
- <xsl:template match="ol"><ol><xsl:apply-templates/></ol></xsl:template>
- <xsl:template match="li"><li><xsl:apply-templates/></li></xsl:template>
- <xsl:template match="p"><hr class="para"/><xsl:apply-templates/></xsl:template>
- <xsl:template match="para"><hr class="para"/><xsl:apply-templates/></xsl:template>
- <xsl:template match="section"><h2 class="general"><xsl:apply-templates/></h2></xsl:template>
- <xsl:template match="subsection"><h3 class="general"><xsl:apply-templates/></h3></xsl:template>
- </xsl:stylesheet>
|