Changeset 4424


Ignore:
Timestamp:
12/11/08 10:40:46 (11 years ago)
Author:
cbyrom
Message:

Only put actual dataent ID into DC produced by atom2DC transform + fix
transform variable names.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • exist/trunk/xquery/atom2DC.xq

    r4411 r4424  
    99declare namespace moles="http://ndg.nerc.ac.uk/schema/moles2alpha"; 
    1010 
    11 declare variable $targetCollection as xs:string := '/db/atoms/published/data_entities/badc.nerc.ac.uk'; 
    12 declare variable $localIdentifier as xs:string := 'dataent_URGENT'; 
     11declare variable $targetCollection as xs:string := 'TargetCollection'; 
     12declare variable $localIdentifier as xs:string := 'LocalID'; 
    1313 
    1414for $DE in collection($targetCollection)/entry[matches(id, concat('__ATOM__',$localIdentifier,'$'))]  
     
    1818    element dc:title {string($DE/title)}, 
    1919    element dc:type {'Dataset'}, 
    20     element dc:identifier {string($DE/id)}, 
     20    element dc:identifier {tokenize(string($DE/id), '__ATOM__')[2]}, 
    2121    element dc:description {string($DE/summary)}, 
    2222    element dc:date {string($DE/updated)}, 
Note: See TracChangeset for help on using the changeset viewer.