-
Notifications
You must be signed in to change notification settings - Fork 0
/
ArticleInfo.xsl
55 lines (54 loc) · 2.12 KB
/
ArticleInfo.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
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:key name="article-by-exid" match="ArticleInfo" use="ExternalCourseId"/>
<xsl:template match="/dataroot">
<html>
<head>
<style type="text/css">
.AI { text-indent: -20px; margin-left: 25px; }
</style>
</head>
<body>
Generated: <xsl:value-of select="@generated"/>
<hr />
<xsl:for-each select="ArticleInfo[count(. | key('article-by-exid', ExternalCourseId)[1]) = 1]">
<xsl:sort select="ExternalCourseId"/>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat('#',ExternalCourseId)"/>
</xsl:attribute>
<xsl:value-of select="concat(Name, ' --- ', Instructor)"/>
</a>
<br/>
</xsl:for-each>
<xsl:for-each select="ArticleInfo[count(. | key('article-by-exid', ExternalCourseId)[1]) = 1]">
<xsl:sort select="ExternalCourseId"/>
<xsl:sort select="/Author"/>
<xsl:sort select="ArticleTitle"/>
<h2>
<a>
<xsl:attribute name="name">
<xsl:value-of select="ExternalCourseId"/>
</xsl:attribute>
</a>
<xsl:value-of select="concat(Name, ' --- ', Instructor)"/>
</h2>
<xsl:text>
</xsl:text>
<xsl:for-each select="key('article-by-exid', ExternalCourseId)">
<xsl:text>
</xsl:text>
<p class="AI"><xsl:value-of select="Author"/>
(<xsl:value-of select="JournalYear"/>).
<xsl:value-of select="ArticleTitle"/>.
<i><xsl:value-of select="Title"/>,
<xsl:value-of select="Volume"/></i>(<xsl:value-of select="Issue"/>),
<xsl:value-of select="Pages"/>.
Retrieved from <a><xsl:attribute name="href"><xsl:value-of select="ProxiedLocation"/></xsl:attribute><xsl:attribute name="target">_blank</xsl:attribute> <xsl:value-of select="ProxiedLocation"/></a>
</p>
</xsl:for-each>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>