xspf, yeah
xml rules the intarweb git-svn-id: http://yolanda.mister-muffin.de/svn@67 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
parent
15b5fefb51
commit
4a99924443
2 changed files with 42 additions and 37 deletions
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||||
<?xml-stylesheet type="text/xsl" href="./xsl/xhtml.xsl" ?>
|
<?xml-stylesheet type="text/xsl" href="./xsl/xspf.xsl" ?>
|
||||||
|
|
||||||
<page
|
<page
|
||||||
locale="en-US"
|
locale="en-US"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||||
<xsl:stylesheet version="1.0"
|
<xsl:stylesheet version="1.0"
|
||||||
xmlns="http://www.w3.org/1999/xhtml"
|
xmlns="http://xspf.org/ns/0/"
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
xmlns:cc="http://web.resource.org/cc/"
|
xmlns:cc="http://web.resource.org/cc/"
|
||||||
|
@ -9,45 +9,50 @@
|
||||||
|
|
||||||
<xsl:output
|
<xsl:output
|
||||||
doctype-public="-//W3C//DTD XHTML 1.1//EN"
|
doctype-public="-//W3C//DTD XHTML 1.1//EN"
|
||||||
doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
|
doctype-system="http://xspf.org/ns/0/"
|
||||||
encoding="utf8"
|
encoding="utf8"
|
||||||
indent="yes"
|
indent="yes"
|
||||||
method="xml"
|
method="xml"
|
||||||
media-type="application/xhtml+xml"
|
media-type="application/xml"
|
||||||
omit-xml-declaration="no"
|
omit-xml-declaration="no"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<xsl:variable name="site_strings" select="document('../site/gnutube.xml')//strings" />
|
||||||
|
<xsl:variable name="locale_strings" select="document(concat('../locale/',/page/@locale,'.xml'))//strings" />
|
||||||
|
|
||||||
|
<xsl:template match="/">
|
||||||
|
<xsl:apply-templates />
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="results">
|
<xsl:template match="results">
|
||||||
<xsl:call-template name="searchbar"/>
|
|
||||||
<div>
|
<playlist version="0">
|
||||||
<xsl:value-of select="$locale_strings/str[@id='results_for_query']" />:
|
<trackList>
|
||||||
"<xsl:value-of select="@query" />"
|
|
||||||
</div>
|
|
||||||
<table class="results">
|
|
||||||
<xsl:for-each select="result">
|
<xsl:for-each select="result">
|
||||||
<tr class="result">
|
<track>
|
||||||
<td>
|
<location>
|
||||||
<a>
|
|
||||||
<xsl:attribute name="href">
|
|
||||||
<xsl:value-of select="rdf:RDF/cc:Work/@rdf:about" />
|
<xsl:value-of select="rdf:RDF/cc:Work/@rdf:about" />
|
||||||
</xsl:attribute>
|
</location>
|
||||||
<img>
|
<title>
|
||||||
<xsl:attribute name="src">
|
|
||||||
<xsl:value-of select="thumbnail" />
|
|
||||||
</xsl:attribute>
|
|
||||||
<xsl:attribute name="alt">
|
|
||||||
<xsl:value-of select="rdf:RDF/cc:Work/dc:title" />
|
<xsl:value-of select="rdf:RDF/cc:Work/dc:title" />
|
||||||
</xsl:attribute>
|
</title>
|
||||||
</img>
|
<creator>
|
||||||
</a>
|
<xsl:value-of select="rdf:RDF/cc:Work/dc:creator" />
|
||||||
</td>
|
</creator>
|
||||||
<td>
|
<annotation>
|
||||||
<xsl:value-of select="$locale_strings/str[@id='DC.title']" />: <xsl:value-of select="rdf:RDF/cc:Work/dc:title" /><br />
|
<xsl:value-of select="rdf:RDF/cc:Work/dc:description" />
|
||||||
<xsl:value-of select="$locale_strings/str[@id='DC.creator']" />: <xsl:value-of select="rdf:RDF/cc:Work/dc:creator" /><br />
|
</annotation>
|
||||||
<xsl:value-of select="$locale_strings/str[@id='DC.publisher']" />: <xsl:value-of select="rdf:RDF/cc:Work/dc:publisher" />
|
<info>
|
||||||
</td>
|
<xsl:value-of select="rdf:RDF/cc:Work/dc:identifier" />
|
||||||
</tr>
|
</info>
|
||||||
|
<image>
|
||||||
|
<xsl:value-of select="thumbnail" />
|
||||||
|
</image>
|
||||||
|
</track>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</table>
|
</trackList>
|
||||||
|
</playlist>
|
||||||
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
Loading…
Reference in a new issue