mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-11-03 04:17:17 -05:00
Put the last item check into every filtered tag.
This way we shouldn't run into problems of this type anymore. Also it should be easier to customize this way, if someone wants to filter differently. svn path=/icecast/trunk/icecast/; revision=19262
This commit is contained in:
parent
e6ce60e630
commit
c4d9eaa066
@ -7,24 +7,18 @@
|
|||||||
<xsl:variable name="output">true</xsl:variable>
|
<xsl:variable name="output">true</xsl:variable>
|
||||||
|
|
||||||
<!-- hide certain nodes from all sources -->
|
<!-- hide certain nodes from all sources -->
|
||||||
<xsl:template match="icestats/source/max_listeners" />
|
<xsl:template match="icestats/source/max_listeners"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||||
<xsl:template match="icestats/source/public" />
|
<xsl:template match="icestats/source/public"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||||
<xsl:template match="icestats/source/source_ip" />
|
<xsl:template match="icestats/source/source_ip"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||||
<xsl:template match="icestats/source/slow_listeners" />
|
<xsl:template match="icestats/source/slow_listeners"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||||
<xsl:template match="icestats/source/*[contains(name(), 'total_bytes')]" />
|
<xsl:template match="icestats/source/*[contains(name(), 'total_bytes')]"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||||
<xsl:template match="icestats/source/user_agent" >
|
<xsl:template match="icestats/source/user_agent" ><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||||
<!-- user_agent is most of the time the last node in a mount,
|
|
||||||
if we just delete it, then we will malform the output,
|
|
||||||
so special handling applies. -->
|
|
||||||
<xsl:if test="following-sibling::*"></xsl:if>
|
|
||||||
<xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<!-- hide certain global nodes -->
|
<!-- hide certain global nodes -->
|
||||||
<xsl:template match="icestats/sources" />
|
<xsl:template match="icestats/sources"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||||
<xsl:template match="icestats/clients" />
|
<xsl:template match="icestats/clients"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||||
<xsl:template match="icestats/stats" />
|
<xsl:template match="icestats/stats"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||||
<xsl:template match="icestats/listeners" />
|
<xsl:template match="icestats/listeners"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||||
<xsl:template match="node()[contains(name(), 'connections')]" />
|
<xsl:template match="node()[contains(name(), 'connections')]"><xsl:if test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
|
||||||
|
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
Loading…
Reference in New Issue
Block a user