-
Notifications
You must be signed in to change notification settings - Fork 266
/
entries2html.xsl
executable file
·33 lines (28 loc) · 1.03 KB
/
entries2html.xsl
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
<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:variable name="version-category-links" select="true()"/>
<xsl:template name="example-code">
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><xsl:value-of select="//entry/@name"/> demo</title><xsl:if test="css">
<style><xsl:value-of select="css/text()"/> </style></xsl:if>
<script src="https://code.jquery.com/jquery-3.7.1.js"></script><xsl:if test="code/@location='head'">
<script>
<xsl:copy-of select="code/text()"/>
</script>
</xsl:if>
</head>
<body>
<xsl:copy-of select="html/text()"/>
<xsl:choose>
<xsl:when test="code/@location='head'"></xsl:when>
<xsl:otherwise>
<script><xsl:copy-of select="code/text()"/></script></xsl:otherwise>
</xsl:choose>
</body>
</html>
</xsl:template>
</xsl:stylesheet>