| View previous topic :: View next topic |
| Author |
Message |
mj_martino
Joined: 15 Aug 2008 Posts: 21
|
Posted: Mon Nov 10, 2008 7:13 pm Post subject: show one moutpoint stat |
|
|
Hello
How to show statistic only only one moutpoint ??
| Code: |
| http://ip:port/status.xsl?mout=testmout |
not working ;P
How to built own template show stat ?
I want only name moutpoint and llistners, peak_listners
Mayby somebody show to me exemply ;>
Salute
UPDATE:
I create simple code but...
| Code: |
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
<xsl:template match = "/icestats" >
<pre>Moutpoint -
<xsl:for-each select="source[@mount='/mixzone']">
<xsl:for-each select="source[@mount='/mixzone64.ogg']">
<xsl:for-each select="source[@mount='/mixzone32.ogg']">
<xsl:value-of select="name" /> - <xsl:value-of select="listners" />
</xsl:for-each>
</pre>
</xsl:template>
</xsl:stylesheet> |
I copy file stat_mixzone.xsl to /etc/icecast2/web and /usr/share/icecast2/web
http://ip:port/stat_mixzone.xsl
Could not parse XSLT file
somebody help ;> _________________ IC 2.3.2-kh9
Home site:
Radio DEEPZONE - NON-Commercial Music
Radio MIXZONE
Thanks for support Karl. |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Mon Nov 10, 2008 8:06 pm Post subject: |
|
|
using the xsl pages (and icecast 2.3.2) you should be ok with /status.xsl?mount=/live.ogg
karl. |
|
| Back to top |
|
 |
mj_martino
Joined: 15 Aug 2008 Posts: 21
|
Posted: Mon Nov 10, 2008 8:15 pm Post subject: |
|
|
| karlH wrote: |
using the xsl pages (and icecast 2.3.2) you should be ok with /status.xsl?mount=/live.ogg
karl. |
Always resolve my problem ;D
<beer> 4U
But if i create own template ?
Where I can find mini how to ?  _________________ IC 2.3.2-kh9
Home site:
Radio DEEPZONE - NON-Commercial Music
Radio MIXZONE
Thanks for support Karl. |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Mon Nov 10, 2008 8:43 pm Post subject: |
|
|
You'll have to read up on xsl transforms, which is a w3c spec but I can say is that the posted xsl had a nested for-each imbalance.
karl. |
|
| Back to top |
|
 |
mj_martino
Joined: 15 Aug 2008 Posts: 21
|
Posted: Mon Nov 10, 2008 9:45 pm Post subject: |
|
|
Karl
yy... whitch code correct syntax ?
I have extract stat one mout
| Code: |
| <xsl:for-each select="source[@mount='/mount']"> |
or
| Code: |
| <xsl:value of select="source[@mount='/mount']"> |
_________________ IC 2.3.2-kh9
Home site:
Radio DEEPZONE - NON-Commercial Music
Radio MIXZONE
Thanks for support Karl. |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Mon Nov 10, 2008 9:56 pm Post subject: |
|
|
the latter should suffice
karl. |
|
| Back to top |
|
 |
mj_martino
Joined: 15 Aug 2008 Posts: 21
|
Posted: Mon Nov 10, 2008 10:45 pm Post subject: |
|
|
I dont understood ... why not working...
| Code: |
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
<xsl:template match = "/icestats" >
<pre>
MountPoint,Connections,Stream Name,Current Listeners,Description,Currently Playing,Stream URL
Global,
Client:<xsl:value-of select="connections" /> Source: <xsl:value-of select="source_connections" />,,<xsl:value-of select="listeners" />,,
<xsl:for-each select="source">
<xsl:value-of select="@mount" />,,<xsl:value-of select="name" />,<xsl:value-of select="listeners" />,<xsl:value-of select="description" />,<xsl:value-of select="artist" /> - <xsl:value-of select="title" />,
<xsl:value-of select="url" />
</xsl:for-each>
</pre>
</xsl:template>
</xsl:stylesheet> |
This orginal status2.xsl
I Try change this section
| Code: |
<xsl:for-each select="source">
<xsl:value-of select="@mount" /> |
on to
| Code: |
| source[@mount='/mount'] |
and not working...
I needs only how to define one moutpoint ;( ehh _________________ IC 2.3.2-kh9
Home site:
Radio DEEPZONE - NON-Commercial Music
Radio MIXZONE
Thanks for support Karl. |
|
| Back to top |
|
 |
|