2007-10-28 03:06:45 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<xsl:stylesheet version="1.0"
|
|
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
|
|
xmlns:cc="http://web.resource.org/cc/"
|
|
|
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
|
|
>
|
|
|
|
|
|
|
|
<xsl:template name="video">
|
2007-11-26 14:25:31 +00:00
|
|
|
<h2><xsl:value-of select="//video/rdf:RDF/cc:Work/dc:title" /></h2>
|
2007-10-28 03:06:45 +00:00
|
|
|
<div class="video">
|
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="//video/@cortado='true'">
|
|
|
|
<applet
|
|
|
|
code="com.fluendo.player.Cortado.class"
|
|
|
|
archive="/java/cortado-ovt-stripped-0.2.2.jar"
|
|
|
|
>
|
|
|
|
<xsl:attribute name="width">
|
|
|
|
<xsl:value-of select="//video/@width" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:attribute name="height">
|
|
|
|
<xsl:value-of select="//video/@height" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<param name="url">
|
|
|
|
<xsl:attribute name="value">
|
|
|
|
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/@rdf:about,'/view=true')" />
|
|
|
|
</xsl:attribute>
|
|
|
|
</param>
|
|
|
|
<param name="seekable" value="true"/>
|
|
|
|
<param name="duration">
|
|
|
|
<xsl:attribute name="value">
|
|
|
|
<xsl:value-of select="//video/@duration" />
|
|
|
|
</xsl:attribute>
|
|
|
|
</param>
|
|
|
|
<param name="keepAspect" value="true"/>
|
|
|
|
<param name="video" value="true"/>
|
|
|
|
<param name="audio" value="true"/>
|
|
|
|
<param name="statusHeight" value="24"/>
|
|
|
|
<param name="autoPlay" value="true"/>
|
|
|
|
<param name="showStatus" value="show"/>
|
|
|
|
<param name="bufferSize" value="200"/>
|
|
|
|
</applet>
|
|
|
|
<div>
|
|
|
|
<a>
|
|
|
|
<xsl:attribute name="href">
|
2007-11-07 06:55:02 +00:00
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="//@embed='true'">
|
|
|
|
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/dc:identifier, '/cortado=false&embed=true')" />
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/dc:identifier, '/cortado=false')" />
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
2007-10-28 03:06:45 +00:00
|
|
|
</xsl:attribute>
|
|
|
|
Watch using Browser Video Plugin
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<object>
|
|
|
|
<xsl:attribute name="width">
|
|
|
|
<xsl:value-of select="//video/@width" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:attribute name="height">
|
|
|
|
<xsl:value-of select="//video/@height + 16" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:attribute name="data">
|
|
|
|
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/@rdf:about,'/view=true')" />
|
|
|
|
</xsl:attribute>
|
|
|
|
</object>
|
|
|
|
<div>
|
|
|
|
<a>
|
|
|
|
<xsl:attribute name="href">
|
2007-11-07 06:55:02 +00:00
|
|
|
<xsl:choose>
|
|
|
|
<xsl:when test="//@embed='true'">
|
|
|
|
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/dc:identifier, '/embed=true')" />
|
|
|
|
</xsl:when>
|
|
|
|
<xsl:otherwise>
|
|
|
|
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:identifier" />
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
2007-10-28 03:06:45 +00:00
|
|
|
</xsl:attribute>
|
|
|
|
Watch using Cortado Java Applet
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</xsl:otherwise>
|
|
|
|
</xsl:choose>
|
|
|
|
</div>
|
|
|
|
|
2007-11-07 06:55:02 +00:00
|
|
|
<xsl:if test="not(//@embed='true')">
|
2007-11-26 14:25:31 +00:00
|
|
|
<div style="display:table-cell">
|
2007-11-07 06:55:02 +00:00
|
|
|
<a>
|
|
|
|
<xsl:attribute name="href">
|
|
|
|
<xsl:value-of select="//video/rdf:RDF/cc:Work/@rdf:about" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<img src="/images/tango/document-save.png" />
|
|
|
|
</a>
|
2007-11-26 14:25:31 +00:00
|
|
|
<br />
|
2007-11-07 06:55:02 +00:00
|
|
|
<a>
|
|
|
|
<xsl:attribute name="href">
|
|
|
|
<xsl:value-of select="//video/rdf:RDF/cc:Work/@rdf:about" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:value-of select="$locale_strings[@id='download_video']" />
|
|
|
|
</a>
|
|
|
|
</div>
|
2007-11-26 14:25:31 +00:00
|
|
|
<div style="display:table-cell">
|
|
|
|
<xsl:if test="//@edit='true'">
|
|
|
|
<a>
|
|
|
|
<xsl:attribute name="href">
|
|
|
|
<xsl:value-of select="concat(//rdf:RDF/cc:Work/dc:identifier, '/action=edit')" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<img src="/images/tango/accessories-text-editor.png" style="border:0;vertical-align:bottom;" />
|
|
|
|
</a>
|
|
|
|
<br />
|
|
|
|
<a>
|
|
|
|
<xsl:attribute name="href">
|
|
|
|
<xsl:value-of select="concat(//rdf:RDF/cc:Work/dc:identifier, '/action=edit')" />
|
|
|
|
</xsl:attribute>
|
|
|
|
Edit
|
|
|
|
</a>
|
|
|
|
</xsl:if>
|
|
|
|
</div>
|
|
|
|
<div style="display:table-cell">
|
|
|
|
<xsl:if test="//@edit='true'">
|
|
|
|
<a>
|
|
|
|
<xsl:attribute name="href">
|
|
|
|
<xsl:value-of select="concat(//rdf:RDF/cc:Work/dc:identifier, '/action=bookmark')" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<img src="/images/tango/bookmark-new.png" style="border:0;vertical-align:bottom;" />
|
|
|
|
</a>
|
|
|
|
<br />
|
|
|
|
<a>
|
|
|
|
<xsl:attribute name="href">
|
|
|
|
<xsl:value-of select="concat(//rdf:RDF/cc:Work/dc:identifier, '/action=bookmark')" />
|
|
|
|
</xsl:attribute>
|
|
|
|
Bookmark
|
|
|
|
</a>
|
|
|
|
</xsl:if>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<table class="videometadata">
|
|
|
|
<tr>
|
|
|
|
<td class="leftcell">
|
|
|
|
Filesize
|
|
|
|
</td>
|
|
|
|
<td class="rightcell">
|
|
|
|
<xsl:value-of select="format-number(number(//video/@filesize) div 1048576, '0.0#')" /> MB
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="leftcell">
|
|
|
|
Duration
|
|
|
|
</td>
|
|
|
|
<td class="rightcell">
|
|
|
|
<xsl:variable name="minutes" select="floor(//video/@duration div 60)" />
|
|
|
|
<xsl:variable name="hours" select="floor(//video/@duration div 3600)" />
|
|
|
|
<xsl:variable name="seconds" select="//video/@duration - $minutes*60 - $hours*3600" />
|
|
|
|
<xsl:value-of select="concat($hours, ':', format-number($minutes, '00'), ':', format-number($seconds, '00'))" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="leftcell">
|
|
|
|
Viewcount
|
|
|
|
</td>
|
|
|
|
<td class="rightcell">
|
|
|
|
<xsl:value-of select="//video/@viewcount" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="leftcell">
|
|
|
|
Downloadcount
|
|
|
|
</td>
|
|
|
|
<td class="rightcell">
|
|
|
|
<xsl:value-of select="//video/@downloadcount" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
Permalink: <xsl:value-of select="//rdf:RDF/cc:Work/dc:identifier" />
|
|
|
|
<br />
|
|
|
|
<textarea><iframe src="<xsl:value-of select="concat(//rdf:RDF/cc:Work/dc:identifier, '/embed=true')" />"></iframe></textarea>
|
2007-11-07 06:55:02 +00:00
|
|
|
<div class="videoccdata">
|
|
|
|
<a>
|
|
|
|
<xsl:attribute name="href">
|
|
|
|
<xsl:value-of select="//video/rdf:RDF/cc:License/@rdf:about" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:value-of select="$locale_strings[@id='license_conditions']" />:
|
|
|
|
</a>
|
|
|
|
<br />
|
|
|
|
<a>
|
|
|
|
<xsl:attribute name="href">
|
|
|
|
<xsl:value-of select="//video/rdf:RDF/cc:License/@rdf:about" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<!--
|
|
|
|
unfinished bizness
|
|
|
|
<xsl:value-of select="@rdf:about" />
|
|
|
|
<xsl:if test="true()">
|
|
|
|
<img src="./images/cc/somerights.png" />
|
2007-10-28 03:06:45 +00:00
|
|
|
</xsl:if>
|
2007-11-07 06:55:02 +00:00
|
|
|
-->
|
|
|
|
<xsl:for-each select="//video/rdf:RDF/cc:License/cc:permits">
|
|
|
|
<!--
|
|
|
|
since we are talking about digital media here, distribution actually /is/ reproduction
|
|
|
|
(also, i was too stupid to figure out how to test for both conditions).
|
|
|
|
<xsl:if test="@rdf:resource = 'http://web.resource.org/cc/Reproduction'">
|
|
|
|
<img src="./images/cc/cc-share.png" />
|
|
|
|
</xsl:if>
|
|
|
|
-->
|
|
|
|
<xsl:if test="@rdf:resource = 'http://web.resource.org/cc/Distribution'">
|
|
|
|
<img src="./images/cc/cc-share.png" />
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="@rdf:resource = 'http://web.resource.org/cc/DerivativeWorks'">
|
|
|
|
<img src="./images/cc/cc-remix.png" />
|
|
|
|
</xsl:if>
|
|
|
|
</xsl:for-each>
|
|
|
|
<xsl:for-each select="rdf:RDF/cc:License/cc:requires">
|
|
|
|
<xsl:if test="@rdf:resource = 'http://web.resource.org/cc/Notice'">
|
|
|
|
<img src="./images/cc/cc-by.png" />
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="@rdf:resource = 'http://web.resource.org/cc/ShareAlike'">
|
|
|
|
<img src="./images/cc/cc-sharealike.png" />
|
|
|
|
</xsl:if>
|
|
|
|
<!--
|
|
|
|
source code doesn't make much sense in video context.
|
|
|
|
still, this is preserved for potential future use.
|
|
|
|
<xsl:if test="@rdf:resource = 'http://web.resource.org/cc/SourceCode'">
|
|
|
|
SOURCE
|
|
|
|
</xsl:if>
|
|
|
|
-->
|
|
|
|
</xsl:for-each>
|
|
|
|
<xsl:for-each select="rdf:RDF/cc:License/cc:prohibits">
|
|
|
|
<xsl:if test="@rdf:resource = 'http://web.resource.org/cc/CommercialUse'">
|
|
|
|
<img src="./images/cc/cc-noncommercial.png" />
|
|
|
|
</xsl:if>
|
|
|
|
<xsl:if test="@rdf:resource = 'http://web.resource.org/cc/DerivativeWorks'">
|
|
|
|
<img src="./images/cc/cc-noderivatives.png" />
|
|
|
|
</xsl:if>
|
|
|
|
</xsl:for-each>
|
|
|
|
</a>
|
|
|
|
</div>
|
2007-10-28 03:06:45 +00:00
|
|
|
|
2007-11-07 06:55:02 +00:00
|
|
|
<table class="videometadata">
|
2007-10-28 03:06:45 +00:00
|
|
|
<tr>
|
|
|
|
<td class="leftcell">
|
2007-11-07 06:55:02 +00:00
|
|
|
<xsl:value-of select="$locale_strings[@id='DC.Title']" />:
|
2007-10-28 03:06:45 +00:00
|
|
|
</td>
|
|
|
|
<td class="rightcell">
|
2007-11-07 06:55:02 +00:00
|
|
|
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:title" />
|
2007-10-28 03:06:45 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2007-11-07 06:55:02 +00:00
|
|
|
<tr>
|
|
|
|
<td class="leftcell">
|
|
|
|
<xsl:value-of select="$locale_strings[@id='DC.Creator']" />:
|
|
|
|
</td>
|
|
|
|
<td class="rightcell">
|
|
|
|
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:creator" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="leftcell">
|
|
|
|
<xsl:value-of select="$locale_strings[@id='DC.Subject']" />:
|
|
|
|
</td>
|
|
|
|
<td class="rightcell">
|
|
|
|
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:subject" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="leftcell">
|
|
|
|
<xsl:value-of select="$locale_strings[@id='DC.Description']" />:
|
|
|
|
</td>
|
|
|
|
<td class="rightcell">
|
|
|
|
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:description" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="leftcell">
|
|
|
|
<xsl:value-of select="$locale_strings[@id='DC.Publisher']" />:
|
|
|
|
</td>
|
|
|
|
<td class="rightcell">
|
|
|
|
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:publisher" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="leftcell">
|
|
|
|
<xsl:value-of select="$locale_strings[@id='DC.Date']" />:
|
|
|
|
</td>
|
|
|
|
<td class="rightcell">
|
|
|
|
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:date" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="leftcell">
|
|
|
|
<xsl:value-of select="$locale_strings[@id='DC.Source']" />:
|
|
|
|
</td>
|
|
|
|
<td class="rightcell">
|
|
|
|
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:source" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="leftcell">
|
|
|
|
<xsl:value-of select="$locale_strings[@id='DC.Rights']" />:
|
|
|
|
</td>
|
|
|
|
<td class="rightcell">
|
|
|
|
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:rights" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2007-10-28 03:06:45 +00:00
|
|
|
|
2007-11-07 06:55:02 +00:00
|
|
|
<table class="videometadata">
|
|
|
|
<xsl:for-each select="//referers/referer">
|
|
|
|
<tr>
|
|
|
|
<td class="leftcell">
|
|
|
|
<xsl:value-of select="@count" />
|
|
|
|
</td>
|
|
|
|
<td class="rightcell">
|
|
|
|
<xsl:value-of select="@referer" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</xsl:for-each>
|
|
|
|
</table>
|
2007-10-28 03:06:45 +00:00
|
|
|
|
2007-11-07 06:55:02 +00:00
|
|
|
<xsl:call-template name="comments"/>
|
|
|
|
|
|
|
|
<xsl:if test="not(//@username='')">
|
|
|
|
<div class="commentform">
|
|
|
|
<form method="post">
|
|
|
|
<xsl:attribute name="action">
|
|
|
|
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:identifier" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<fieldset>
|
|
|
|
<br />
|
|
|
|
<textarea name="comment" cols="30" rows="3" />
|
|
|
|
<br />
|
|
|
|
<input type="submit" name="send">
|
|
|
|
<xsl:attribute name="value">
|
|
|
|
<xsl:value-of select="$locale_strings[@id='comment_post']" />
|
|
|
|
</xsl:attribute>
|
|
|
|
</input>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</xsl:if>
|
2007-10-28 03:06:45 +00:00
|
|
|
</xsl:if>
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
<xsl:template name="comments">
|
|
|
|
|
|
|
|
<div class="comments">
|
|
|
|
<span class="protip">
|
|
|
|
<xsl:value-of select="$locale_strings[@id='comment_on_video']" />
|
|
|
|
</span>
|
|
|
|
<br />
|
|
|
|
<xsl:for-each select="//comments/comment">
|
|
|
|
<div class="comment">
|
|
|
|
<a>
|
|
|
|
<xsl:attribute name="href">
|
2007-11-07 06:55:02 +00:00
|
|
|
/user/<xsl:value-of select="@username" />
|
2007-10-28 03:06:45 +00:00
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:value-of select="@username" />
|
|
|
|
</a>:
|
|
|
|
<br />
|
|
|
|
<xsl:value-of select="." />
|
|
|
|
</div>
|
|
|
|
</xsl:for-each>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|