forked from jquery/api.jquerymobile.com
-
Notifications
You must be signed in to change notification settings - Fork 1
/
entries2html.xsl
26 lines (23 loc) · 1.01 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
<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:template name="example-code">
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><xsl:value-of select="//entry/@name"/> demo</title>
<link rel="stylesheet" href="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script><xsl:if test="css">
<style><xsl:value-of select="css/text()"/> </style></xsl:if>
</head>
<body>
<xsl:value-of select="html/text()"/>
<xsl:if test="code">
<script><xsl:value-of select="code/text()"/></script>
</xsl:if>
</body>
</html>
</xsl:template>
</xsl:stylesheet>