📄 tv.xsl
字号:
</xsl:if>
</td>
<xsl:if test="number($StopTime) > number($StopDisplayCode)">
<td class="extendright"><span><xsl:value-of select="$ExtendRightText" /></span></td>
</xsl:if>
</tr></table>
</td>
<xsl:if test="$FixGaps = 1 and position()!=last() and number($StopTime) < number($NextStartTime)"><td class="empty" colspan="{number($NextStartTime)-number($StopTime)}"></td></xsl:if>
<xsl:if test="position()=last() and number($StopTime) < number($StopDisplayCode)"><td class="empty" colspan="{number($StopDisplayCode)-number($StopTime)}"></td></xsl:if>
</xsl:for-each>
<!--check for a row with no programs and fill it in with an empty row-->
<xsl:if test="not($theseprogrammes)"><td class="empty" colspan="{number($StopDisplayCode)-number($StartDisplayCode)}"></td></xsl:if>
<th class="channel">
<xsl:if test="$ChannelPopups">
<xsl:attribute name="title">
<xsl:text>header=[</xsl:text>
<xsl:if test="string-length($iconname) > 0">
<xsl:text><img src="</xsl:text>
<xsl:choose>
<xsl:when test="$AbsoluteIcons">
<xsl:value-of select="icon/@src"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('icons/',$iconname)"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>" alt="" class="popupimage"/></xsl:text>
</xsl:if>
<xsl:value-of select="$channellongname" />
<xsl:text>] body=[</xsl:text>
<xsl:value-of select="display-name[7]"/>
<xsl:text>] cssheader=[popupheader] cssbody=[popupbody] delay=[</xsl:text>
<xsl:value-of select="$PopupDelay"/>
<xsl:text>]</xsl:text>
</xsl:attribute>
</xsl:if>
<table class="rightchanneltable"><tr><td class="leftlogocell"><xsl:if test="string-length($iconname) > 0"><img><xsl:attribute name="src"> <xsl:choose>
<xsl:when test="$AbsoluteIcons">
<xsl:value-of select="icon/@src"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('icons/',$iconname)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute><xsl:attribute name="class">channelimage</xsl:attribute></img></xsl:if></td><td class="leftnumbercell"><xsl:value-of select="$channelnumber"/></td><td class="middlecell"><span class="leftnumber"><xsl:value-of select="$channelnumber"/></span><br class="leftchannelbr" /><span class="leftnbsp"> </span><span class="channelname"><xsl:value-of select="$channelshortname"/></span><br class="rightchannelbr" /><span class="rightnbsp"> </span><span class="rightnumber"><xsl:value-of select="$channelnumber"/></span></td><td class="rightnumbercell"><xsl:value-of select="$channelnumber"/></td><td class="rightlogocell"><xsl:if test="string-length($iconname) > 0"><img><xsl:attribute name="src"> <xsl:choose>
<xsl:when test="$AbsoluteIcons">
<xsl:value-of select="icon/@src"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('icons/',$iconname)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute><xsl:attribute name="class">channelimage</xsl:attribute></img></xsl:if></td></tr></table>
</th></tr>
</xsl:for-each>
</table>
</div>
</xsl:template>
<xsl:template name="for.loop">
<!--
This template from http://www.bigbold.com/snippets/tag/hello
-->
<xsl:param name="i" />
<xsl:param name="count" />
<xsl:param name="start" />
<!--begin_: Line_by_Line_Output -->
<xsl:if test="$i <= $count">
<xsl:choose>
<xsl:when test="$i > 23">
<th colspan="30" class="time">
<xsl:if test="($i - $start)">
<xsl:attribute name="onclick">
<xsl:value-of select="concat('Init','(',$DisplayLength,',',$CurrentHour,',',$CurrentDay,',',$CurrentMonth,',',$CurrentYear,',',($i - $start),')')" />
</xsl:attribute>
</xsl:if>
<xsl:value-of select="$i - 24" />:00</th>
<th colspan="30" class="time">
<xsl:if test="($i - $start)">
<xsl:attribute name="onclick">
<xsl:value-of select="concat('Init','(',$DisplayLength,',',$CurrentHour,',',$CurrentDay,',',$CurrentMonth,',',$CurrentYear,',',($i - $start),')')" />
</xsl:attribute>
</xsl:if>
<xsl:value-of select="$i - 24" />:30</th>
</xsl:when>
<xsl:otherwise>
<th colspan="30" class="time">
<xsl:if test="($i - $start)">
<xsl:attribute name="onclick">
<xsl:value-of select="concat('Init','(',$DisplayLength,',',$CurrentHour,',',$CurrentDay,',',$CurrentMonth,',',$CurrentYear,',',($i - $start),')')" />
</xsl:attribute>
</xsl:if>
<xsl:value-of select="$i" />:00</th>
<th colspan="30" class="time">
<xsl:if test="($i - $start)">
<xsl:attribute name="onclick">
<xsl:value-of select="concat('Init','(',$DisplayLength,',',$CurrentHour,',',$CurrentDay,',',$CurrentMonth,',',$CurrentYear,',',($i - $start),')')" />
</xsl:attribute>
</xsl:if>
<xsl:value-of select="$i" />:30</th>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<!--begin_: RepeatTheLoopUntilFinished-->
<xsl:if test="$i <= $count">
<xsl:call-template name="for.loop">
<xsl:with-param name="i">
<xsl:value-of select="$i + 1"/>
</xsl:with-param>
<xsl:with-param name="count">
<xsl:value-of select="$count"/>
</xsl:with-param>
<xsl:with-param name="start">
<xsl:value-of select="$start"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="starrating">
<xsl:param name="i"/>
<xsl:param name="count"/>
<xsl:param name="type"/>
<!--begin_: Line_by_Line_Output -->
<xsl:if test="$i <= $count">
<xsl:choose>
<xsl:when test="$type='filled'">
<li class="starfilled"><span>X</span></li>
</xsl:when>
<xsl:when test="$type='half'">
<li class="starhalf"><span>x</span></li>
</xsl:when>
<xsl:when test="$type='empty'">
<li class="starempty"><span>-</span></li>
</xsl:when>
</xsl:choose>
</xsl:if>
<!--begin_: RepeatTheLoopUntilFinished-->
<xsl:if test="$i <= $count">
<xsl:call-template name="starrating">
<xsl:with-param name="i">
<xsl:value-of select="$i + 1"/>
</xsl:with-param>
<xsl:with-param name="count">
<xsl:value-of select="$count"/>
</xsl:with-param>
<xsl:with-param name="type">
<xsl:value-of select="$type"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="filename">
<!--
This template from http://www.maya.com/local/doc/xslt/FAQ/html_format/xsl/sect2/N7240.html
-->
<xsl:param name="x"/>
<xsl:choose>
<xsl:when test="contains($x,'/')">
<xsl:call-template name="filename">
<xsl:with-param name="x" select="substring-after($x,'/')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$x"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="replace">
<!--
This template by Greg Faron on http://www.biglist.com/lists/xsl-list/archives/200211/msg00335.html
-->
<xsl:param name="string" select="''"/>
<xsl:param name="pattern" select="''"/>
<xsl:param name="replacement" select="''"/>
<xsl:choose>
<xsl:when test="$pattern != '' and $string != '' and contains($string, $pattern)">
<xsl:value-of select="substring-before($string, $pattern)"/>
<xsl:copy-of select="$replacement"/>
<xsl:call-template name="replace">
<xsl:with-param name="string" select="substring-after($string, $pattern)"/>
<xsl:with-param name="pattern" select="$pattern"/>
<xsl:with-param name="replacement" select="$replacement"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="fixquotes">
<xsl:param name="string"/>
<xsl:choose>
<xsl:when test="contains($string, "'")">
<xsl:value-of select="substring-before($string, "'")"/>
<xsl:text>\'</xsl:text>
<xsl:call-template name="fixquotes">
<xsl:with-param name="string"
select="substring-after($string, "'")"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="lf2br">
<xsl:param name="StringToTransform"/>
<xsl:choose>
<xsl:when test="contains($StringToTransform,'
')">
<xsl:value-of select="substring-before($StringToTransform,'
')"/><br />
<xsl:call-template name="lf2br">
<xsl:with-param name="StringToTransform">
<xsl:value-of select="substring-after($StringToTransform,'
')"/>
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:when test="contains($StringToTransform,'
')">
<xsl:value-of select="substring-before($StringToTransform,'
')"/><br />
<xsl:call-template name="lf2br">
<xsl:with-param name="StringToTransform">
<xsl:value-of select="substring-after($StringToTransform,'
')"/>
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<!-- string does not contain newline, so just output it -->
<xsl:otherwise>
<xsl:value-of select="$StringToTransform"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -