-
Notifications
You must be signed in to change notification settings - Fork 0
/
FontAwesome.xsl
48 lines (41 loc) · 1.64 KB
/
FontAwesome.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
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:wbt="myWebTemplater.1.0"
exclude-result-prefixes="xs wbt"
version="1.0">
<xsl:template match="Fa | Fa2x | Fa3x | Fa4x" mode="identity-translate">
<xsl:variable name="class">
<xsl:text>fa fa-</xsl:text>
<xsl:value-of select="text()"/>
<xsl:choose>
<xsl:when test="self::Fa2x">
<xsl:text> fa-2x</xsl:text>
</xsl:when>
<xsl:when test="self::Fa3x">
<xsl:text> fa-3x</xsl:text>
</xsl:when>
<xsl:when test="self::Fa4x">
<xsl:text> fa-4x</xsl:text>
</xsl:when>
</xsl:choose>
<xsl:if test="@class">
<xsl:text> </xsl:text>
<xsl:value-of select="@class"/>
</xsl:if>
</xsl:variable>
<i class="{$class}"/>
</xsl:template>
<xsl:template match="ChevronLeft2" mode="identity-translate">
<i class="fa fa-angle-double-left"/>
</xsl:template>
<xsl:template name="ChevronLeft" match="ChevronLeft" mode="identity-translate">
<i class="fa fa-chevron-left"/>
</xsl:template>
<xsl:template match="ChevronRight2" mode="identity-translate">
<i class="fa fa-angle-double-right"/>
</xsl:template>
<xsl:template name="ChevronRight" match="ChevronRight" mode="identity-translate">
<i class="fa fa-chevron-right"/>
</xsl:template>
</xsl:stylesheet>