<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" > <xsl:output method="xml" media-type="text/html" indent="yes" encoding="UTF-8" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" /> <xsl:template match = "/icestats" > <xsl:for-each select="source"> <xsl:if test="artist"><xsl:value-of select="artist" /> - </xsl:if><xsl:value-of select="title" /> </xsl:for-each> </xsl:template> </xsl:stylesheet>
<ip icecast><port>/title.xsl?mount=/<нужный поток>
**********
188.68.93.246:8000/title.xsl
<script> var timeout = 5; // интервал обновления информации в секундах function getStats(){ $.ajax({ url: "http://1188.68.93.246:8000/title.xsl", success: function( response ) { $('#song-title').text(response) } }); } getStats(); setInterval(getStats, timeout * 1000); </script>
<div id="song-title"></div>