Commit a91c1c82 authored by Adrian Schlegel's avatar Adrian Schlegel
Browse files

changed namespaces to comply with LEAP2A 2010-07,


added a version element to the atom feed
Signed-off-by: default avatarAdrian Schlegel <adrian@liip.ch>
parent a39a7efe
{include file="export:leap:entry.tpl" skipfooter=true}
{foreach from=$persondata item=entry}
<leap:persondata
<leap2:persondata
mahara:artefactplugin="{$entry->artefactplugin}"
mahara:artefacttype="{$entry->artefacttype}"
{if $entry->mahara}
leap:field="other" mahara:field="{$entry->field}"
leap2:field="other" mahara:field="{$entry->field}"
{else}
leap:field="{$entry->field}"
leap2:field="{$entry->field}"
{/if}
leap:label="{$entry->label}"
leap2:label="{$entry->label}"
{if $entry->service}
leap:service="{$entry->service}"
leap2:service="{$entry->service}"
{/if}
>{$entry->value}</leap:persondata>
>{$entry->value}</leap2:persondata>
{/foreach}
{if $spacialdata}
<leap:spatial>
<leap2:spatial>
{foreach from=$spacialdata item=entry}
<leap:{$entry->type} mahara:artefacttype="{$entry->artefacttype}"{if $entry->countrycode} leap:countrycode="{$entry->countrycode}"{/if}>{$entry->value}</leap:{$entry->type}>
<leap2:{$entry->type} mahara:artefacttype="{$entry->artefacttype}"{if $entry->countrycode} leap2:countrycode="{$entry->countrycode}"{/if}>{$entry->value}</leap2:{$entry->type}>
{/foreach}
</leap:spatial>
</leap2:spatial>
{/if}
{include file="export:leap:entryfooter.tpl"}
{include file="export:leap:entry.tpl" skipfooter=true}
{if $start} <leap:date leap:point="start" leap:label="{$start}"></leap:date>
{if $start} <leap2:date leap2:point="start" leap2:label="{$start}"></leap2:date>
{/if}
{if $end} <leap:date leap:point="end" leap:label="{$end}"></leap:date>
{if $end} <leap2:date leap2:point="end" leap2:label="{$end}"></leap2:date>
{/if}
{include file="export:leap:entryfooter.tpl"}
......@@ -690,7 +690,7 @@ class LeapExportElement {
*/
public function add_generic_link($id, $rel, $extras=null) {
if (!in_array($rel, array('related', 'alternate', 'enclosure'))) {
$rel = 'leap:' . $rel;
$rel = 'leap2:' . $rel;
}
$link = array(
'id' => 'portfolio:' . $id,
......@@ -997,7 +997,7 @@ class LeapExportOutputFilter {
private function replace_artefact_link($matches) {
$artefactid = $matches[2];
if (in_array($artefactid, $this->artefactids)) {
return '<a rel="leap:has_part" href="portfolio:artefact' . hsc($artefactid) . '"' . $matches[5] . '>';
return '<a rel="leap2:has_part" href="portfolio:artefact' . hsc($artefactid) . '"' . $matches[5] . '>';
}
// If the artefact isn't in the export, then we can't provide an
......@@ -1013,7 +1013,7 @@ class LeapExportOutputFilter {
private function replace_download_link($matches) {
$artefactid = $matches[3];
if (in_array($artefactid, $this->artefactids)) {
return '<' . $matches[1] . 'rel="leap:has_part" href="portfolio:artefact' . hsc($artefactid) . '"' . $matches[5] . ($matches[1] == 'img' ? '/' : '') . '>';
return '<' . $matches[1] . 'rel="leap2:has_part" href="portfolio:artefact' . hsc($artefactid) . '"' . $matches[5] . ($matches[1] == 'img' ? '/' : '') . '>';
}
log_debug("Not providing an export-relative link for $artefactid");
......
......@@ -10,7 +10,7 @@
{if $created} <published>{$created}</published>{/if}
{if $summary} <summary{if $summarytype != 'text'} type="{$summarytype}"{/if}>{if $summarytype == 'xhtml'}<div xmlns="http://www.w3.org/1999/xhtml">{/if}{if $summarytype == 'xhtml'}{$summary|clean_html:true|export_leap_rewrite_links|safe}{elseif $summarytype == 'html'}{$summary|clean_html|export_leap_rewrite_links}{else}{$summary}{/if}{if $summarytype == 'xhtml'}</div>{/if}</summary>{/if}
<content{if $contenttype != 'text'} type="{$contenttype}"{/if}{if $contentsrc} src="{$contentsrc}"{/if}>{if $contenttype == 'xhtml'}<div xmlns="http://www.w3.org/1999/xhtml">{/if}{if $contenttype == 'xhtml'}{$content|clean_html:true|export_leap_rewrite_links|safe}{elseif $contenttype == 'html'}{$content|clean_html|export_leap_rewrite_links}{else}{$content}{/if}{if $contenttype == 'xhtml'}</div>{/if}</content>
<rdf:type rdf:resource="leaptype:{$leaptype}"/>
<rdf:type rdf:resource="leap2:{$leaptype}"/>
{if $artefacttype} <mahara:artefactplugin mahara:type="{$artefacttype}" mahara:plugin="{$artefactplugin}"/>{/if}
{include file="export:leap:links.tpl"}
{include file="export:leap:categories.tpl"}
......
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:leap="http://wiki.cetis.ac.uk/2009-03/LEAP2A_predicates#"
xmlns:leaptype="http://wiki.cetis.ac.uk/2009-03/LEAP2A_types#"
xmlns:categories="http://wiki.cetis.ac.uk/2009-03/LEAP2A_categories/"
xmlns:leap2="http://terms.leapspecs.org/"
xmlns:categories="http://wiki.leapspecs.org/2A/categories"
xmlns:portfolio="{$WWWROOT}export/leap/{$userid}/{$export_time}/"
xmlns:mahara="http://wiki.mahara.org/Developer_Area/Import%2F%2FExport/LEAP_Extensions#"
>
<leap2:version>http://www.leapspecs.org/2010-07/2A/</leap2:version>
<id>{$WWWROOT}export/{$userid}/{$export_time}</id>
<title>Mahara Leap2A Export for {$name}, {$export_time|format_date:"strftimedatetimeshort"}</title>
<updated>{$export_time_rfc3339}</updated>
......
{foreach from=$links item=link} <link rel="{$link->type}" href="{$link->id}"{if $link->display_order} leap:display_order="{$link->display_order}"{/if}/>
{foreach from=$links item=link} <link rel="{$link->type}" href="{$link->id}"{if $link->display_order} leap2:display_order="{$link->display_order}"{/if}/>
{/foreach}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment