This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
tabellio.searchform/tabellio/searchform/docsearch-feed.pt

60 lines
2.6 KiB
XML

<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:syn="http://purl.org/rss/1.0/modules/syndication/"
xmlns="http://purl.org/rss/1.0/"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<tal:block
define="
Batch python:modules['Products.CMFPlone'].Batch;
search_results python: view.document_search_results() or view.dossier_search_results() or view.question_search_results();
search_batch python:Batch(search_results[:20] or [], 20, 0);
dummy python:request.RESPONSE.setHeader('Content-Type', 'text/xml;; charset=utf-8');
">
<channel rdf:about="" tal:attributes="rdf:about request/URL">
<title tal:content="context/pretty_title_or_id">The title</title>
<link tal:content="context/portal_url">http://url.to.portal</link>
<description>
</description>
<items>
<rdf:Seq>
<tal:block repeat="obj_item python: search_batch">
<rdf:li rdf:resource=""
tal:attributes="rdf:resource obj_item/getURL" />
</tal:block>
</rdf:Seq>
</items>
</channel>
<tal:block repeat="item search_batch">
<item rdf:about="" tal:attributes="rdf:about obj_item/absolute_url"
tal:define="obj_item python:item.getObject();
has_text exists:obj_item/aq_explicit/getText;
text python:has_text and obj_item.getText() or '';
has_effective exists:obj_item/aq_explicit/effective_date;
effective python:has_effective and obj_item.effective().HTML4() or '';
modified python:obj_item.modified().HTML4();
creator obj_item/Creator|nothing">
<title tal:content="obj_item/pretty_title_or_id">Title</title>
<link tal:content="obj_item/Identifier">Identifier</link>
<description tal:content="obj_item/Description">Description</description>
<content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"
tal:condition="has_text"
tal:content="structure python:'&lt;![CDATA[' + text + ']]&gt;'">Content</content:encoded>
<dc:publisher tal:content="obj_item/Publisher">Publisher</dc:publisher>
<tal:block tal:repeat="item obj_item/Subject">
<dc:subject tal:content="item">Item</dc:subject>
</tal:block>
<dc:date tal:content="python: obj_item.date">Published or last modified date if no published date</dc:date>
<dc:type tal:content="obj_item/Type">Type</dc:type>
</item>
</tal:block>
</tal:block>
</rdf:RDF>