Commit ff545421 authored by Davis King's avatar Davis King

Added XSLT for dealing with <code> blocks generated by the new --to-xml option

in htmlify.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403727
parent cc32202a
...@@ -140,6 +140,22 @@ ...@@ -140,6 +140,22 @@
padding: 0.7em; padding: 0.7em;
} }
div#function {
background-color:white;
border: 2px solid rgb(102,102,255);
text-align:left;
margin-top: 0.3em;
padding: 0.3em;
}
div#class {
background-color:white;
border: 2px solid rgb(255,102,102);
text-align:left;
margin-top: 0.3em;
padding: 0.3em;
}
div#extension { div#extension {
background-color:#FDFDFD; background-color:#FDFDFD;
border: 1px solid rgb(102,102,102); border: 1px solid rgb(102,102,102);
...@@ -952,10 +968,123 @@ ...@@ -952,10 +968,123 @@
</xsl:template> </xsl:template>
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- XSLT for dealing with <code> blocks generated by the htmlify to-xml option -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<xsl:template match="code">
<h1>Classes and Structs:</h1>
<xsl:for-each select="classes/class">
<xsl:sort select="translate(concat(name,.),$lcletters, $ucletters)"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
<h1>Global Functions:</h1>
<xsl:for-each select="global_functions/function">
<xsl:sort select="translate(concat(name,.),$lcletters, $ucletters)"/>
<div id="function">
<a onclick="Toggle(this)" style="cursor: pointer"><img src="plus.gif" border="0"/><font color="blue">
<u><b><xsl:value-of select="name"/>()</b></u></font></a>
<div style="display:none;">
<br/>
<xsl:if test="scope != ''">
<u>Scope</u>: <xsl:value-of select="scope"/> <br/>
</xsl:if>
<u>File</u>: <xsl:value-of select="file"/> <br/><br/>
<div style="margin-left:1.5em">
<pre style="font-size:1.1em;"><xsl:value-of select="declaration"/>;</pre>
<font color="#009900"><pre><xsl:value-of select="comment"/></pre></font>
</div>
<br/>
</div>
</div>
</xsl:for-each>
</xsl:template>
<!-- ************************************************************************* --> <!-- ************************************************************************* -->
<xsl:template match="class">
<div id="class">
<a onclick="Toggle(this)" style="cursor: pointer"><img src="plus.gif" border="0"/><font color="blue">
<u><b><xsl:value-of select="name"/></b></u></font></a>
<div style="display:none;">
<br/>
<xsl:if test="scope != ''">
<u>Scope</u>: <xsl:value-of select="scope"/> <br/>
</xsl:if>
<u>File</u>: <xsl:value-of select="file"/> <br/><br/>
<div style="margin-left:1.5em">
<pre style="font-size:1.1em;"><xsl:value-of select="declaration"/>;</pre> <br/>
<font color="#009900"><pre><xsl:value-of select="comment"/></pre></font> <br/>
</div>
<xsl:if test="public_typedefs">
<a onclick="Toggle(this)" style="cursor: pointer"><img src="plus.gif" border="0"/><font color="blue">
<u>Public typedefs</u></font></a>
<div style="display:none;">
<ul>
<xsl:for-each select="public_typedefs/typedef">
<li><xsl:value-of select="."/>;</li>
</xsl:for-each>
</ul>
</div>
<br/>
</xsl:if>
<xsl:if test="public_variables">
<a onclick="Toggle(this)" style="cursor: pointer"><img src="plus.gif" border="0"/><font color="blue">
<u>Public Variables</u></font></a>
<div style="display:none;">
<ul>
<xsl:for-each select="public_variables/variable">
<li><xsl:value-of select="."/>;</li>
</xsl:for-each>
</ul>
</div>
<br/>
</xsl:if>
<xsl:if test="public_methods">
<a onclick="Toggle(this)" style="cursor: pointer"><img src="plus.gif" border="0"/><font color="blue">
<u>Public Methods</u></font></a>
<div style="display:none;">
<xsl:for-each select="public_methods/method">
<div id="function">
<u>Method Name</u>: <b><xsl:value-of select="name"/></b> <br/><br/>
<div style="margin-left:1.5em">
<pre style="font-size:1.1em;"><xsl:value-of select="declaration"/>;</pre>
<font color="#009900"><pre><xsl:value-of select="comment"/></pre></font> <br/>
</div>
</div>
</xsl:for-each>
</div>
<br/>
</xsl:if>
<xsl:if test="public_inner_classes">
<a onclick="Toggle(this)" style="cursor: pointer"><img src="plus.gif" border="0"/><font color="blue">
<u>Public Inner Classes</u></font></a>
<div style="display:none;">
<xsl:for-each select="public_inner_classes/class">
<xsl:apply-templates select="."/>
</xsl:for-each>
</div>
<br/>
</xsl:if>
</div>
</div>
</xsl:template>
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment