Testcase now logs exceptions if a console is avaiable, makes it easier to find bugs...
[jquery.git] / build / docs / style / docs.xsl
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
4 <xsl:template match="/*">
5 <html>
6 <head>
7         <title>jQuery Docs - API</title>
8         <link rel="stylesheet" href="style/style.css"/>
9         <script src="../dist/jquery.js"></script>
10         <script src="js/tooltip.js"></script>
11         <script src="js/pager.js"></script>
12         <script src="js/doc.js"></script>
13 </head>
14 <body>
15         <h1>jQuery Docs - API</h1>
16         <ul id="docs">
17                 <xsl:for-each select="method[not(@private)]">
18                         <xsl:sort select="translate(@name,'$.','')"/>
19                         <xsl:sort select="count(params)"/>
20                         <li>
21                                 <span class='type'><span class='tooltip'><xsl:value-of select="@type"/></span></span>
22                                 <span class='fn'>
23                                         <a href='#{@name}' class='name' title=''><xsl:value-of select="@name"/></a>
24                                                 <xsl:if test="not(@property)">(
25                                                         <xsl:for-each select="params">
26                                                                 <span class='arg-type tooltip'><xsl:value-of select="@type"/></span><xsl:text> </xsl:text>
27                                                                 <span class='arg-name tooltip' title='{desc}'><xsl:value-of select="@name"/></span>
28                                                                 <xsl:if test="position() != last()">
29                                                                         <xsl:if test="@any"> or </xsl:if>
30                                                                         <xsl:if test="not(@any)">, </xsl:if>
31                                                                 </xsl:if>
32                                                         </xsl:for-each>
33                                                  )</xsl:if>
34                                 </span>
35                                 <div class='short'>
36                                         <xsl:value-of select="@short"/>
37                                 </div>
38                                 <div class='more'>
39                                         <div class='desc'>
40                                                 <xsl:value-of select="desc"/>
41                                         </div>
42                                         <xsl:for-each select="examples">
43                                                 <div class='example'>
44                                                         <h5>Example:</h5>
45                                                         <xsl:if test="desc">
46                                                                 <p><xsl:value-of select="desc"/></p>
47                                                         </xsl:if>
48                                                         <pre><xsl:value-of select="code"/></pre>
49                                                         <xsl:if test="before">
50                                                                 <b>HTML:</b>
51                                                                 <pre><xsl:value-of select="before"/></pre>
52                                                         </xsl:if>
53                                                         <xsl:if test="result">
54                                                                 <b>Result:</b>
55                                                                 <pre><xsl:value-of select="result"/></pre>
56                                                         </xsl:if>
57                                                 </div>
58                                         </xsl:for-each>
59                                 </div>
60                         </li>
61                 </xsl:for-each>
62         </ul>
63
64         <p class="raw"><b>Raw Data:</b><xsl:text> </xsl:text><a href="data/jquery-docs-json.js">JSON</a>, <a href="data/jquery-docs-jsonp.js">JSONP</a>, <a href="data/jquery-docs-xml.xml">XML</a></p>
65 </body>
66 </html>
67 </xsl:template>
68
69 </xsl:stylesheet>