source: TI07-MOLES/trunk/eXist specific/xqueryLib/Vocabs/vocab_xquery_lib.xquery @ 2511

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI07-MOLES/trunk/eXist specific/xqueryLib/Vocabs/vocab_xquery_lib.xquery@2511
Revision 2511, 4.1 KB checked in by ko23, 12 years ago (diff)

Update voclib to include Roy's new IDs. Add version variable to libraries. Change ObsStn? xq to point at 375 deployment example

Line 
1module namespace voclib='http://ndg.nerc.ac.uk/xquery/lib/vocab';
2declare variable $voclib:libversion as xs:decimal {1.0};
3
4(: Standard vocab roots :)
5declare variable $voclib:unknown_vocab_id as xs:string {'http://vocab.ndg.nerc.ac.uk/term/null'};
6
7declare variable $voclib:iso_3166_alpha2 as xs:string {'http://vocab.ndg.nerc.ac.uk/term/C320'};
8
9declare variable $voclib:bodc_parameter_usage_vocab as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P011'};
10declare variable $voclib:bodc_parameter_discovery_vocab as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P021'};
11
12declare variable $voclib:ndg_data_provider_vocab as xs:string {'http://vocab.ndg.nerc.ac.uk/term/N010'};
13declare variable $voclib:ndg_online_reference_classes_vocab as xs:string {'http://vocab.ndg.nerc.ac.uk/term/L041'};
14declare variable $voclib:ndg_activity_relations_vocab as xs:string {$voclib:unknown_vocab_id};
15declare variable $voclib:ndg_de_relations_vocab as xs:string {$voclib:unknown_vocab_id};
16declare variable $voclib:ndg_formats_vocab as xs:string {'http://vocab.ndg.nerc.ac.uk/term/N021'};
17
18declare variable $voclib:bodc_unit_names as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P061'};
19declare variable $voclib:cf_standard_names as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P071'};
20declare variable $voclib:cf_cell_methods as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P151'};
21
22declare variable $voclib:gcmd_instrument_valids as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P101'};
23declare variable $voclib:gcmd_science_valids as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P04'};
24declare variable $voclib:gcmd_science_valids_correct as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P041'};
25declare variable $voclib:gcmd_science_valids_deprecated as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P042'};
26declare variable $voclib:gcmd_science_valids_categories as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P111'};
27declare variable $voclib:gcmd_science_valids_topics as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P121'};
28declare variable $voclib:gcmd_science_valids_terms as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P131'};
29declare variable $voclib:gcmd_science_valids_variables as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P141'};
30
31declare variable $voclib:gcmd_project_valids as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P161'};
32declare variable $voclib:gcmd_location_valids as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P171'};
33declare variable $voclib:gcmd_chronostratigraphic_valids as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P181'};
34declare variable $voclib:gcmd_url_content_valids as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P201'};
35
36declare variable $voclib:gcmd_iso_topic_list as xs:string {'http://gcmd.gsfc.nasa.gov/Resources/valids/iso_topic_list.html'};
37
38(: ISO 19115 vocab namespaces :)
39declare variable $voclib:iso_topic_list as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P051'};
40declare variable $voclib:iso_CI_RoleCode as xs:string {'http://http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode'};
41declare variable $voclib:iso_CI_RoleCode_custodian as xs:string {'http://http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode_custodian'};
42declare variable $voclib:iso_MD_ScopeCode as xs:string {'http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode'};
43declare variable $voclib:iso_MD_ScopeCode_dataset as xs:string {'http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode_dataset'};
44
45(: MDIP specific namespaces :)
46declare variable $voclib:ISO_639-2_ns as xs:string{'UKGemini_Language_Categories'};
47declare variable $voclib:ISO_3166_ns as xs:string{'UKGemini_Land_Area_Categories'};
48
49(: IHO list :)
50declare variable $voclib:iho_s23_list as xs:string {'http://vocab.ndg.nerc.ac.uk/term/C161'};
51
52declare function voclib:spot-vocab($vocab_root as xs:string, $vocab_uri as xs:string) as xs:boolean
53(: See if the vocab pointed if from the vocab pointed at by the vocab_root :)
54{
55if ($vocab_root = substring($vocab_uri, 1, string-length($vocab_root))) then 
56true()
57else
58false()
59} ;
Note: See TracBrowser for help on using the repository browser.