[Icecast] Custom .xsl files?

oddsock oddsock
Thu Jul 22 11:18:17 UTC 2004


<20040722172806.GA32609 at xmission.com>
Message-ID: <6.0.1.1.2.20040722131000.03718050 at www.oddsock.org>

At 12:28 PM 7/22/2004, you wrote:
>Just a followup, hopefully my experiences will help somebody else.
>Comments inline...
>
>* Michael Smith (msmith at xiph.org) [040721 19:24] spake thusly:
> > On Thursday 22 July 2004 04:56, Myke Place wrote:
> > > I'm curious if it is possible to create custom .xsl files in the /admin
> > > directory, using the same xsl params that appear in in the web
> > > interfaces that ship with Icecast2.
> >
> > Yes. Though I don't know if using an arbitrary one works from the admin
> > directory. Certainly you can put them in icecast's webroot directory
> (or some
> > subdirectory of that).
>
>I was interested to find that inside the /admin directory, it doesn't
>appear that even properly formatted XSL will work _unless_ one of the
>exisiting files is replaced by a file of the same name. For instance,
>copying listmounts.xsl to test.xsl and then trying to access test.xsl
>will not work. It seems that one must use a file with one of the names
>already existing. If there is a way around this, I would love to hear
>about it.
since the xslt in the admin directory does specialized logic (such as
possibly kicking users, moving mountpoints, etc) icecast does some specific
checking on the xslt name in order to trigger it's actions... For instance,
the "listclients" xslt works on a different XML document than does
"listmounts".  So it is definately the case that in the admin directory,
you can't add new features and functionality by dropping in xslt files, you
need to do that PLUS add a handler for that specialized function in the
icecast code.

This is different than the xslt transforms that are in the "web"
directory.  Those, all operate on the same XML document (the one returned
by the /admin/stats.xml request)...You can put any valid xslt transform in
there and icecast will transform it using the stats XML document.

You can also directly modify the xslt transforms in admin, although you
cannot rename them, you can edit/change/enhance them.  If you want to see
the XML document that is applied to each admin xslt, just change the .xsl
to .xml in your request (i.e. /admin/listclients.xml).  You can then code
your xslt transform appropriately.

hope that clears it up..

oddsock




More information about the Icecast mailing list