Changeset 2056
- Timestamp:
- 25/01/07 16:40:40 (14 years ago)
- Location:
- TI07-MOLES/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TI07-MOLES/trunk/DIF/XQuery/DIF2MOLES.xquery
r2026 r2056 7 7 declare namespace xsi='http://www.w3.org/2001/XMLSchema-instance'; 8 8 declare namespace f='http://ndg.nerc.ac.uk/moles/localfunctions'; 9 9 (: Replacable parameters :) 10 10 declare variable $input_collection as xs:string {'TargetCollection'}; 11 11 declare variable $input_repository as xs:string {'Input_Repository_Code'}; 12 declare variable $input_repository_local as xs:string {'Input_Repository_LocalID'}; 13 declare variable $input_entry_id as xs:string {'Input_Entry_ID'}; 14 declare variable $output_local_id as xs:string {'Output_LocalID'}; 15 (: Vocab stubs :) 12 16 declare variable $unknown_vocab_id as xs:string {'http://vocab.ndg.nerc.ac.uk/null'}; 13 14 17 declare variable $bodc_parameter_discovery_vocab as xs:string {'http://vocab.ndg.nerc.ac.uk/P021'}; 15 16 declare variable $cf_standard_names as xs:string {'http://www.cgd.ucar.edu/cms/eaton/cf-metadata/standard_name.html'}; 17 18 (: declare variable $gcmd_science_valids as xs:string {'http://gcmd.gsfc.nasa.gov/Resources/valids/gcmd_parameters.html'}; :) 18 declare variable $cf_standard_names as xs:string {'http://vocab.ndg.nerc.ac.uk/P071'}; 19 19 declare variable $gcmd_science_valids as xs:string {'http://vocab.ndg.nerc.ac.uk/P041'}; 20 20 declare variable $gcmd_project_valids as xs:string {'http://gcmd.gsfc.nasa.gov/Resources/valids/projects.html'}; … … 22 22 declare variable $gcmd_paleotemporal_valids as xs:string {'http://gcmd.gsfc.nasa.gov/Resources/valids/paleotemporal.html'}; 23 23 declare variable $gcmd_iso_topic_list as xs:string {'http://gcmd.gsfc.nasa.gov/Resources/valids/iso_topic_list.html'}; 24 25 (: declare variable $iso_topic_list as xs:string {'http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_TopicCategoryCode'}; :)26 24 declare variable $iso_topic_list as xs:string {'http://vocab.ndg.nerc.ac.uk/P051'}; 27 28 25 declare variable $ndg_data_provider_vocab as xs:string {'http://vocab.ndg.nerc.ac.uk/N010'}; 29 30 declare variable $input_repository as xs:string {'Input_Repository_Code'};31 declare variable $input_repository_local as xs:string {'Input_Repository_LocalID'};32 declare variable $input_entry_id as xs:string {'Input_Entry_ID'};33 declare variable $output_local_id as xs:string {'Output_LocalID'};34 26 35 27 declare function f:fix-coord($e as element()) as element() … … 56 48 } ; 57 49 50 declare function f:spot-vocab($vocab_root as xs:string, $vocab_uri as xs:string) as xs:boolean 51 (: See if the vocab pointed if from the vocab pointed at by the vocab_root :) 52 { 53 iif ($vocab_root = substring($vocab_uri, 1, string-length($vocab_root))) then 54 true() 55 else 56 false() 57 } ; 58 58 59 for $DIF in collection($input_collection)/dif:DIF[dif:Entry_ID=$input_entry_id] 59 60 return -
TI07-MOLES/trunk/DIF/XQuery/NDG-DIF.xquery
r2008 r2056 211 211 element Contact_Address { 212 212 for $addressline in $DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:addressline 213 return element address {data($addressline)},213 return element Address {data($addressline)}, 214 214 if (exists($DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:city)) then 215 215 element City {string($DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:city)} -
TI07-MOLES/trunk/MDIP/XQueries/MDIP2MOLES.xquery
r2026 r2056 60 60 else $e 61 61 else $e 62 } ; 63 64 declare function f:spot-vocab($vocab_root as xs:string, $vocab_uri as xs:string) as xs:boolean 65 (: See if the vocab pointed if from the vocab pointed at by the vocab_root :) 66 { 67 if ($vocab_root = substring($vocab_uri, 1, string-length($vocab_root))) then 68 true() 69 else 70 false() 62 71 } ; 63 72 -
TI07-MOLES/trunk/PythonCode/wsgi/ndg_xqueries.py
r2008 r2056 302 302 element Contact_Address { 303 303 for $addressline in $DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:addressline 304 return element address {data($addressline)},304 return element Address {data($addressline)}, 305 305 if (exists($DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:city)) then 306 306 element City {string($DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:city)}
Note: See TracChangeset
for help on using the changeset viewer.