⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newapi.xsl

📁 libxml,在UNIX/LINUX下非常重要的一个库,为XML相关应用提供方便.目前上载的是最新版本,若要取得最新版本,请参考里面的readme.
💻 XSL
📖 第 1 页 / 共 2 页
字号:
    <xsl:variable name="name" select="string(@name)"/>    <xsl:variable name="nlen" select="string-length($name)"/>    <xsl:variable name="tlen" select="string-length(return/@type)"/>    <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>    <h3>      <a name="{$name}"></a>      <xsl:text>Function type: </xsl:text>      <xsl:value-of select="$name"/>    </h3>    <pre class="programlisting">    <xsl:text>Function type: </xsl:text>    <xsl:value-of select="$name"/>    <xsl:text></xsl:text>    <xsl:call-template name="dumptext">      <xsl:with-param name="text" select="return/@type"/>    </xsl:call-template>    <xsl:text>&#9;</xsl:text>    <xsl:value-of select="@name"/>    <xsl:if test="$blen - 40 &lt; -8">      <xsl:text>&#9;</xsl:text>    </xsl:if>    <xsl:if test="$blen - 40 &lt; 0">      <xsl:text>&#9;</xsl:text>    </xsl:if>    <xsl:text>&#9;(</xsl:text>    <xsl:if test="not(arg)">      <xsl:text>void</xsl:text>    </xsl:if>    <xsl:for-each select="arg">      <xsl:call-template name="dumptext">        <xsl:with-param name="text" select="@type"/>      </xsl:call-template>      <xsl:text> </xsl:text>      <xsl:value-of select="@name"/>      <xsl:if test="position() != last()">        <xsl:text>, </xsl:text><br/>	<xsl:if test="$blen - 40 &gt; 8">	  <xsl:text>&#9;</xsl:text>	</xsl:if>	<xsl:if test="$blen - 40 &gt; 0">	  <xsl:text>&#9;</xsl:text>	</xsl:if>	<xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>      </xsl:if>    </xsl:for-each>    <xsl:text>)</xsl:text>    </pre>    <p>    <xsl:call-template name="dumptext">      <xsl:with-param name="text" select="info"/>    </xsl:call-template>    </p>    <xsl:if test="arg | return">      <div class="variablelist"><table border="0"><col align="left"/><tbody>      <xsl:for-each select="arg">        <tr>          <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>	  <td>	    <xsl:call-template name="dumptext">	      <xsl:with-param name="text" select="@info"/>	    </xsl:call-template>	  </td>        </tr>      </xsl:for-each>      <xsl:if test="return/@info">        <tr>          <td><span class="term"><i><tt>Returns</tt></i>:</span></td>	  <td>	    <xsl:call-template name="dumptext">	      <xsl:with-param name="text" select="return/@info"/>	    </xsl:call-template>	  </td>        </tr>      </xsl:if>      </tbody></table></div>    </xsl:if>    <br/>    <xsl:text></xsl:text>  </xsl:template>  <xsl:template match="function">    <xsl:variable name="name" select="string(@name)"/>    <xsl:variable name="nlen" select="string-length($name)"/>    <xsl:variable name="tlen" select="string-length(return/@type)"/>    <xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>    <h3><a name="{$name}"></a>Function: <xsl:value-of select="$name"/></h3>    <pre class="programlisting">    <xsl:call-template name="dumptext">      <xsl:with-param name="text" select="return/@type"/>    </xsl:call-template>    <xsl:text>&#9;</xsl:text>    <xsl:value-of select="@name"/>    <xsl:if test="$blen - 40 &lt; -8">      <xsl:text>&#9;</xsl:text>    </xsl:if>    <xsl:if test="$blen - 40 &lt; 0">      <xsl:text>&#9;</xsl:text>    </xsl:if>    <xsl:text>&#9;(</xsl:text>    <xsl:if test="not(arg)">      <xsl:text>void</xsl:text>    </xsl:if>    <xsl:for-each select="arg">      <xsl:call-template name="dumptext">        <xsl:with-param name="text" select="@type"/>      </xsl:call-template>      <xsl:text> </xsl:text>      <xsl:value-of select="@name"/>      <xsl:if test="position() != last()">        <xsl:text>, </xsl:text><br/>	<xsl:if test="$blen - 40 &gt; 8">	  <xsl:text>&#9;</xsl:text>	</xsl:if>	<xsl:if test="$blen - 40 &gt; 0">	  <xsl:text>&#9;</xsl:text>	</xsl:if>	<xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>      </xsl:if>    </xsl:for-each>    <xsl:text>)</xsl:text><br/>    <xsl:text></xsl:text>    </pre>    <p>    <xsl:call-template name="dumptext">      <xsl:with-param name="text" select="info"/>    </xsl:call-template>    </p><xsl:text></xsl:text>    <xsl:if test="arg | return/@info">      <div class="variablelist"><table border="0"><col align="left"/><tbody>      <xsl:for-each select="arg">        <tr>          <td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>	  <td>	    <xsl:call-template name="dumptext">	      <xsl:with-param name="text" select="@info"/>	    </xsl:call-template>	  </td>        </tr>      </xsl:for-each>      <xsl:if test="return/@info">        <tr>          <td><span class="term"><i><tt>Returns</tt></i>:</span></td>	  <td>	    <xsl:call-template name="dumptext">	      <xsl:with-param name="text" select="return/@info"/>	    </xsl:call-template>	  </td>        </tr>      </xsl:if>      </tbody></table></div>    </xsl:if>  </xsl:template>  <xsl:template match="exports" mode="toc">    <xsl:apply-templates select="key('symbols', string(@symbol))[1]" mode="toc"/>  </xsl:template>  <xsl:template match="exports">    <xsl:apply-templates select="key('symbols', string(@symbol))[1]"/>  </xsl:template>  <xsl:template name="description">    <xsl:if test="deprecated">      <h2 style="font-weight:bold;color:red;text-align:center">This module is deprecated</h2>    </xsl:if>    <xsl:if test="description">      <p><xsl:value-of select="description"/></p>    </xsl:if>  </xsl:template>  <xsl:template name="docomponents">    <xsl:param name="mode"/>    <xsl:apply-templates select="exports[@type='macro']" mode="$mode">      <xsl:sort select='@symbol'/>    </xsl:apply-templates>    <xsl:apply-templates select="exports[@type='enum']" mode="$mode">      <xsl:sort select='@symbol'/>    </xsl:apply-templates>    <xsl:apply-templates select="exports[@type='typedef']" mode="$mode">      <xsl:sort select='@symbol'/>    </xsl:apply-templates>    <xsl:apply-templates select="exports[@type='struct']" mode="$mode">      <xsl:sort select='@symbol'/>    </xsl:apply-templates>    <xsl:apply-templates select="exports[@type='function']" mode="$mode">      <xsl:sort select='@symbol'/>    </xsl:apply-templates>  </xsl:template>    <xsl:template match="file">    <xsl:variable name="name" select="@name"/>    <xsl:variable name="title">Module <xsl:value-of select="$name"/> from <xsl:value-of select="/api/@name"/></xsl:variable>    <xsl:document href="{$htmldir}/libxml-{$name}.html" method="xml" encoding="ISO-8859-1"      doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">	<html>	  <head>	    <xsl:call-template name="style"/>	    <xsl:call-template name="docstyle"/>	    <title><xsl:value-of select="$title"/></title>	  </head>	  <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">	    <xsl:call-template name="titlebox">	      <xsl:with-param name="title" select="$title"/>	    </xsl:call-template>	  <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">	    <tr>	      <td bgcolor="#8b7765">		<table border="0" cellspacing="0" cellpadding="2" width="100%">		  <tr>		    <td valign="top" width="200" bgcolor="#8b7765">		      <xsl:call-template name="apitoc"/>		    </td>		    <td valign="top" bgcolor="#8b7765">		      <table border="0" cellspacing="0" cellpadding="1" width="100%">			<tr>			  <td>			    <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">			      <tr>				<td>				  <table border="0" cellpadding="3" cellspacing="1" width="100%">				    <tr>				      <td bgcolor="#fffacd">	    <xsl:call-template name="navbar"/>	    <xsl:call-template name="description"/>	    <xsl:choose>	      <xsl:when test="deprecated">	        <div class="deprecated">		  <h2>Table of Contents</h2>		  <xsl:apply-templates select="exports" mode="toc"/>		  <h2>Description</h2>		  <xsl:text></xsl:text>		  <xsl:apply-templates select="exports"/>		</div>	      </xsl:when>	      <xsl:otherwise>		<h2>Table of Contents</h2>		<xsl:apply-templates select="exports[@type='macro']" mode="toc">		  <xsl:sort select='@symbol'/>		</xsl:apply-templates>		<xsl:apply-templates select="exports[@type='enum']" mode="toc">		  <xsl:sort select='@symbol'/>		</xsl:apply-templates>		<xsl:apply-templates select="exports[@type='typedef']" mode="toc">		  <xsl:sort select='@symbol'/>		</xsl:apply-templates>		<xsl:apply-templates select="exports[@type='struct']" mode="toc">		  <xsl:sort select='@symbol'/>		</xsl:apply-templates>		<xsl:apply-templates select="exports[@type='function']" mode="toc">		  <xsl:sort select='@symbol'/>		</xsl:apply-templates>		<h2>Description</h2>		<xsl:text></xsl:text>		<xsl:apply-templates select="exports[@type='macro']">		  <xsl:sort select='@symbol'/>		</xsl:apply-templates>		<xsl:apply-templates select="exports[@type='enum']">		  <xsl:sort select='@symbol'/>		</xsl:apply-templates>		<xsl:apply-templates select="exports[@type='typedef']">		  <xsl:sort select='@symbol'/>		</xsl:apply-templates>		<xsl:apply-templates select="exports[@type='struct']">		  <xsl:sort select='@symbol'/>		</xsl:apply-templates>		<xsl:apply-templates select="exports[@type='function']">		  <xsl:sort select='@symbol'/>		</xsl:apply-templates>	      </xsl:otherwise>	    </xsl:choose>					<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>				      </td>				    </tr>				  </table>				</td>			      </tr>			    </table>			  </td>			</tr>		      </table>		    </td>		  </tr>		</table>	      </td>	    </tr>	  </table>	  </body>	</html>    </xsl:document>  </xsl:template>  <xsl:template match="file" mode="toc">    <xsl:variable name="name" select="@name"/>    <li>      <a href="libxml-{$name}.html"><xsl:value-of select="$name"/></a>      <xsl:text>: </xsl:text>      <xsl:value-of select="summary"/>    </li>  </xsl:template>  <xsl:template name="mainpage">    <xsl:param name="file" select="concat($htmldir, '/index.html')"/>    <xsl:variable name="title">Reference Manual for <xsl:value-of select="/api/@name"/></xsl:variable>    <xsl:document href="{$file}" method="xml" encoding="ISO-8859-1"      doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">	<html>	  <head>	    <xsl:call-template name="style"/>	    <xsl:call-template name="docstyle"/>	    <title><xsl:value-of select="$title"/></title>	  </head>	  <body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">	    <xsl:call-template name="titlebox">	      <xsl:with-param name="title" select="$title"/>	    </xsl:call-template>	  <table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">	    <tr>	      <td bgcolor="#8b7765">		<table border="0" cellspacing="0" cellpadding="2" width="100%">		  <tr>		    <td valign="top" width="200" bgcolor="#8b7765">		      <xsl:call-template name="apitoc"/>		    </td>		    <td valign="top" bgcolor="#8b7765">		      <table border="0" cellspacing="0" cellpadding="1" width="100%">			<tr>			  <td>			    <table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">			      <tr>				<td>				  <table border="0" cellpadding="3" cellspacing="1" width="100%">				    <tr>				      <td bgcolor="#fffacd">	    <h2>Table of Contents</h2>	    <ul>	    <xsl:apply-templates select="/api/files/file" mode="toc"/>	    </ul>					<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>				      </td>				    </tr>				  </table>				</td>			      </tr>			    </table>			  </td>			</tr>		      </table>		    </td>		  </tr>		</table>	      </td>	    </tr>	  </table>	  </body>	</html>    </xsl:document>  </xsl:template>  <xsl:template match="/">    <!-- Save the main index.html as well as a couple of copies -->    <xsl:call-template name="mainpage"/>    <xsl:call-template name="mainpage">      <xsl:with-param name="file" select="concat($htmldir, '/book1.html')"/>    </xsl:call-template>    <xsl:call-template name="mainpage">      <xsl:with-param name="file" select="concat($htmldir, '/libxml-lib.html')"/>    </xsl:call-template>    <!-- now build the file for each of the modules -->    <xsl:apply-templates select="/api/files/file"/>  </xsl:template></xsl:stylesheet>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -