<xsl:template match="/*">
<html>
<head>
- <title>jQuery Docs - API</title>
+ <title>jQuery Docs - <xsl:value-of select="/docs/@version"/> API</title>
<link rel="stylesheet" href="style/style.css"/>
<script src="../dist/jquery.js"></script>
<script src="js/tooltip.js"></script>
<script src="js/doc.js"></script>
</head>
<body>
- <h1>jQuery Docs - API</h1>
+ <h1>jQuery Docs - <xsl:value-of select="/docs/@version"/> API</h1>
<ul id="docs">
<xsl:for-each select="method[not(@private)]">
- <xsl:sort select="@name"/>
+ <xsl:sort select="translate(@name,'$.','')"/>
<xsl:sort select="count(params)"/>
<li>
<span class='type'><span class='tooltip'><xsl:value-of select="@type"/></span></span>
</xsl:if>
</xsl:for-each>
)</xsl:if>
- </span>
+ </span> returns <span class='tooltip'><xsl:value-of select="@type"/></span>
<div class='short'>
<xsl:value-of select="@short"/>
</div>
<div class='more'>
<div class='desc'>
- <xsl:value-of select="desc"/>
+ <xsl:for-each select="desc">
+ <xsl:call-template name="break" />
+ </xsl:for-each>
</div>
<xsl:for-each select="examples">
<div class='example'>
</html>
</xsl:template>
+<xsl:template name="break">
+ <xsl:param name="text" select="." />
+ <xsl:choose>
+ <xsl:when test="contains($text, '

')">
+ <xsl:value-of select="substring-before($text, '

')" />
+ <br /><br />
+ <xsl:call-template name="break">
+ <xsl:with-param name="text" select="substring-after($text, '

')" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$text" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
</xsl:stylesheet>