Changeset 7724 for ndgCommon


Ignore:
Timestamp:
12/11/10 14:48:19 (9 years ago)
Author:
sdonegan
Message:

Added function to deal with CEDA organisation xml in dif held in exist - will convert this dif form to a CI_ResponsibleParty form.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ndgCommon/trunk/ndg/common/xmldb/xquery/lib/Utilities/isoUtilities_xquery_lib.xquery

    r7722 r7724  
    205205    } 
    206206}; 
     207 
     208(: Function to help turn CEDA DIF organisation info into ISO CI_ResponsibleParty type construct :) 
     209declare function isolib:cedaDataCenter ($role, $organisationInfoDir, $organisationInfoID) 
     210{  
     211     for $dataCenterDetails in collection($organisationInfoDir)/dif:DIF[matches(dif:Entry_ID, $organisationInfoID)]             
     212        return 
     213            isolib:CI_ResponsibleParty($dataCenterDetails/dif:Data_Center[1]/dif:Data_Center_Name/dif:Short_Name, 
     214            $dataCenterDetails/dif:Data_Center[1]/dif:Personnel/dif:Role,  
     215            $dataCenterDetails/dif:Data_Center[1]/dif:Personnel/dif:Role,   
     216            $role,  
     217            $dataCenterDetails/dif:Data_Center[1]/dif:Personnel/dif:Phone,  
     218            $dataCenterDetails/dif:Data_Center[1]/dif:Personnel/dif:Contact_Address,    
     219            $dataCenterDetails/dif:Data_Center[1]/dif:Personnel/dif:Contact_Address/dif:City,  
     220            $dataCenterDetails/dif:Data_Center[1]/dif:Personnel/dif:Contact_Address/dif:Postal_Code,  
     221            $dataCenterDetails/dif:Data_Center[1]/dif:Personnel/dif:Contact_Address/dif:Email)             
     222}; 
Note: See TracChangeset for help on using the changeset viewer.