-
Notifications
You must be signed in to change notification settings - Fork 1
/
publications.xsl
63 lines (58 loc) · 2.8 KB
/
publications.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
58
59
60
61
62
63
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz-'" />
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ '" />
<xsl:template match="/">
<section id="publications">
<div class="page-header">
<h1>Publications <small>papers</small></h1>
</div>
<xsl:for-each select="publi/article">
<xsl:apply-templates select="." />
</xsl:for-each>
</section>
</xsl:template>
<xsl:template match="article">
<div class="row">
<div class="span3 columns">
<h3><xsl:value-of select="year"/></h3>
<p><xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="confsite"/>
</xsl:attribute><xsl:value-of select="conference"/></xsl:element></p>
</div>
<div class="span9 columns">
<h3><xsl:value-of select="title"/></h3>
<p><xsl:value-of select="abstract"/></p>
<p><xsl:value-of select="authors"/></p>
<div class="btn-group">
<xsl:element name="a">
<xsl:choose>
<xsl:when test="acm">
<xsl:attribute name="href"><xsl:value-of select="acm"/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="href">/publications/<xsl:value-of select="translate(conference, $uppercase, $smallcase)"/>-<xsl:value-of select="year"/>.pdf</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:attribute name="class">btn btn-info<xsl:if test="published = 'no'"> disabled</xsl:if></xsl:attribute>PDF</xsl:element>
<xsl:element name="a">
<xsl:choose>
<xsl:when test="slides">
<xsl:attribute name="href"><xsl:value-of select="slides"/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="href">/publications/<xsl:value-of select="translate(conference, $uppercase, $smallcase)"/>-<xsl:value-of select="year"/>-slides.pdf</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:attribute name="class">btn btn-info<xsl:if test="published = 'no'"> disabled</xsl:if></xsl:attribute>Slides</xsl:element>
<xsl:element name="a">
<xsl:attribute name="href">/publications/<xsl:value-of select="translate(conference, $uppercase, $smallcase)"/>-<xsl:value-of select="year"/>.bib</xsl:attribute>
<xsl:attribute name="class">btn btn-info<xsl:if test="published = 'no'"> disabled</xsl:if></xsl:attribute>Bibtex</xsl:element>
</div>
</div>
</div>
<hr />
</xsl:template>
</xsl:stylesheet>