diff options
author | Leah (ctucx) <leah@ctu.cx> | 2021-03-08 17:18:06 +0100 |
---|---|---|
committer | Leah (ctucx) <leah@ctu.cx> | 2021-03-08 17:18:06 +0100 |
commit | 353f02e187d7539b0cd4811d0d59562d20de6c64 (patch) | |
tree | ffed56372eff85cbde26050f796ce26fd0b6aad1 | |
parent | a447e0c221f4cb52313bc7601f5443f1dbc5c028 (diff) |
remove unnecessary file: playlist.xslt
-rw-r--r-- | playlist.xslt | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/playlist.xslt b/playlist.xslt deleted file mode 100644 index d9f947c..0000000 --- a/playlist.xslt +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> - -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - <xsl:output method="text" /> - - <xsl:variable name="hex" select="'0123456789ABCDEF'"/> - <xsl:variable name="ascii"> !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~</xsl:variable> - <xsl:variable name="safe">/!()*-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~</xsl:variable> - <xsl:variable name="latin1"> ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ</xsl:variable> - - <xsl:template name="decode"> - <xsl:param name="str"/> - - <xsl:choose> - <xsl:when test="contains($str,'%')"> - <xsl:value-of select="substring-before($str,'%')"/> - <xsl:variable name="hexpair" select="translate(substring(substring-after($str,'%'),1,2),'abcdef','ABCDEF')"/> - <xsl:variable name="decimal" select="(string-length(substring-before($hex,substring($hexpair,1,1))))*16 + string-length(substring-before($hex,substring($hexpair,2,1)))"/> - <xsl:choose> - <xsl:when test="$decimal < 127 and $decimal > 31"> - <xsl:value-of select="substring($ascii,$decimal - 31,1)"/> - </xsl:when> - <xsl:when test="$decimal > 159"> - <xsl:value-of select="substring($latin1,$decimal - 159,1)"/> - </xsl:when> - <xsl:otherwise>?</xsl:otherwise> - </xsl:choose> - <xsl:call-template name="decode"> - <xsl:with-param name="str" select="substring(substring-after($str,'%'),3)"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$str"/> - </xsl:otherwise> - </xsl:choose> - </xsl:template> - - - <xsl:template name="url-encode"> - <xsl:param name="str"/> - <xsl:if test="$str"> - <xsl:variable name="first-char" select="substring($str,1,1)"/> - <xsl:choose> - <xsl:when test="contains($safe,$first-char)"> - <xsl:value-of select="$first-char"/> - </xsl:when> - <xsl:otherwise> - <xsl:variable name="codepoint"> - <xsl:choose> - <xsl:when test="contains($ascii,$first-char)"> - <xsl:value-of select="string-length(substring-before($ascii,$first-char)) + 32"/> - </xsl:when> - <xsl:when test="contains($latin1,$first-char)"> - <xsl:value-of select="string-length(substring-before($latin1,$first-char)) + 160"/> - </xsl:when> - <xsl:otherwise> - <xsl:message terminate="no">Warning: string contains a character that is out of range! Substituting "?".</xsl:message> - <xsl:text>63</xsl:text> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - <xsl:variable name="hex-digit1" select="substring($hex,floor($codepoint div 16) + 1,1)"/> - <xsl:variable name="hex-digit2" select="substring($hex,$codepoint mod 16 + 1,1)"/> - <xsl:value-of select="concat('%',$hex-digit1,$hex-digit2)"/> - </xsl:otherwise> - </xsl:choose> - <xsl:if test="string-length($str) > 1"> - <xsl:call-template name="url-encode"> - <xsl:with-param name="str" select="substring($str,2)"/> - </xsl:call-template> - </xsl:if> - </xsl:if> - </xsl:template> - - - <xsl:template match="directory"> - </xsl:template> - - <xsl:template match="file"> - <xsl:value-of select="$domain" /> - <xsl:call-template name="url-encode"> - <xsl:with-param name="str" select="concat($path, current())" /> - </xsl:call-template> - </xsl:template> - <xsl:template match="/"> - <xsl:apply-templates /> - </xsl:template> -</xsl:stylesheet> |