-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodlist.xsl
42 lines (36 loc) · 1.14 KB
/
modlist.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
<?xml version="1.0" encoding="UTF-8"?>
<!--
ATLauncher XML to Markdown modlist converter
Author: Léa Gris
Date: 2017-01-08
Version: 0.1.0
License: http://www.wtfpl.net/
Example usage:
xsltproc modlist.xsl ATLauncherModpack.xml > modlist.md
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:functx="http://www.functx.com"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="1.0">
<xsl:strip-space elements="*"/>
<xsl:output method="text" />
<xsl:template match="*">
<xsl:apply-templates select="mods"/>
</xsl:template>
<xsl:template match="/version/mods">
<xsl:text>| Mod | Version | Description |
</xsl:text>
<xsl:text>|-----|:-------:|-------------|
</xsl:text>
<xsl:apply-templates select="mod" />
</xsl:template>
<xsl:template match="mod">
<xsl:text>| [</xsl:text>
<xsl:value-of select="@name" />
<xsl:text>](</xsl:text>
<xsl:value-of select="@website" />
<xsl:text>) | </xsl:text>
<xsl:value-of select="@version" />
<xsl:text> | </xsl:text>
<xsl:value-of select="@description" />
<xsl:text> |
</xsl:text>
</xsl:template>
</xsl:stylesheet>