-
Notifications
You must be signed in to change notification settings - Fork 1
/
cvx.words.txt.xsl
57 lines (48 loc) · 1.79 KB
/
cvx.words.txt.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
51
52
53
54
55
56
57
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE stylesheet [
<!ENTITY space
"<xsl:text> </xsl:text>">
]>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" />
<xsl:output method="text"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
indent="yes"
name="text" />
<!-- Generate Text -->
<xsl:template match="*" mode="make-words">
<!-- Make an icon if one is not specified. -->
<xsl:if test="@id">
<xsl:variable name="href">clouds/<xsl:value-of select="@id" />.words.txt</xsl:variable>
<xsl:result-document href="{$href}" format="text">
<xsl:apply-templates select="title" />
<xsl:choose>
<xsl:when test="abstract">
<xsl:apply-templates select="abstract" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="name"/>&space;<xsl:value-of select="name"/>&space;
<xsl:value-of select="name"/>&space;<xsl:value-of select="name"/>&space;
<xsl:value-of select="name"/>&space;<xsl:value-of select="name"/>&space;
<xsl:value-of select="name"/>&space;<xsl:value-of select="name"/>&space;
<xsl:value-of select="name"/>&space;<xsl:value-of select="name"/>&space;
<xsl:value-of select="descendant::*[name()!='url']"/>
</xsl:otherwise>
</xsl:choose>
</xsl:result-document>
</xsl:if>
</xsl:template>
<xsl:template match="p">
<xsl:value-of select="." /><xsl:text>
</xsl:text>
</xsl:template>
<!-- Main -->
<xsl:template match="/">
<!-- Words for all projects -->
<xsl:apply-templates select="cv/projects/project" mode="make-words" />
<!-- Abstracts for all papers -->
<xsl:apply-templates select="cv/publications/pub" mode="make-words" />
</xsl:template>
</xsl:stylesheet>