converted tabs to spaces in all xsl files

git-svn-id: http://yolanda.mister-muffin.de/svn@240 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
josch 2008-02-14 22:23:25 +00:00
parent dfb29b7142
commit e59c37e102
13 changed files with 1856 additions and 1856 deletions

View file

@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns="http://xspf.org/ns/0/"
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#"
xmlns="http://xspf.org/ns/0/"
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:output
encoding="utf8"
indent="yes"
method="xml"
media-type="application/xml"
omit-xml-declaration="no"
encoding="utf8"
indent="yes"
method="xml"
media-type="application/xml"
omit-xml-declaration="no"
/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

View file

@ -1,27 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns="http://a9.com/-/spec/opensearch/1.1/"
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#"
xmlns="http://a9.com/-/spec/opensearch/1.1/"
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:output
encoding="utf8"
indent="yes"
method="xml"
media-type="application/xml"
omit-xml-declaration="no"
encoding="utf8"
indent="yes"
method="xml"
media-type="application/xml"
omit-xml-declaration="no"
/>
<xsl:variable name="locale">
<xsl:choose>
<xsl:when test="document(concat('../locale/', //@locale, '.xml'))">
<xsl:value-of select="//@locale" />
</xsl:when>
<xsl:otherwise>en-us</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="document(concat('../locale/', //@locale, '.xml'))">
<xsl:value-of select="//@locale" />
</xsl:when>
<xsl:otherwise>en-us</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="site_strings" select="document('../site/main.xml')//strings/string" />
@ -29,36 +29,36 @@
<!-- kill xml, opensearch is the same everywhere -->
<xsl:template match="/">
<OpenSearchDescription>
<OpenSearchDescription>
<Description>
<xsl:value-of select="$site_strings[@id='site_motto']" />
</Description>
<Description>
<xsl:value-of select="$site_strings[@id='site_motto']" />
</Description>
<Image
height="16"
width="16"
type="image/x-icon"
>
<xsl:value-of select="$site_strings[@id='path_root']" />images/favicon.ico
</Image>
<Image
height="16"
width="16"
type="image/x-icon"
>
<xsl:value-of select="$site_strings[@id='path_root']" />images/favicon.ico
</Image>
<Query
role="example"
searchTerms="example"
/>
<Query
role="example"
searchTerms="example"
/>
<ShortName>
<xsl:value-of select="$site_strings[@id='site_name']" />
</ShortName>
<ShortName>
<xsl:value-of select="$site_strings[@id='site_name']" />
</ShortName>
<Url type="text/html">
<xsl:attribute name="template">
<xsl:value-of select="$site_strings[@id='path_root']" />/search.pl?query={searchTerms}
</xsl:attribute>
</Url>
<Url type="text/html">
<xsl:attribute name="template">
<xsl:value-of select="$site_strings[@id='path_root']" />/search.pl?query={searchTerms}
</xsl:attribute>
</Url>
</OpenSearchDescription>
</OpenSearchDescription>
</xsl:template>
</xsl:stylesheet>

View file

@ -1,78 +1,78 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns="http://purl.org/rss/1.0/"
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#"
xmlns="http://purl.org/rss/1.0/"
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:output
encoding="utf8"
indent="yes"
method="xml"
media-type="application/xml"
omit-xml-declaration="no"
encoding="utf8"
indent="yes"
method="xml"
media-type="application/xml"
omit-xml-declaration="no"
/>
<xsl:variable name="locale">
<xsl:choose>
<xsl:when test="document(concat('../locale/', //@locale, '.xml'))">
<xsl:value-of select="//@locale" />
</xsl:when>
<xsl:otherwise>en-us</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="document(concat('../locale/', //@locale, '.xml'))">
<xsl:value-of select="//@locale" />
</xsl:when>
<xsl:otherwise>en-us</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="site_strings" select="document('../site/main.xml')//strings/string" />
<xsl:variable name="locale_strings" select="document(concat('../locale/', $locale, '.xml'))//strings/string" />
<xsl:template match="/">
<xsl:apply-templates />
<xsl:apply-templates />
</xsl:template>
<xsl:template match="results">
<rdf:RDF>
<rdf:RDF>
<channel>
<xsl:attribute name="rdf:about">
<xsl:value-of select="$site_strings[@id='path_root']" />
<xsl:value-of select="$site_strings[@id='path_results']" />
<xsl:value-of select="//results/@query" />&#38;xslt=rss
</xsl:attribute>
<title>
<xsl:value-of select="$site_strings[@id='site_name']" />
<xsl:value-of select="$locale_strings[@id='rss_separator']" />
<xsl:value-of select="//results/@query" />
</title>
<link>
<xsl:value-of select="$site_strings[@id='path_root']" />
<xsl:value-of select="$site_strings[@id='path_results']" />
<xsl:value-of select="//results/@query" />&#38;
</link>
<description>
<xsl:value-of select="$locale_strings[@id='rss_description_1']" />
<xsl:value-of select="//results/@query" />
<xsl:value-of select="$locale_strings[@id='rss_description_2']" />
</description>
</channel>
<channel>
<xsl:attribute name="rdf:about">
<xsl:value-of select="$site_strings[@id='path_root']" />
<xsl:value-of select="$site_strings[@id='path_results']" />
<xsl:value-of select="//results/@query" />&#38;xslt=rss
</xsl:attribute>
<title>
<xsl:value-of select="$site_strings[@id='site_name']" />
<xsl:value-of select="$locale_strings[@id='rss_separator']" />
<xsl:value-of select="//results/@query" />
</title>
<link>
<xsl:value-of select="$site_strings[@id='path_root']" />
<xsl:value-of select="$site_strings[@id='path_results']" />
<xsl:value-of select="//results/@query" />&#38;
</link>
<description>
<xsl:value-of select="$locale_strings[@id='rss_description_1']" />
<xsl:value-of select="//results/@query" />
<xsl:value-of select="$locale_strings[@id='rss_description_2']" />
</description>
</channel>
<xsl:for-each select="result">
<item>
<title>
<xsl:value-of select="rdf:RDF/cc:Work/dc:title" />
</title>
<description>
<xsl:value-of select="rdf:RDF/cc:Work/dc:description" />
</description>
<link>
<xsl:value-of select="rdf:RDF/cc:Work/@rdf:about" />
</link>
</item>
</xsl:for-each>
<xsl:for-each select="result">
<item>
<title>
<xsl:value-of select="rdf:RDF/cc:Work/dc:title" />
</title>
<description>
<xsl:value-of select="rdf:RDF/cc:Work/dc:description" />
</description>
<link>
<xsl:value-of select="rdf:RDF/cc:Work/@rdf:about" />
</link>
</item>
</xsl:for-each>
</rdf:RDF>
</rdf:RDF>
</xsl:template>

View file

@ -1,20 +1,20 @@
<?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#"
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:output
doctype-public="-//W3C//DTD XHTML 1.1//EN"
doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
encoding="UTF-8"
indent="yes"
method="xml"
media-type="application/xhtml+xml"
omit-xml-declaration="no"
doctype-public="-//W3C//DTD XHTML 1.1//EN"
doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
encoding="UTF-8"
indent="yes"
method="xml"
media-type="application/xhtml+xml"
omit-xml-declaration="no"
/>
<xsl:include href="./xhtml/frontpage.xsl"/>
@ -27,12 +27,12 @@
<xsl:include href="./xhtml/advancedsearch.xsl"/>
<xsl:variable name="locale">
<xsl:choose>
<xsl:when test="document(concat('../locale/', //@locale, '.xml'))">
<xsl:value-of select="//@locale" />
</xsl:when>
<xsl:otherwise>en-us</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="document(concat('../locale/', //@locale, '.xml'))">
<xsl:value-of select="//@locale" />
</xsl:when>
<xsl:otherwise>en-us</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="site_strings" select="document('../site/main.xml')//strings/string" />
@ -41,397 +41,397 @@
<!-- this kills 99% of the processed XML... sorry Tim Bray.... -->
<!-- had to look up Bray in Wikipedia, 2 points off my geek score -->
<xsl:template match="@*|node()">
<xsl:if test="not(/)">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:if>
<xsl:if test="not(/)">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:if>
</xsl:template>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml;charset=utf-8" />
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml;charset=utf-8" />
<xsl:choose>
<xsl:when test="not(//@embed='true')">
<link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico" />
<link rel="stylesheet" type="text/css">
<xsl:attribute name="href">
<xsl:value-of select="//@stylesheet" />
</xsl:attribute>
</link>
</xsl:when>
<xsl:when test="//@embed='true'">
<xsl:choose>
<xsl:when test="not(//@embed='true')">
<link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico" />
<link rel="stylesheet" type="text/css">
<xsl:attribute name="href">
<xsl:value-of select="//@stylesheet" />
</xsl:attribute>
</link>
</xsl:when>
<xsl:when test="//@embed='true'">
<!--
embedded stylesheet should rather be done through URL like
"http://localhost/video/4chan%20city/3/embed=true+stylesheet=embedded.css"
embedded stylesheet should rather be done through URL like
"http://localhost/video/4chan%20city/3/embed=true+stylesheet=embedded.css"
-->
<link rel="stylesheet" type="text/css">
<xsl:attribute name="href">
/style/embedded.css
</xsl:attribute>
</link>
</xsl:when>
</xsl:choose>
<link rel="stylesheet" type="text/css">
<xsl:attribute name="href">
/style/embedded.css
</xsl:attribute>
</link>
</xsl:when>
</xsl:choose>
<xsl:if test="boolean(//results)">
<xsl:if test="boolean(//results)">
<link rel="alternate" type="application/rss+xml">
<xsl:attribute name="title">
<xsl:value-of select="$locale_strings[@id='rss_title_results_this_page']" />
</xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_root']" />
<xsl:value-of select="$site_strings[@id='path_results']" />
<xsl:value-of select="//results/@query" />
&amp;pagesize=<xsl:value-of select="//results/@pagesize" />
&amp;page=<xsl:value-of select="//results/@page" />
&#38;xslt=rss
</xsl:attribute>
</link>
<link rel="alternate" type="application/rss+xml">
<xsl:attribute name="title">
<xsl:value-of select="$locale_strings[@id='rss_title_results_this_page']" />
</xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_root']" />
<xsl:value-of select="$site_strings[@id='path_results']" />
<xsl:value-of select="//results/@query" />
&amp;pagesize=<xsl:value-of select="//results/@pagesize" />
&amp;page=<xsl:value-of select="//results/@page" />
&#38;xslt=rss
</xsl:attribute>
</link>
<link rel="alternate" type="application/rss+xml">
<xsl:attribute name="title">
<xsl:value-of select="$locale_strings[@id='rss_title_results_all_pages']" />
</xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_root']" />
<xsl:value-of select="$site_strings[@id='path_results']" />
<xsl:value-of select="//results/@query" />
&amp;pagesize=99999
&amp;page=1
&#38;xslt=rss
</xsl:attribute>
</link>
<link rel="alternate" type="application/rss+xml">
<xsl:attribute name="title">
<xsl:value-of select="$locale_strings[@id='rss_title_results_all_pages']" />
</xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_root']" />
<xsl:value-of select="$site_strings[@id='path_results']" />
<xsl:value-of select="//results/@query" />
&amp;pagesize=99999
&amp;page=1
&#38;xslt=rss
</xsl:attribute>
</link>
</xsl:if>
</xsl:if>
<link
rel="search"
type="application/opensearchdescription+xml"
>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_root']" />?xslt=opensearch
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="$site_strings[@id='site_name']" />
</xsl:attribute>
</link>
<link
rel="search"
type="application/opensearchdescription+xml"
>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_root']" />?xslt=opensearch
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="$site_strings[@id='site_name']" />
</xsl:attribute>
</link>
<title>
<xsl:choose>
<xsl:when test="boolean(//frontpage)">
<xsl:value-of select="$site_strings[@id='site_name']" />
-
<xsl:value-of select="$site_strings[@id='site_motto']" />
</xsl:when>
<xsl:when test="boolean(//resultspage)">
<xsl:value-of select="$site_strings[@id='site_name']" />
-
<xsl:value-of select="$locale_strings[@id='results_for_query']" />
"<xsl:value-of select="//resultspage/@query" />"
</xsl:when>
<xsl:otherwise>
<title>
<xsl:choose>
<xsl:when test="boolean(//frontpage)">
<xsl:value-of select="$site_strings[@id='site_name']" />
-
<xsl:value-of select="$site_strings[@id='site_motto']" />
</xsl:when>
<xsl:when test="boolean(//resultspage)">
<xsl:value-of select="$site_strings[@id='site_name']" />
-
<xsl:value-of select="$locale_strings[@id='results_for_query']" />
"<xsl:value-of select="//resultspage/@query" />"
</xsl:when>
<xsl:otherwise>
<!--
this seems to be fail
should be fixed somehow
this seems to be fail
should be fixed somehow
-->
<xsl:value-of select="$site_strings[@id='site_name']" />
-
<xsl:value-of select="$site_strings[@id='site_motto']" />
</xsl:otherwise>
</xsl:choose>
</title>
</head>
<xsl:value-of select="$site_strings[@id='site_name']" />
-
<xsl:value-of select="$site_strings[@id='site_motto']" />
</xsl:otherwise>
</xsl:choose>
</title>
</head>
<body>
<xsl:if test="not(//@embed='true')">
<body>
<xsl:if test="not(//@embed='true')">
<!--
<a href="/">
<img class="logo-header" src="/images/logo-small.png" alt="Yolanda logo top (160x25)" />
</a>
<a href="/">
<img class="logo-header" src="/images/logo-small.png" alt="Yolanda logo top (160x25)" />
</a>
-->
<div class="header">
<a class="header latest-additions">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_query_latestadditions']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='query_latestadditions']" />
</a>
<div class="header">
<a class="header latest-additions">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_query_latestadditions']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='query_latestadditions']" />
</a>
<a class="header most-views">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_query_mostviews']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='query_mostviews']" />
</a>
<a class="header most-views">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_query_mostviews']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='query_mostviews']" />
</a>
<a class="header most-downloads">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_query_mostdownloads']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='query_mostdownloads']" />
</a>
<a class="header most-downloads">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_query_mostdownloads']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='query_mostdownloads']" />
</a>
<xsl:choose>
<xsl:when test="string-length(//@username)=0">
<!--
<a class="header">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_login']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='header_login-to-upload']" />
</a>
-->
<a class="header register">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_register']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='register']" />
</a>
<a class="header login">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_login']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='login']" />
</a>
<a class="header login-openid">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_login-openid']" />
</xsl:attribute>
<img class="openid-icon" src="/images/openid-icon.png" alt="open id logo" />
<xsl:value-of select="$locale_strings[@id='login_openid']" />
</a>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="string-length(//@username)=0">
<!--
<a class="header">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_login']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='header_login-to-upload']" />
</a>
-->
<a class="header register">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_register']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='register']" />
</a>
<a class="header login">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_login']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='login']" />
</a>
<a class="header login-openid">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_login-openid']" />
</xsl:attribute>
<img class="openid-icon" src="/images/openid-icon.png" alt="open id logo" />
<xsl:value-of select="$locale_strings[@id='login_openid']" />
</a>
</xsl:when>
<xsl:otherwise>
<a class="header upload-video">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_upload']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='header_upload-video']" />
</a>
<a class="header upload-video">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_upload']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='header_upload-video']" />
</a>
<a class="header preferences">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_settings']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='settings_details']" />
</a>
<a class="header preferences">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_settings']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='settings_details']" />
</a>
<!--
<xsl:value-of select="$locale_strings[@id='logged_in_as']" />
<xsl:value-of select="$locale_strings[@id='logged_in_as']" />
<a class="header">
<xsl:attribute name="href">
user/<xsl:value-of select="//@username" />
</xsl:attribute>
<xsl:value-of select="//@username" />
</a>
<a class="header">
<xsl:attribute name="href">
user/<xsl:value-of select="//@username" />
</xsl:attribute>
<xsl:value-of select="//@username" />
</a>
-->
<a class="header logout">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_logout']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='logout']" />
</a>
<a class="header logout">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_logout']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='logout']" />
</a>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</div>
</div>
<xsl:if test="//message">
<xsl:call-template name="message"/>
</xsl:if>
<xsl:if test="//message">
<xsl:call-template name="message"/>
</xsl:if>
<xsl:if test="//search">
<xsl:call-template name="searchbar"/>
</xsl:if>
<xsl:if test="//search">
<xsl:call-template name="searchbar"/>
</xsl:if>
<xsl:if test="not(//frontpage)">
<xsl:call-template name="logo-small"/>
</xsl:if>
</xsl:if>
<xsl:if test="not(//frontpage)">
<xsl:call-template name="logo-small"/>
</xsl:if>
</xsl:if>
<xsl:choose>
<xsl:when test="//frontpage">
<xsl:call-template name="frontpage"/>
</xsl:when>
<xsl:when test="//registerform">
<xsl:call-template name="registerform"/>
</xsl:when>
<xsl:when test="//loginform">
<xsl:call-template name="loginform"/>
</xsl:when>
<xsl:when test="//uploadform">
<xsl:call-template name="uploadform"/>
</xsl:when>
<xsl:when test="//search">
<xsl:call-template name="results"/>
</xsl:when>
<xsl:when test="//advancedsearch">
<xsl:call-template name="advancedsearch"/>
</xsl:when>
<xsl:when test="//video">
<xsl:call-template name="video"/>
</xsl:when>
<xsl:when test="//settings">
<xsl:call-template name="settings"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="//frontpage">
<xsl:call-template name="frontpage"/>
</xsl:when>
<xsl:when test="//registerform">
<xsl:call-template name="registerform"/>
</xsl:when>
<xsl:when test="//loginform">
<xsl:call-template name="loginform"/>
</xsl:when>
<xsl:when test="//uploadform">
<xsl:call-template name="uploadform"/>
</xsl:when>
<xsl:when test="//search">
<xsl:call-template name="results"/>
</xsl:when>
<xsl:when test="//advancedsearch">
<xsl:call-template name="advancedsearch"/>
</xsl:when>
<xsl:when test="//video">
<xsl:call-template name="video"/>
</xsl:when>
<xsl:when test="//settings">
<xsl:call-template name="settings"/>
</xsl:when>
</xsl:choose>
<xsl:if test="not(//@embed='true')">
<xsl:if test="not(//@embed='true')">
<div class="footer">
<div class="footer">
<a class="footer view-license">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_license']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='footer_license']" />
</a>
<a class="footer view-license">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_license']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='footer_license']" />
</a>
<a class="footer view-source-code">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_source-code']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='footer_source_code']" />
</a>
<a class="footer view-source-code">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_source-code']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='footer_source_code']" />
</a>
<a class="footer report-bug">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_report_bug']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='footer_report_bug']" />
</a>
<a class="footer report-bug">
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_report_bug']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='footer_report_bug']" />
</a>
<a class="footer view-xml">
<xsl:attribute name="href">
<a class="footer view-xml">
<xsl:attribute name="href">
<!--
caveat: this currently does not work on root level
apache magic wanted
caveat: this currently does not work on root level
apache magic wanted
-->
?xslt=null
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='footer_view_xml']" />
</a>
?xslt=null
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='footer_view_xml']" />
</a>
</div>
</div>
<!--
<br />
<xsl:value-of select="$locale_strings[@id='footer_copyright']" />
<br />
<xsl:value-of select="$locale_strings[@id='footer_copyright']" />
-->
<br />
<br />
<span class="protip">
<xsl:value-of select="$locale_strings[@id='footer_warranty']" />
</span>
<span class="protip">
<xsl:value-of select="$locale_strings[@id='footer_warranty']" />
</span>
</xsl:if>
</xsl:if>
</body>
</body>
</html>
</html>
</xsl:template>
<xsl:template name="logo-small">
<!-- <a href="/">
<img class="logo-small" src="/images/logo-small.png" alt="Yolanda logo top (160x25)" />
</a>-->
<!-- <a href="/">
<img class="logo-small" src="/images/logo-small.png" alt="Yolanda logo top (160x25)" />
</a>-->
</xsl:template>
<xsl:template name="searchbar">
<div class="search-small">
<form method="get" enctype="text/plain">
<xsl:attribute name="action">
<xsl:value-of select="$site_strings[@id='path_results']" />
</xsl:attribute>
<fieldset>
<xsl:value-of select="$locale_strings[@id='search']" />:
<input type="text" name="query" size="15">
<xsl:attribute name="value">
<xsl:if test="//results/@argument='query'">
<xsl:value-of select="//results/@value" />
</xsl:if>
</xsl:attribute>
</input>
</fieldset>
</form>
</div>
<div class="search-small">
<form method="get" enctype="text/plain">
<xsl:attribute name="action">
<xsl:value-of select="$site_strings[@id='path_results']" />
</xsl:attribute>
<fieldset>
<xsl:value-of select="$locale_strings[@id='search']" />:
<input type="text" name="query" size="15">
<xsl:attribute name="value">
<xsl:if test="//results/@argument='query'">
<xsl:value-of select="//results/@value" />
</xsl:if>
</xsl:attribute>
</input>
</fieldset>
</form>
</div>
</xsl:template>
<xsl:template name="message">
<div class="messagebox">
<xsl:attribute name="id">
<xsl:value-of select="/page/message/@type" />
</xsl:attribute>
<xsl:choose>
<xsl:when test="/page/message/@type='error'">
<img src="/images/tango/dialog-error.png" />
</xsl:when>
<xsl:when test="/page/message/@type='information'">
<img src="/images/tango/dialog-information.png" />
</xsl:when>
<xsl:when test="/page/message/@type='warning'">
<img src="/images/tango/dialog-warning.png" />
</xsl:when>
</xsl:choose>
<xsl:variable name="messagetext" select="/page/message/@text" />
<xsl:value-of select="$locale_strings[@id=$messagetext]" />
<xsl:value-of select="/page/message/@value" />
<!-- probably one can do this on one line, dunno how -->
</div>
<div class="messagebox">
<xsl:attribute name="id">
<xsl:value-of select="/page/message/@type" />
</xsl:attribute>
<xsl:choose>
<xsl:when test="/page/message/@type='error'">
<img src="/images/tango/dialog-error.png" />
</xsl:when>
<xsl:when test="/page/message/@type='information'">
<img src="/images/tango/dialog-information.png" />
</xsl:when>
<xsl:when test="/page/message/@type='warning'">
<img src="/images/tango/dialog-warning.png" />
</xsl:when>
</xsl:choose>
<xsl:variable name="messagetext" select="/page/message/@text" />
<xsl:value-of select="$locale_strings[@id=$messagetext]" />
<xsl:value-of select="/page/message/@value" />
<!-- probably one can do this on one line, dunno how -->
</div>
</xsl:template>
<xsl:template name="tagcloud">
<xsl:variable name="max" select="//tagcloud/tag/count[not(//tagcloud/tag/count &gt; .)]" />
<xsl:variable name="min" select="//tagcloud/tag/count[not(//tagcloud/tag/count &lt; .)]" />
<div class="tagcloud">
<xsl:for-each select="//tagcloud/tag">
<xsl:sort select="text" order="ascending" data-type="text" />
<a class="tag">
<xsl:attribute name="style">
<xsl:variable name="max" select="//tagcloud/tag/count[not(//tagcloud/tag/count &gt; .)]" />
<xsl:variable name="min" select="//tagcloud/tag/count[not(//tagcloud/tag/count &lt; .)]" />
<div class="tagcloud">
<xsl:for-each select="//tagcloud/tag">
<xsl:sort select="text" order="ascending" data-type="text" />
<a class="tag">
<xsl:attribute name="style">
<!--
scale *should* be logarihmic, but that's not widely supportet
scale *should* be logarihmic, but that's not widely supportet
-->
font-size:<xsl:value-of select="round((32-12)*(number(count)-number($min))div (number($max)-number($min)))+12" />px
</xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_results']" />
tag:
<xsl:value-of select="text" />
</xsl:attribute>
<xsl:value-of select="text" />
font-size:<xsl:value-of select="round((32-12)*(number(count)-number($min))div (number($max)-number($min)))+12" />px
</xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_results']" />
tag:
<xsl:value-of select="text" />
</xsl:attribute>
<xsl:value-of select="text" />
<!--
unnecessary, except for debug purposes
(<xsl:value-of select="count" />)
unnecessary, except for debug purposes
(<xsl:value-of select="count" />)
-->
</a>
&#8204;
</xsl:for-each>
</div>
</a>
&#8204;
</xsl:for-each>
</div>
</xsl:template>

View file

@ -1,10 +1,10 @@
<?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#"
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="advancedsearch">

View file

@ -1,66 +1,66 @@
<?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#"
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="frontpage">
<img class="logo-big" src="/images/logo-big.png" alt="Yolanda logo (320x100)" />
<img class="logo-big" src="/images/logo-big.png" alt="Yolanda logo (320x100)" />
<div class="search">
<form method="get" enctype="text/plain">
<xsl:attribute name="action">
<xsl:value-of select="$site_strings[@id='path_results']" />
</xsl:attribute>
<fieldset>
<input type="text" name="query" size="40" /><br />
<input type="submit">
<xsl:attribute name="value">
<xsl:value-of select="$locale_strings[@id='button_find']" />
</xsl:attribute>
</input>
<input type="submit" name="lucky">
<xsl:attribute name="value">
<xsl:value-of select="$locale_strings[@id='button_lucky']" />
</xsl:attribute>
</input>
<input type="submit" name="advanced">
<xsl:attribute name="value">
<xsl:value-of select="$locale_strings[@id='button_advanced']" />
</xsl:attribute>
</input>
</fieldset>
</form>
</div>
<div class="search">
<form method="get" enctype="text/plain">
<xsl:attribute name="action">
<xsl:value-of select="$site_strings[@id='path_results']" />
</xsl:attribute>
<fieldset>
<input type="text" name="query" size="40" /><br />
<input type="submit">
<xsl:attribute name="value">
<xsl:value-of select="$locale_strings[@id='button_find']" />
</xsl:attribute>
</input>
<input type="submit" name="lucky">
<xsl:attribute name="value">
<xsl:value-of select="$locale_strings[@id='button_lucky']" />
</xsl:attribute>
</input>
<input type="submit" name="advanced">
<xsl:attribute name="value">
<xsl:value-of select="$locale_strings[@id='button_advanced']" />
</xsl:attribute>
</input>
</fieldset>
</form>
</div>
<div class="toplists">
<a>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_query_latestadditions']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='query_latestadditions']" />
</a>
<xsl:value-of select="$locale_strings[@id='separator']" />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_query_mostdownloads']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='query_mostdownloads']" />
</a>
<xsl:value-of select="$locale_strings[@id='separator']" />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_query_mostviews']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='query_mostviews']" />
</a>
</div>
<div class="toplists">
<a>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_query_latestadditions']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='query_latestadditions']" />
</a>
<xsl:value-of select="$locale_strings[@id='separator']" />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_query_mostdownloads']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='query_mostdownloads']" />
</a>
<xsl:value-of select="$locale_strings[@id='separator']" />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_query_mostviews']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='query_mostviews']" />
</a>
</div>
<xsl:call-template name="tagcloud"/>
<xsl:call-template name="tagcloud"/>
</xsl:template>

View file

@ -1,75 +1,75 @@
<?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#"
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="loginform">
<div class="loginform">
<xsl:choose>
<xsl:when test="//loginform/@action='openid'">
<form method="post">
<xsl:attribute name="action">
<xsl:value-of select="$site_strings[@id='path_login']" />
</xsl:attribute>
<fieldset>
<input name="action" type="hidden" value="openid" />
OpenID:
<br />
<input name="user" type="text" style="background: url(http://stat.livejournal.com/img/openid-inputicon.gif) no-repeat; background-color: #fff; background-position: 0 50%; padding-left: 18px;" />
<br />
e.g. http://username.myopenid.com
<br />
<input type="submit" name="login" >
<xsl:attribute name="value">
<xsl:value-of select="$locale_strings[@id='button_login']" />
</xsl:attribute>
</input>
<br />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_login']" />
</xsl:attribute>
login with normal account
</a>
</fieldset>
</form>
</xsl:when>
<xsl:otherwise>
<form method="post">
<xsl:attribute name="action">
<xsl:value-of select="$site_strings[@id='path_login']" />
</xsl:attribute>
<fieldset>
<input name="action" type="hidden" value="login" />
<xsl:value-of select="$locale_strings[@id='username']" />:
<br />
<input name="user" type="text" size="30" maxlength="30" />
<br />
<xsl:value-of select="$locale_strings[@id='password']" />:
<br />
<input name="pass" type="password" size="30" maxlength="30" />
<br />
<input type="submit" name="login" >
<xsl:attribute name="value">
<xsl:value-of select="$locale_strings[@id='button_login']" />
</xsl:attribute>
</input>
<br />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_login-openid']" />
</xsl:attribute>
login with openid
</a>
</fieldset>
</form>
</xsl:otherwise>
</xsl:choose>
</div>
<div class="loginform">
<xsl:choose>
<xsl:when test="//loginform/@action='openid'">
<form method="post">
<xsl:attribute name="action">
<xsl:value-of select="$site_strings[@id='path_login']" />
</xsl:attribute>
<fieldset>
<input name="action" type="hidden" value="openid" />
OpenID:
<br />
<input name="user" type="text" style="background: url(http://stat.livejournal.com/img/openid-inputicon.gif) no-repeat; background-color: #fff; background-position: 0 50%; padding-left: 18px;" />
<br />
e.g. http://username.myopenid.com
<br />
<input type="submit" name="login" >
<xsl:attribute name="value">
<xsl:value-of select="$locale_strings[@id='button_login']" />
</xsl:attribute>
</input>
<br />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_login']" />
</xsl:attribute>
login with normal account
</a>
</fieldset>
</form>
</xsl:when>
<xsl:otherwise>
<form method="post">
<xsl:attribute name="action">
<xsl:value-of select="$site_strings[@id='path_login']" />
</xsl:attribute>
<fieldset>
<input name="action" type="hidden" value="login" />
<xsl:value-of select="$locale_strings[@id='username']" />:
<br />
<input name="user" type="text" size="30" maxlength="30" />
<br />
<xsl:value-of select="$locale_strings[@id='password']" />:
<br />
<input name="pass" type="password" size="30" maxlength="30" />
<br />
<input type="submit" name="login" >
<xsl:attribute name="value">
<xsl:value-of select="$locale_strings[@id='button_login']" />
</xsl:attribute>
</input>
<br />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$site_strings[@id='path_login-openid']" />
</xsl:attribute>
login with openid
</a>
</fieldset>
</form>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:template>

View file

@ -1,41 +1,41 @@
<?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#"
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="registerform">
<div class="registerform">
<div class="registerform">
<form method="post">
<xsl:attribute name="action">
<xsl:value-of select="$site_strings[@id='path_register']" />
</xsl:attribute>
<fieldset>
<xsl:value-of select="$locale_strings[@id='username']" />:
<br />
<input name="user" type="text" size="30" maxlength="30" />
<br />
<xsl:value-of select="$locale_strings[@id='password']" />:
<br />
<input name="pass" type="password" size="30" maxlength="30" />
<br />
<xsl:value-of select="$locale_strings[@id='password_repeat']" />:
<br />
<input name="pass_repeat" type="password" size="30" maxlength="30" />
<br />
<input type="submit" name="register" >
<xsl:attribute name="value">
<xsl:value-of select="$locale_strings[@id='button_register']" />
</xsl:attribute>
</input>
</fieldset>
</form>
</div>
<form method="post">
<xsl:attribute name="action">
<xsl:value-of select="$site_strings[@id='path_register']" />
</xsl:attribute>
<fieldset>
<xsl:value-of select="$locale_strings[@id='username']" />:
<br />
<input name="user" type="text" size="30" maxlength="30" />
<br />
<xsl:value-of select="$locale_strings[@id='password']" />:
<br />
<input name="pass" type="password" size="30" maxlength="30" />
<br />
<xsl:value-of select="$locale_strings[@id='password_repeat']" />:
<br />
<input name="pass_repeat" type="password" size="30" maxlength="30" />
<br />
<input type="submit" name="register" >
<xsl:attribute name="value">
<xsl:value-of select="$locale_strings[@id='button_register']" />
</xsl:attribute>
</input>
</fieldset>
</form>
</div>
</xsl:template>
</xsl:stylesheet>

View file

@ -1,135 +1,135 @@
<?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#"
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="innerresults">
<xsl:for-each select="//results/result">
<div class="result">
<a>
<xsl:attribute name="href">
<xsl:value-of select="rdf:RDF/cc:Work/dc:identifier" />
</xsl:attribute>
<img>
<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:attribute>
</img>
</a>
<br />
<a>
<xsl:attribute name="href">
<xsl:value-of select="rdf:RDF/cc:Work/dc:identifier" />
</xsl:attribute>
<xsl:value-of select="rdf:RDF/cc:Work/dc:title" />
</a>
<br />
<xsl:variable name="hours" select="floor(@duration div 3600)" />
<xsl:variable name="minutes" select="floor((@duration - $hours*3600) div 60)" />
<xsl:variable name="seconds" select="@duration - $minutes*60 - $hours*3600" />
<xsl:choose>
<xsl:when test="$hours=0">
(<xsl:value-of select="concat(format-number($minutes, '00'), ':', format-number($seconds, '00'))" />)
</xsl:when>
<xsl:otherwise>
(<xsl:value-of select="concat($hours, ':', format-number($minutes, '00'), ':', format-number($seconds, '00'))" />)
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:for-each>
<xsl:for-each select="//results/result">
<div class="result">
<a>
<xsl:attribute name="href">
<xsl:value-of select="rdf:RDF/cc:Work/dc:identifier" />
</xsl:attribute>
<img>
<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:attribute>
</img>
</a>
<br />
<a>
<xsl:attribute name="href">
<xsl:value-of select="rdf:RDF/cc:Work/dc:identifier" />
</xsl:attribute>
<xsl:value-of select="rdf:RDF/cc:Work/dc:title" />
</a>
<br />
<xsl:variable name="hours" select="floor(@duration div 3600)" />
<xsl:variable name="minutes" select="floor((@duration - $hours*3600) div 60)" />
<xsl:variable name="seconds" select="@duration - $minutes*60 - $hours*3600" />
<xsl:choose>
<xsl:when test="$hours=0">
(<xsl:value-of select="concat(format-number($minutes, '00'), ':', format-number($seconds, '00'))" />)
</xsl:when>
<xsl:otherwise>
(<xsl:value-of select="concat($hours, ':', format-number($minutes, '00'), ':', format-number($seconds, '00'))" />)
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:for-each>
</xsl:template>
<xsl:template name="results">
<div>
<span class="heading">
<xsl:value-of select="$locale_strings[@id='results_heading_1']" />&#160;
<xsl:value-of select="//results/@pagesize * (//results/@currentpage - 1) + 1" />&#160;
<xsl:value-of select="$locale_strings[@id='results_heading_2']" />&#160;
<xsl:choose>
<xsl:when test="(//results/@pagesize * //results/@currentpage) &lt; //results/@resultcount">
<xsl:value-of select="//results/@pagesize * //results/@currentpage" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//results/@resultcount" />
</xsl:otherwise>
</xsl:choose>&#160;
<xsl:value-of select="$locale_strings[@id='results_heading_3']" />&#160;
<xsl:value-of select="//results/@resultcount" />&#160;
<xsl:value-of select="$locale_strings[@id='results_heading_4']" />
</span>
</div>
<div>
<span class="heading">
<xsl:value-of select="$locale_strings[@id='results_heading_1']" />&#160;
<xsl:value-of select="//results/@pagesize * (//results/@currentpage - 1) + 1" />&#160;
<xsl:value-of select="$locale_strings[@id='results_heading_2']" />&#160;
<xsl:choose>
<xsl:when test="(//results/@pagesize * //results/@currentpage) &lt; //results/@resultcount">
<xsl:value-of select="//results/@pagesize * //results/@currentpage" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//results/@resultcount" />
</xsl:otherwise>
</xsl:choose>&#160;
<xsl:value-of select="$locale_strings[@id='results_heading_3']" />&#160;
<xsl:value-of select="//results/@resultcount" />&#160;
<xsl:value-of select="$locale_strings[@id='results_heading_4']" />
</span>
</div>
<xsl:call-template name="innerresults"/>
<xsl:call-template name="innerresults"/>
<xsl:if test="//results/@lastpage &gt; 1">
<xsl:call-template name="pagination-arrows"/>
</xsl:if>
<xsl:if test="//results/@lastpage &gt; 1">
<xsl:call-template name="pagination-arrows"/>
</xsl:if>
</xsl:template>
<xsl:template name="pagination-arrows">
<xsl:variable name="query_string" select="concat($site_strings[@id='path_results'], //results/@query, '&amp;pagesize=', //results/@pagesize)" />
<div>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat($query_string, '&amp;page=1')" />
</xsl:attribute>
<xsl:if test="//results/@currentpage&lt;=1">
<xsl:attribute name="style">
visibility: hidden;
</xsl:attribute>
</xsl:if>
<img src="./images/tango/go-first.png" />
</a>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat($query_string, '&amp;page=', //results/@currentpage - 1)" />
</xsl:attribute>
<xsl:if test="//results/@currentpage&lt;=1">
<xsl:attribute name="style">
visibility: hidden;
</xsl:attribute>
</xsl:if>
<img src="./images/tango/go-previous.png" />
</a>
<xsl:variable name="query_string" select="concat($site_strings[@id='path_results'], //results/@query, '&amp;pagesize=', //results/@pagesize)" />
<div>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat($query_string, '&amp;page=1')" />
</xsl:attribute>
<xsl:if test="//results/@currentpage&lt;=1">
<xsl:attribute name="style">
visibility: hidden;
</xsl:attribute>
</xsl:if>
<img src="./images/tango/go-first.png" />
</a>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat($query_string, '&amp;page=', //results/@currentpage - 1)" />
</xsl:attribute>
<xsl:if test="//results/@currentpage&lt;=1">
<xsl:attribute name="style">
visibility: hidden;
</xsl:attribute>
</xsl:if>
<img src="./images/tango/go-previous.png" />
</a>
<div class="page-number">
<xsl:value-of select="//results/@currentpage" />
</div>
<div class="page-number">
<xsl:value-of select="//results/@currentpage" />
</div>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat($query_string, '&amp;page=', //results/@currentpage + 1)" />
</xsl:attribute>
<xsl:if test="//results/@lastpage&lt;=//results/@currentpage">
<xsl:attribute name="style">
visibility: hidden;
</xsl:attribute>
</xsl:if>
<img src="./images/tango/go-next.png" />
</a>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat($query_string, '&amp;page=', //results/@lastpage)" />
</xsl:attribute>
<xsl:if test="//results/@lastpage&lt;=//results/@currentpage">
<xsl:attribute name="style">
visibility: hidden;
</xsl:attribute>
</xsl:if>
<img src="./images/tango/go-last.png" />
</a>
</div>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat($query_string, '&amp;page=', //results/@currentpage + 1)" />
</xsl:attribute>
<xsl:if test="//results/@lastpage&lt;=//results/@currentpage">
<xsl:attribute name="style">
visibility: hidden;
</xsl:attribute>
</xsl:if>
<img src="./images/tango/go-next.png" />
</a>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat($query_string, '&amp;page=', //results/@lastpage)" />
</xsl:attribute>
<xsl:if test="//results/@lastpage&lt;=//results/@currentpage">
<xsl:attribute name="style">
visibility: hidden;
</xsl:attribute>
</xsl:if>
<img src="./images/tango/go-last.png" />
</a>
</div>
</xsl:template>
</xsl:stylesheet>

View file

@ -1,89 +1,89 @@
<?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#"
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="settings">
<div class="settingsform">
<div class="settingsform">
<span class="heading">
<xsl:value-of select="$locale_strings[@id='settings_heading']" />
</span>
<span class="heading">
<xsl:value-of select="$locale_strings[@id='settings_heading']" />
</span>
<form method="POST">
<xsl:attribute name="action">
<xsl:value-of select="$site_strings[@id='path_settings']" />
</xsl:attribute>
<form method="POST">
<xsl:attribute name="action">
<xsl:value-of select="$site_strings[@id='path_settings']" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='settings_instruction_locale']" />
<br />
<xsl:value-of select="$locale_strings[@id='settings_instruction_locale']" />
<br />
<select name="locale" size="2">
<select name="locale" size="2">
<option value="en-us">
<xsl:if test="//settings/@locale='en-us'">
<xsl:attribute name="selected">
selected
</xsl:attribute>
</xsl:if>
<xsl:value-of select="$locale_strings[@id='language_en-us']" />
</option>
<option value="en-us">
<xsl:if test="//settings/@locale='en-us'">
<xsl:attribute name="selected">
selected
</xsl:attribute>
</xsl:if>
<xsl:value-of select="$locale_strings[@id='language_en-us']" />
</option>
<option value="de-de">
<xsl:if test="//settings/@locale='de-de'">
<xsl:attribute name="selected">
selected
</xsl:attribute>
</xsl:if>
<xsl:value-of select="$locale_strings[@id='language_de-de']" />
</option>
<option value="de-de">
<xsl:if test="//settings/@locale='de-de'">
<xsl:attribute name="selected">
selected
</xsl:attribute>
</xsl:if>
<xsl:value-of select="$locale_strings[@id='language_de-de']" />
</option>
</select>
<br />
</select>
<br />
<xsl:value-of select="$locale_strings[@id='settings_instruction_pagesize']" />
<br />
<xsl:value-of select="$locale_strings[@id='settings_instruction_pagesize']" />
<br />
<input name="pagesize" type="text" size="7">
<xsl:attribute name="value">
<xsl:value-of select="//settings/@pagesize" />
</xsl:attribute>
</input>
<br />
<input name="pagesize" type="text" size="7">
<xsl:attribute name="value">
<xsl:value-of select="//settings/@pagesize" />
</xsl:attribute>
</input>
<br />
<xsl:value-of select="$locale_strings[@id='settings_instruction_method']" />
<br />
<xsl:value-of select="$locale_strings[@id='settings_instruction_method']" />
<br />
<input type="radio" name="cortado" value="true">
<xsl:if test="//settings/@cortado='true'">
<xsl:attribute name="checked">
checked
</xsl:attribute>
</xsl:if>
</input>
<input type="radio" name="cortado" value="true">
<xsl:if test="//settings/@cortado='true'">
<xsl:attribute name="checked">
checked
</xsl:attribute>
</xsl:if>
</input>
<xsl:value-of select="$locale_strings[@id='watch_cortadoapplet']" />
<br />
<input type="radio" name="cortado" value="false">
<xsl:if test="//settings/@cortado='false'">
<xsl:attribute name="checked">
checked
</xsl:attribute>
</xsl:if>
</input>
<xsl:value-of select="$locale_strings[@id='watch_cortadoapplet']" />
<br />
<input type="radio" name="cortado" value="false">
<xsl:if test="//settings/@cortado='false'">
<xsl:attribute name="checked">
checked
</xsl:attribute>
</xsl:if>
</input>
<xsl:value-of select="$locale_strings[@id='watch_browserplugin']" />
<br />
<input name="submit" type="submit" />
<xsl:value-of select="$locale_strings[@id='watch_browserplugin']" />
<br />
<input name="submit" type="submit" />
</form>
</form>
</div>
</div>
</xsl:template>

File diff suppressed because it is too large Load diff

View file

@ -1,409 +1,409 @@
<?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#"
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">
<xsl:if test="not(//@embed='true')">
<div class="videotitle">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:title" />
<xsl:variable name="hours" select="floor(//video/@duration div 3600)" />
<xsl:variable name="minutes" select="floor((//video/@duration - $hours*3600) div 60)" />
<xsl:variable name="seconds" select="//video/@duration - $minutes*60 - $hours*3600" />
<xsl:choose>
<xsl:when test="$hours=0">
(<xsl:value-of select="concat(format-number($minutes, '00'), ':', format-number($seconds, '00'))" />)
</xsl:when>
<xsl:otherwise>
(<xsl:value-of select="concat($hours, ':', format-number($minutes, '00'), ':', format-number($seconds, '00'))" />)
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:if>
<xsl:if test="not(//@embed='true')">
<div class="videotitle">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:title" />
<xsl:variable name="hours" select="floor(//video/@duration div 3600)" />
<xsl:variable name="minutes" select="floor((//video/@duration - $hours*3600) div 60)" />
<xsl:variable name="seconds" select="//video/@duration - $minutes*60 - $hours*3600" />
<xsl:choose>
<xsl:when test="$hours=0">
(<xsl:value-of select="concat(format-number($minutes, '00'), ':', format-number($seconds, '00'))" />)
</xsl:when>
<xsl:otherwise>
(<xsl:value-of select="concat($hours, ':', format-number($minutes, '00'), ':', format-number($seconds, '00'))" />)
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:if>
<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 class="watch-browserplugin">
<a>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="//@embed='true'">
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/dc:identifier, 'cortado=false&amp;embed=true')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/dc:identifier, 'cortado=false')" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='watch_browserplugin']" />
</a>
</div>
</xsl:when>
<xsl:otherwise>
<object type="application/ogg">
<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>
<img src="/images/flash-sucks.png"/><br />
<img src="/images/vlc.png"/>
<img src="/images/mplayer.png"/>
</object>
<div class="watch-cortadoapplet">
<a>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="//@embed='true'">
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/dc:identifier, 'cortado=true&amp;embed=true')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/dc:identifier, 'cortado=true')" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='watch_cortadoapplet']" />
</a>
</div>
</xsl:otherwise>
</xsl:choose>
</div>
<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 class="watch-browserplugin">
<a>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="//@embed='true'">
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/dc:identifier, 'cortado=false&amp;embed=true')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/dc:identifier, 'cortado=false')" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='watch_browserplugin']" />
</a>
</div>
</xsl:when>
<xsl:otherwise>
<object type="application/ogg">
<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>
<img src="/images/flash-sucks.png"/><br />
<img src="/images/vlc.png"/>
<img src="/images/mplayer.png"/>
</object>
<div class="watch-cortadoapplet">
<a>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="//@embed='true'">
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/dc:identifier, 'cortado=true&amp;embed=true')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(//video/rdf:RDF/cc:Work/dc:identifier, 'cortado=true')" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='watch_cortadoapplet']" />
</a>
</div>
</xsl:otherwise>
</xsl:choose>
</div>
<xsl:if test="//@embed='true'">
<div class="embedded-backlink">
<a target="_blank">
<xsl:attribute name="href">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:identifier" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='backlink']" />
</a>
</div>
</xsl:if>
<xsl:if test="//@embed='true'">
<div class="embedded-backlink">
<a target="_blank">
<xsl:attribute name="href">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:identifier" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='backlink']" />
</a>
</div>
</xsl:if>
<xsl:if test="not(//@embed='true')">
<xsl:if test="not(//@embed='true')">
<xsl:call-template name="videometadata"/>
<br />
<xsl:call-template name="videometadata"/>
<br />
<div class="button-download">
<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>
<br />
<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>
<br />
(<xsl:value-of select="format-number(number(round(//video/@filesize) div 1048576), '0.0#')" />&#160;<xsl:value-of select="$locale_strings[@id='megabytes']" />)
</div>
<div class="button-download">
<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>
<br />
<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>
<br />
(<xsl:value-of select="format-number(number(round(//video/@filesize) div 1048576), '0.0#')" />&#160;<xsl:value-of select="$locale_strings[@id='megabytes']" />)
</div>
<!--
not implemented right now
<div class="button-junk">
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat(//rdf:RDF/cc:Work/dc:identifier, 'action=junk')" />
</xsl:attribute>
<img src="/images/tango/mail-mark-junk.png" />
</a>
<br />
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat(//rdf:RDF/cc:Work/dc:identifier, 'action=junk')" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='junk_video']" />
</a>
</div>
<div class="button-junk">
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat(//rdf:RDF/cc:Work/dc:identifier, 'action=junk')" />
</xsl:attribute>
<img src="/images/tango/mail-mark-junk.png" />
</a>
<br />
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat(//rdf:RDF/cc:Work/dc:identifier, 'action=junk')" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='junk_video']" />
</a>
</div>
<div class="button-edit">
<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" />
</a>
<br />
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat(//rdf:RDF/cc:Work/dc:identifier, 'action=edit')" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='edit_video']" />
</a>
</xsl:if>
</div>
<div class="button-edit">
<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" />
</a>
<br />
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat(//rdf:RDF/cc:Work/dc:identifier, 'action=edit')" />
</xsl:attribute>
<xsl:value-of select="$locale_strings[@id='edit_video']" />
</a>
</xsl:if>
</div>
-->
<xsl:call-template name="cclicense"/>
<xsl:call-template name="cclicense"/>
<div class="videostuff">
<span class="protip-embed">
<xsl:value-of select="$locale_strings[@id='protip_embed']" />
<br />
<span class="code">
&lt;object data="<xsl:value-of select="concat(//rdf:RDF/cc:Work/dc:identifier, 'embed=true')" />"
type="application/xml"
width=<xsl:value-of select="//video/@width + 24" />
height=<xsl:value-of select="//video/@height + 48" />
/&gt;
</span>
</span>
</div>
<div class="videostuff">
<span class="protip-embed">
<xsl:value-of select="$locale_strings[@id='protip_embed']" />
<br />
<span class="code">
&lt;object data="<xsl:value-of select="concat(//rdf:RDF/cc:Work/dc:identifier, 'embed=true')" />"
type="application/xml"
width=<xsl:value-of select="//video/@width + 24" />
height=<xsl:value-of select="//video/@height + 48" />
/&gt;
</span>
</span>
</div>
<xsl:call-template name="commentform"/>
<xsl:call-template name="comments"/>
</xsl:if>
<xsl:call-template name="commentform"/>
<xsl:call-template name="comments"/>
</xsl:if>
</xsl:template>
<xsl:template name="comments">
<div class="comments">
<xsl:for-each select="//comments/comment">
<div class="comment">
<a>
<xsl:attribute name="href">
/user/<xsl:value-of select="@username" />
</xsl:attribute>
<xsl:value-of select="@username" />
</a>:
<br />
<xsl:value-of select="." />
</div>
</xsl:for-each>
</div>
<div class="comments">
<xsl:for-each select="//comments/comment">
<div class="comment">
<a>
<xsl:attribute name="href">
/user/<xsl:value-of select="@username" />
</xsl:attribute>
<xsl:value-of select="@username" />
</a>:
<br />
<xsl:value-of select="." />
</div>
</xsl:for-each>
</div>
</xsl:template>
<xsl:template name="commentform">
<xsl:choose>
<xsl:when 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:when>
<xsl:otherwise>
<div class="commentform">
<span class="protip">
<xsl:value-of select="$locale_strings[@id='login_to_comment']" />
</span>
</div>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when 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:when>
<xsl:otherwise>
<div class="commentform">
<span class="protip">
<xsl:value-of select="$locale_strings[@id='login_to_comment']" />
</span>
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="cclicense">
<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>
<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" />
</xsl:if>
unfinished bizness
<xsl:value-of select="@rdf:about" />
<xsl:if test="true()">
<img src="./images/cc/somerights.png" />
</xsl:if>
-->
<xsl:for-each select="//video/rdf:RDF/cc:License/cc:permits">
<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>
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>
<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>
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>
</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>
</xsl:template>
<xsl:template name="videometadata">
<div class="video-metadata">
<div class="video-metadata">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:description" />
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:description" />
<hr />
<hr />
<table class="metadata">
<table class="metadata">
<tr>
<td class="metadata-title">
<xsl:value-of select="$locale_strings[@id='DC.Creator']" />:
</td>
<td class="metadata-content">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:creator" />
</td>
</tr>
<tr>
<td class="metadata-title">
<xsl:value-of select="$locale_strings[@id='DC.Creator']" />:
</td>
<td class="metadata-content">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:creator" />
</td>
</tr>
<!--
dc:contributor is not in upload interface
dc:contributor is not in upload interface
<tr>
<td class="metadata-title">
<xsl:value-of select="$locale_strings[@id='DC.Contributor']" />:
</td>
<td class="metadata-content">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:contributor" />
</td>
</tr>
<tr>
<td class="metadata-title">
<xsl:value-of select="$locale_strings[@id='DC.Contributor']" />:
</td>
<td class="metadata-content">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:contributor" />
</td>
</tr>
-->
<tr>
<td class="metadata-title">
<xsl:value-of select="$locale_strings[@id='DC.Coverage']" />:
</td>
<td class="metadata-content">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:coverage" />
</td>
</tr>
<tr>
<td class="metadata-title">
<xsl:value-of select="$locale_strings[@id='DC.Coverage']" />:
</td>
<td class="metadata-content">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:coverage" />
</td>
</tr>
<tr>
<td class="metadata-title">
<xsl:value-of select="$locale_strings[@id='DC.Rights']" />:
</td>
<td class="metadata-content">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:rights" />
</td>
</tr>
<tr>
<td class="metadata-title">
<xsl:value-of select="$locale_strings[@id='DC.Rights']" />:
</td>
<td class="metadata-content">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:rights" />
</td>
</tr>
</table>
</table>
<hr />
<hr />
<table class="metadata">
<table class="metadata">
<tr>
<td class="metadata-title">
<xsl:value-of select="$locale_strings[@id='DC.Publisher']" />:
</td>
<td class="metadata-content">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:publisher" />
</td>
</tr>
<tr>
<td class="metadata-title">
<xsl:value-of select="$locale_strings[@id='DC.Publisher']" />:
</td>
<td class="metadata-content">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:publisher" />
</td>
</tr>
<tr>
<td class="metadata-title">
<xsl:value-of select="$locale_strings[@id='DC.Date']" />:
</td>
<td class="metadata-content">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:date" />
</td>
</tr>
<tr>
<td class="metadata-title">
<xsl:value-of select="$locale_strings[@id='DC.Date']" />:
</td>
<td class="metadata-content">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:date" />
</td>
</tr>
<tr>
<td class="metadata-title">
<xsl:value-of select="$locale_strings[@id='DC.Source']" />:
</td>
<td class="metadata-content">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:source" />
</td>
</tr>
<tr>
<td class="metadata-title">
<xsl:value-of select="$locale_strings[@id='DC.Source']" />:
</td>
<td class="metadata-content">
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:source" />
</td>
</tr>
</table>
</div>
</table>
</div>
</xsl:template>

View file

@ -1,52 +1,52 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns="http://xspf.org/ns/0/"
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#"
xmlns="http://xspf.org/ns/0/"
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:output
encoding="utf8"
indent="yes"
method="xml"
media-type="application/xml"
omit-xml-declaration="no"
encoding="utf8"
indent="yes"
method="xml"
media-type="application/xml"
omit-xml-declaration="no"
/>
<xsl:template match="/">
<xsl:apply-templates />
<xsl:apply-templates />
</xsl:template>
<xsl:template match="results">
<playlist version="0">
<trackList>
<xsl:for-each select="result">
<track>
<location>
<xsl:value-of select="rdf:RDF/cc:Work/@rdf:about" />
</location>
<title>
<xsl:value-of select="rdf:RDF/cc:Work/dc:title" />
</title>
<creator>
<xsl:value-of select="rdf:RDF/cc:Work/dc:creator" />
</creator>
<annotation>
<xsl:value-of select="rdf:RDF/cc:Work/dc:description" />
</annotation>
<info>
<xsl:value-of select="rdf:RDF/cc:Work/dc:identifier" />
</info>
<image>
<xsl:value-of select="thumbnail" />
</image>
</track>
</xsl:for-each>
</trackList>
</playlist>
<playlist version="0">
<trackList>
<xsl:for-each select="result">
<track>
<location>
<xsl:value-of select="rdf:RDF/cc:Work/@rdf:about" />
</location>
<title>
<xsl:value-of select="rdf:RDF/cc:Work/dc:title" />
</title>
<creator>
<xsl:value-of select="rdf:RDF/cc:Work/dc:creator" />
</creator>
<annotation>
<xsl:value-of select="rdf:RDF/cc:Work/dc:description" />
</annotation>
<info>
<xsl:value-of select="rdf:RDF/cc:Work/dc:identifier" />
</info>
<image>
<xsl:value-of select="thumbnail" />
</image>
</track>
</xsl:for-each>
</trackList>
</playlist>
</xsl:template>