ctucx.git: webmusic-nginx

nginx xslt-based index files optimized for music, inspired by https://git.ztn.sh/zotan/webmusic

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 
<?xml version="1.0" encoding="UTF-8" ?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:func="http://exslt.org/functions" xmlns:str="http://exslt.org/strings" version="1.0" extension-element-prefixes="func str">
	<xsl:output method="text" indent="no" encoding="utf-8"/>

	<xsl:template match="directory">
	</xsl:template>

	<xsl:template match="file">
	<m3u>
	<xsl:value-of select="$domain" />
	<xsl:value-of select="$path" />
	{str:encode-uri(current(),true())}
	<xsl:text>&#xa;</xsl:text>
	</m3u>
	</xsl:template>

	<xsl:template match="/">
	<xsl:apply-templates />
	<xsl:text> </xsl:text>
	</xsl:template>

	<xsl:preserve-space elements="m3u"/>
	<xsl:strip-space elements="*"/>
</xsl:stylesheet>