2007-11-22 05:21:17 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<xsl:stylesheet version="1.0"
|
2008-02-14 22:23:25 +00:00
|
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
|
|
xmlns:cc="http://web.resource.org/cc/"
|
2008-04-29 13:29:53 +00:00
|
|
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
2008-02-14 22:23:25 +00:00
|
|
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
2008-04-29 13:29:53 +00:00
|
|
|
xmlns:xforms="http://www.w3.org/2002/xforms"
|
|
|
|
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
2007-11-22 05:21:17 +00:00
|
|
|
>
|
|
|
|
<xsl:template name="uploadform">
|
2008-02-14 22:23:25 +00:00
|
|
|
|
2008-05-02 07:38:43 +00:00
|
|
|
<form method="post">
|
2008-04-30 07:12:42 +00:00
|
|
|
|
2008-05-02 07:38:43 +00:00
|
|
|
<xsl:attribute name="action">
|
|
|
|
<xsl:value-of select="$site_strings[@id='path_upload']" />
|
|
|
|
</xsl:attribute>
|
2008-04-30 07:12:42 +00:00
|
|
|
|
2008-05-02 07:38:43 +00:00
|
|
|
<fieldset>
|
2008-05-11 03:09:53 +00:00
|
|
|
|
|
|
|
<legend>
|
|
|
|
<xsl:value-of select="$lang_strings[@id='fieldset_upload']" />
|
|
|
|
</legend>
|
|
|
|
|
|
|
|
<ol>
|
2008-04-30 07:12:42 +00:00
|
|
|
|
2008-05-02 07:38:43 +00:00
|
|
|
<xsl:for-each select="/page/xforms:instance/*/*">
|
2008-04-30 06:42:09 +00:00
|
|
|
|
2008-05-11 03:09:53 +00:00
|
|
|
<li>
|
|
|
|
<label>
|
|
|
|
<xsl:attribute name="for">
|
|
|
|
<xsl:value-of select="name()"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:value-of select="name()"/>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
<xsl:choose>
|
|
|
|
|
|
|
|
<xsl:when test="@xsi:type='xsd:base64Binary'">
|
|
|
|
<input type="file">
|
|
|
|
<xsl:attribute name="id">
|
2008-05-02 07:38:43 +00:00
|
|
|
<xsl:value-of select="name()"/>
|
2008-05-11 03:09:53 +00:00
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:attribute name="name">
|
|
|
|
<xsl:value-of select="name()"/>
|
|
|
|
</xsl:attribute>
|
2008-05-02 07:38:43 +00:00
|
|
|
|
2008-05-11 03:09:53 +00:00
|
|
|
</input>
|
|
|
|
</xsl:when>
|
2008-05-02 07:38:43 +00:00
|
|
|
|
2008-05-11 03:09:53 +00:00
|
|
|
<xsl:when test="@xsi:type='xsd:normalizedString'">
|
|
|
|
<input type="text">
|
|
|
|
<xsl:attribute name="id">
|
|
|
|
<xsl:value-of select="name()"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:attribute name="name">
|
|
|
|
<xsl:value-of select="name()"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
</input>
|
|
|
|
</xsl:when>
|
2008-05-02 07:38:43 +00:00
|
|
|
|
2008-05-11 03:09:53 +00:00
|
|
|
<xsl:when test="@xsi:type='xsd:string'">
|
|
|
|
<textarea>
|
|
|
|
<xsl:attribute name="id">
|
|
|
|
<xsl:value-of select="name()"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:attribute name="name">
|
|
|
|
<xsl:value-of select="name()"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
</textarea>
|
|
|
|
</xsl:when>
|
2008-05-02 07:38:43 +00:00
|
|
|
|
2008-05-11 03:09:53 +00:00
|
|
|
<xsl:when test="@xsi:type='xsd:date'">
|
|
|
|
<select>
|
|
|
|
<xsl:attribute name="id">
|
|
|
|
<xsl:value-of select="name()"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:attribute name="name">
|
|
|
|
<xsl:value-of select="name()"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
<option>
|
|
|
|
<xsl:value-of select="$lang_strings[@id='unit_day']"/>
|
|
|
|
</option>
|
|
|
|
<xsl:call-template name="for-loop">
|
|
|
|
<xsl:with-param name="start">1</xsl:with-param>
|
|
|
|
<xsl:with-param name="end">31</xsl:with-param>
|
|
|
|
<xsl:with-param name="element">option</xsl:with-param>
|
|
|
|
</xsl:call-template>
|
|
|
|
</select>
|
|
|
|
<select>
|
|
|
|
<option>
|
|
|
|
<xsl:value-of select="$lang_strings[@id='unit_month']"/>
|
|
|
|
</option>
|
|
|
|
<xsl:call-template name="for-loop">
|
|
|
|
<xsl:with-param name="start">1</xsl:with-param>
|
|
|
|
<xsl:with-param name="end">12</xsl:with-param>
|
|
|
|
<xsl:with-param name="element">option</xsl:with-param>
|
|
|
|
</xsl:call-template>
|
|
|
|
</select>
|
|
|
|
<select>
|
|
|
|
<option>
|
|
|
|
<xsl:value-of select="$lang_strings[@id='unit_year']"/>
|
|
|
|
</option>
|
|
|
|
<xsl:call-template name="for-loop">
|
|
|
|
<xsl:with-param name="start">1890</xsl:with-param>
|
|
|
|
<xsl:with-param name="end">2008</xsl:with-param>
|
|
|
|
<xsl:with-param name="element">option</xsl:with-param>
|
|
|
|
</xsl:call-template>
|
|
|
|
</select>
|
|
|
|
</xsl:when>
|
|
|
|
|
|
|
|
<xsl:when test="@xsi:type='xsd:language'">
|
|
|
|
<select>
|
|
|
|
<xsl:attribute name="id">
|
|
|
|
<xsl:value-of select="name()"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
<xsl:attribute name="name">
|
|
|
|
<xsl:value-of select="name()"/>
|
|
|
|
</xsl:attribute>
|
|
|
|
<option>
|
|
|
|
<xsl:value-of select="name()"/>
|
|
|
|
</option>
|
2008-05-02 07:38:43 +00:00
|
|
|
|
2008-05-11 03:09:53 +00:00
|
|
|
<xsl:variable name="language" select="//@locale" />
|
2008-05-02 07:38:43 +00:00
|
|
|
|
2008-05-11 03:09:53 +00:00
|
|
|
<xsl:for-each select="$language_strings">
|
2008-05-02 07:38:43 +00:00
|
|
|
|
2008-05-11 03:09:53 +00:00
|
|
|
<option>
|
2008-05-02 07:38:43 +00:00
|
|
|
|
2008-05-11 03:09:53 +00:00
|
|
|
<xsl:attribute name="value">
|
|
|
|
<xsl:value-of select="short" />
|
|
|
|
</xsl:attribute>
|
|
|
|
<!--
|
|
|
|
<xsl:if test="$short=$language">
|
|
|
|
<xsl:attribute name="selected">selected</xsl:attribute>
|
|
|
|
</xsl:if>
|
|
|
|
-->
|
|
|
|
<xsl:value-of select="name[@lang='en']" /><!-- language hardcoded to en - this will be solved through simple if/else -->
|
|
|
|
<xsl:value-of select="name[@lang=$language]" />
|
|
|
|
<xsl:value-of select="$language" /><!-- debug debug debug -->
|
|
|
|
</option>
|
2008-05-02 07:38:43 +00:00
|
|
|
|
2008-05-11 03:09:53 +00:00
|
|
|
</xsl:for-each>
|
2008-05-02 07:38:43 +00:00
|
|
|
|
2008-05-11 03:09:53 +00:00
|
|
|
</select>
|
|
|
|
</xsl:when>
|
2008-05-02 07:38:43 +00:00
|
|
|
|
2008-05-11 03:09:53 +00:00
|
|
|
</xsl:choose>
|
2008-05-02 07:38:43 +00:00
|
|
|
|
2008-05-11 03:09:53 +00:00
|
|
|
</li>
|
2008-05-02 07:38:43 +00:00
|
|
|
|
2008-05-11 03:09:53 +00:00
|
|
|
</xsl:for-each>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<fieldset>
|
|
|
|
<legend>
|
|
|
|
<xsl:copy-of select="$lang_strings[@id='instruction_license_cc_remix_question']/node()" />
|
|
|
|
</legend>
|
|
|
|
<label for="remix">
|
|
|
|
<input id="remix" type="radio" name="modification" value="remix" />
|
|
|
|
<xsl:copy-of select="$lang_strings[@id='instruction_license_cc_remix']/node()" />
|
|
|
|
</label>
|
|
|
|
<label for="sharealike">
|
|
|
|
<input id="sharealike" type="radio" name="modification" value="sharealike" />
|
|
|
|
<xsl:copy-of select="$lang_strings[@id='instruction_license_cc_sharealike']/node()" />
|
|
|
|
</label>
|
|
|
|
<label for="noderivatives">
|
|
|
|
<input id="noderivatives" type="radio" name="modification" value="noderivatives" />
|
|
|
|
<xsl:copy-of select="$lang_strings[@id='instruction_license_cc_noderivatives']/node()" />
|
|
|
|
</label>
|
|
|
|
</fieldset>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<fieldset>
|
|
|
|
<legend>
|
|
|
|
<xsl:copy-of select="$lang_strings[@id='instruction_license_cc_commercial_question']/node()" />
|
|
|
|
</legend>
|
|
|
|
<label for="commercial">
|
|
|
|
<input id="commercial" type="radio" name="commercial" value="commeercial" />
|
|
|
|
<xsl:copy-of select="$lang_strings[@id='instruction_license_cc_commercial']/node()" />
|
|
|
|
</label>
|
|
|
|
<label for="noncommercial">
|
|
|
|
<input id="noncommercial" type="radio" name="commercial" value="noncommercial" />
|
|
|
|
<xsl:copy-of select="$lang_strings[@id='instruction_license_cc_noncommercial']/node()" />
|
|
|
|
</label>
|
|
|
|
</fieldset>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
</ol>
|
|
|
|
|
|
|
|
<br />
|
2008-05-02 07:38:43 +00:00
|
|
|
|
|
|
|
<button name="upload" type="submit">
|
2008-04-30 07:12:42 +00:00
|
|
|
<xsl:attribute name="value">
|
|
|
|
<xsl:value-of select="$lang_strings[@id='button_next_page']" />
|
|
|
|
</xsl:attribute>
|
2008-05-02 07:38:43 +00:00
|
|
|
<img src="/images/tango/128x128/actions/document-send.png">
|
2008-04-30 07:12:42 +00:00
|
|
|
<xsl:attribute name="alt">
|
2008-05-02 07:38:43 +00:00
|
|
|
<xsl:value-of select="$lang_strings[@id='button_upload_send_file']" />
|
2008-04-30 07:12:42 +00:00
|
|
|
</xsl:attribute>
|
|
|
|
</img>
|
|
|
|
</button>
|
|
|
|
|
2008-05-02 07:38:43 +00:00
|
|
|
</fieldset>
|
2008-04-20 23:08:07 +00:00
|
|
|
|
2008-05-02 07:38:43 +00:00
|
|
|
</form>
|
2007-11-22 05:21:17 +00:00
|
|
|
|
|
|
|
</xsl:template>
|
|
|
|
|
2008-04-20 23:08:07 +00:00
|
|
|
<xsl:template name="for-loop">
|
|
|
|
<!--
|
|
|
|
this is some nasty recursive shit.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<xsl:param name="start" />
|
|
|
|
<xsl:param name="end" />
|
|
|
|
<xsl:param name="element" />
|
|
|
|
|
|
|
|
<xsl:if test="$start <= $end">
|
|
|
|
<xsl:element name="{$element}">
|
|
|
|
<xsl:value-of select="$start" />
|
|
|
|
</xsl:element>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<xsl:if test="$start <= $end">
|
|
|
|
|
|
|
|
<xsl:call-template name="for-loop">
|
2008-04-25 11:42:50 +00:00
|
|
|
|
2008-04-20 23:08:07 +00:00
|
|
|
<xsl:with-param name="start">
|
|
|
|
<xsl:value-of select="$start + 1"/>
|
|
|
|
</xsl:with-param>
|
|
|
|
|
|
|
|
<xsl:with-param name="end">
|
|
|
|
<xsl:value-of select="$end"/>
|
|
|
|
</xsl:with-param>
|
|
|
|
|
|
|
|
<xsl:with-param name="element">
|
|
|
|
<xsl:value-of select="$element"/>
|
|
|
|
</xsl:with-param>
|
|
|
|
|
|
|
|
</xsl:call-template>
|
|
|
|
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
</xsl:template>
|
|
|
|
|
2007-12-11 15:05:33 +00:00
|
|
|
</xsl:stylesheet>
|