Changeset 7717 for ndgCommon


Ignore:
Timestamp:
09/11/10 21:46:52 (9 years ago)
Author:
sdonegan
Message:

Fixed some bugs with the xquery.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ndgCommon/trunk/ndg/common/xmldb/xquery/dif2stubISO.xq

    r7715 r7717  
    1 (:Development DIF2ISO xquery - designed to convert most important DIF elements and produce a "stub" iso: 
     1(:Development DIF2ISO xquery - designed to convert most important DIF elements and produce a "stub" iso: 
    22 
    33Steve Donegan CEDA RALSpace 2010 
     
    7575 
    7676(: Loop through the dif and pick the important stuff we need to produce a stub iso :) 
    77 for $DIF in doc($targetCollection)/dif:DIF[dif:Entry_ID=$input_entry_id] 
     77for $DIF in collection($targetCollection)/dif:DIF[dif:Entry_ID=$input_entry_id] 
    7878 
    7979    (:define string variable for publication and creation dates comprised of comma delimited list from ATOM elements:)  
     
    102102      }, (: /gmd:fileIdentifier :) 
    103103      
    104        (: initial contact element should be main METADATA  pointOfContact :) 
     104       (: initial contact element should be main METADATA  pointOfContact - Mandatory! :) 
     105       element gmd:contact { 
    105106     
    106107       (:BODC & BGS records - find "technical contact" - this is their "pointOfContact" :) 
     
    154155                   $DIF/dif:Data_Center/dif:Personnel[1]/dif:Contact_Address/dif:Postal_Code,  
    155156                   $DIF/dif:Data_Center/dif:Personnel[1]/dif:Email) 
    156         else(), 
     157        else() 
    157158        
    158        
     159      }, (: /contact :) 
     160 
    159161      (: 
    160162      NOTE: this is the datestamp of the dif=>iso conversion 
Note: See TracChangeset for help on using the changeset viewer.