source: exist/trunk/xquery/atom2DC.xq @ 4436

Subversion URL:
Revision 4436, 1.2 KB checked in by cbyrom, 12 years ago (diff)

Remove unneccesary xquery libs from xqueries + fix moles2dif - removing
hidden characters which stopped it from running.

1(: Create a dublin core document from Atom documents in TargetCollection which have LocalID :)
2declare default element namespace '';
3declare namespace xsi='';
4declare namespace dc='';
5declare namespace oai_dc='';
6declare namespace moles="";
8declare variable $targetCollection as xs:string := 'TargetCollection';
9declare variable $localIdentifier as xs:string := 'LocalID';
11for $DE in collection($targetCollection)/entry[matches(id, concat('__ATOM__',$localIdentifier,'$'))]
13element oai_dc:dc {
14    attribute xsi:schemaLocation {''},
15    element dc:title {string($DE/title)},
16    element dc:type {'Dataset'},
17    element dc:identifier {tokenize(string($DE/id), '__ATOM__')[2]},
18    element dc:description {string($DE/summary)},
19    element dc:date {string($DE/updated)},
20    element dc:creator {string($DE/author/name)},
21    element dc:publisher {string($DE/moles:entity/moles:molesISO/moles:providerID)}
Note: See TracBrowser for help on using the repository browser.