Inject xml-stylesheet to Media Server Response

Does anyone know if it’s possible to get PMS to inject an xml-stylesheet reference into the XML response, and to store XSL files so that they are served by the PMS web server?



For example, if I open http://localhost:32400/music I would like to insert <?xml-stylesheet type="text/xsl" href="plugins.xsl"?> right after the xml declaration, as such



<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<?xml-stylesheet type="text/xsl" href="plugins.xsl"?><br />
<MediaContainer size="3" content="plugins"><br />
  <Directory key="bbcpodcasts" title="BBC Podcasts" thumb="/music/bbcpodcasts/:/resources/icon-default.png" art="/music/bbcpodcasts/:/resources/art-default.jpg" hasStoreServices="1" hasPrefs="1" identifier="com.plexapp.plugins.bbcpodcasts" lastAccessedAt="1310669625"/><br />
  ...<br />
</MediaContainer><br />




and then use something like


<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes"><br />
  <xsl:output method="html" version="1.0" indent="yes"/><br />
  <xsl:template match="/"><br />
    <html><br />
      <head><br />
        <title/><br />
      </head><br />
      <body><br />
        <table><br />
          <xsl:for-each select="//Directory"><br />
            <tr><br />
              <td><br />
                <img><br />
                  <xsl:attribute name="src"><xsl:value-of select="@thumb"/></xsl:attribute><br />
                  <xsl:attribute name="alt"><xsl:value-of select="@title"/></xsl:attribute><br />
                  <xsl:attribute name="width">100</xsl:attribute><br />
                  <xsl:attribute name="height">100</xsl:attribute><br />
                </img><br />
              </td><br />
              <td valign="top"><br />
                <a><br />
                  <xsl:attribute name="href"><xsl:value-of select="@key"/></xsl:attribute><br />
                  <xsl:value-of select="@title"/><br />
                </a><br />
              </td><br />
            </tr><br />
          </xsl:for-each><br />
        </table><br />
      </body><br />
    </html><br />
  </xsl:template><br />
</xsl:stylesheet><br />



This way, I would have an easy way to test a plugin during development without having to resort to a proper client every single time I modify something.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.