Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 40 lines (35 sloc) 1.415 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:import href="node_modules/grunt-jquery-content/tasks/jquery-xml/entries2html-base.xsl"/>
<xsl:import href="notes.xsl"/>

<xsl:template name="example-code">
&lt;!doctype html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
&lt;meta charset="utf-8"&gt;
&lt;title&gt;<xsl:value-of select="//entry/@name"/> demo&lt;/title&gt;
&lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.8.24/themes/base/jquery-ui.css"&gt;<xsl:if test="css">
&lt;style&gt;<xsl:value-of select="css/text()"/> &lt;/style&gt;</xsl:if>
&lt;script src="http://code.jquery.com/jquery-1.8.2.js"&gt;&lt;/script&gt;
&lt;script src="http://code.jquery.com/ui/1.8.24/jquery-ui.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
<xsl:value-of select="html/text()"/>
&lt;script&gt;<xsl:value-of select="code/text()"/>&lt;/script&gt;

&lt;/body&gt;
&lt;/html&gt;
</xsl:template>

<!-- <template name="core-link"/> will generate a link to the documentation for
the method of the same name from jQuery core -->
<xsl:template match="//placeholder[@name = 'core-link']">
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat('http://api.jquery.com/', ancestor::entry/@name)"/>
</xsl:attribute>
<code>
<xsl:text>.</xsl:text>
<xsl:value-of select="ancestor::entry/@name"/>
<xsl:text>()</xsl:text>
</code>
</a>
</xsl:template>

</xsl:stylesheet>
Something went wrong with that request. Please try again.