Hi all. Glad to see we're busting out some very cool stylesheets already. I have an idea for hosting them so people can see the work of others. I have a prototype working on my system right now, let me know what you think of this...
People submit stylesheets to a web server, and they get hosted there.
Anyone that wanted to use this system, puts one file on their empeg, it's an index.html that contains two iframes. One iframe goes to an asp page that lists links to all stylesheets available on the hosting server. The other iframe is where the last selected stylesheet is applied to the xml.
When I was testing this in IE 5, I noticed that I had to change a security setting. I normally keep my security level at Medium. I had to either change it to Low, or (my preferred solution) use a custom security level, where I used Medium as a starting point and changed one option. "Access Data Sources Across Domains" under Miscellaneous. I changed that to "Enable" Medium has it at "Disable", medium-low has it at "Prompt". If you don't do this (or the equivalent in your browser), the stylesheet won't be applied to the xml, because you're getting the xml from one machine and asking for the stylesheet from another machine.
Note that this is mainly an idea for testing stylesheets and seeing if you like them, if you do, you should download the stylesheet and put in on your empeg.
Also, to make this work (or, even to test out stylesheets on your own empeg), the Playlist navigation links should be written like this (or similar)...
<td>
<xsl:choose>
<xsl:when test="(type[.='tune']) and (/playlist/@allow_files[.='1'])">
<a>
<xsl:attribute name="href"><xsl:value-of select="fid"/></xsl:attribute>
<xsl:value-of select="title"/>
</a>
</xsl:when>
<xsl:when test="type[.='tune']">
<xsl:value-of select="title"/>
</xsl:when>
<xsl:otherwise>
<a>
<xsl:choose>
<xsl:when test="/playlist/@stylesheet[.='/default.xsl']">
<xsl:attribute name="href"><xsl:value-of select="tagfid"/>?.xml</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="href"><xsl:value-of select="tagfid"/>?STYLE=<xsl:value-of select="/playlist/@stylesheet"/>.xml</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="title"/>
</a>
</xsl:otherwise>
</xsl:choose>
</td>
This is to make sure the link to all the other playlists on your machine continue to use the custom stylesheet you've selected. You can see what's happening in the nested <xsl:otherwise>
I have one more thing to work through before this can go primetime though... I'm not sure how to alter the ?SERIAL links to continue to accept the custom stylesheet. Has anyone done this yet? I'll have to test it, or contact Mark to see what the format is with ?SERIAL and ?STYLE...
So, let me know what you think of this. It's an idea so everyone can quickly take a look at other people's navigation work. By the way, this is what it looks like right now.
Chris