-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtransform.xsl
50 lines (43 loc) · 1.45 KB
/
transform.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?xml
version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:template match="/">
<html>
<head>
<link rel="stylesheet" href="transform.css" />
<script src="transform.js">//</script>
</head>
<body>
<div class="drop" ondrop="drop(event)" ondragover="allowDrop(event)" ondragstart="drag(event)" >
<xsl:apply-templates />
</div>
</body>
</html>
</xsl:template>
<xsl:template match="head">
<div style="width:95%"><xsl:value-of select="title" /></div>
</xsl:template>
<xsl:template match="outline">
<div id="{generate-id()}" class="drag drop" draggable="true" ondrop="drop(event)" ondragover="allowDrop(event)" ondragstart="drag(event)" >
<div ondragenter="dodgeDrop(event)" ondragleave="dodgeDrop(event)" > <xsl:value-of select="@text"/> </div>
<xsl:apply-templates />
</div>
</xsl:template>
<xsl:template match="outline[@type='rss']">
<div id="{generate-id()}" class="feed drag" draggable="true" ondragenter="dodgeDrop(event)" ondragleave="dodgeDrop(event)" >
<xsl:value-of select="@type"/>
<br />
<xsl:value-of select="@text"/>
<br />
<xsl:value-of select="@title"/>
<br />
<xsl:value-of select="@xmlUrl"/>
<br />
<xsl:value-of select="@htmlUrl"/>
<br />
<xsl:apply-templates />
</div>
</xsl:template>
</xsl:stylesheet>