Changeset 3841 for exist/trunk/xqueryLib


Ignore:
Timestamp:
01/05/08 14:28:47 (12 years ago)
Author:
cbyrom
Message:

Various updates to the xquery files - to remove usage of invalid specs
and dependency on obsolete function calls. Also add the inputParse_xquery_lib.xquery
file - referenced from the xquery files but not currently included in codebase.
NB, changes made to allow use of Saxon java library to do xqueries - to
remove the need for the discovery service eXist DB.

  • NB, also changes tested by comparing saxon transforms to eXist ones; these

were found to be identical.

Location:
exist/trunk/xqueryLib
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • exist/trunk/xqueryLib/Utilities/utility_xquery_lib.xquery

    r3071 r3841  
    11module namespace utillib='http://ndg.nerc.ac.uk/xquery/lib/utilities'; 
    2 declare variable $utillib:libversion as xs:decimal {1.0}; 
     2declare variable $utillib:libversion as xs:decimal := 1.0; 
    33 
    4 declare variable $utillib:moles_id_separator as xs:string {'__'}; 
     4declare variable $utillib:moles_id_separator as xs:string := '__'; 
    55 
    66declare function utillib:kev-strip-namespace($e as element()) as element()  
  • exist/trunk/xqueryLib/Vocabs/vocab_xquery_lib.xquery

    r2511 r3841  
    11module namespace voclib='http://ndg.nerc.ac.uk/xquery/lib/vocab'; 
    2 declare variable $voclib:libversion as xs:decimal {1.0}; 
     2declare variable $voclib:libversion as xs:decimal := 1.0; 
     3(: Standard vocab roots :) 
     4declare variable $voclib:unknown_vocab_id as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/null'; 
    35 
    4 (: Standard vocab roots :) 
    5 declare variable $voclib:unknown_vocab_id as xs:string {'http://vocab.ndg.nerc.ac.uk/term/null'}; 
     6declare variable $voclib:iso_3166_alpha2 as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/C320'; 
    67 
    7 declare variable $voclib:iso_3166_alpha2 as xs:string {'http://vocab.ndg.nerc.ac.uk/term/C320'}; 
     8declare variable $voclib:bodc_parameter_usage_vocab as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P011'; 
     9declare variable $voclib:bodc_parameter_discovery_vocab as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P021'; 
    810 
    9 declare variable $voclib:bodc_parameter_usage_vocab as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P011'}; 
    10 declare variable $voclib:bodc_parameter_discovery_vocab as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P021'}; 
     11declare variable $voclib:ndg_data_provider_vocab as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/N010'; 
     12declare variable $voclib:ndg_online_reference_classes_vocab as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/L041'; 
     13declare variable $voclib:ndg_activity_relations_vocab as xs:string := $voclib:unknown_vocab_id; 
     14declare variable $voclib:ndg_de_relations_vocab as xs:string := $voclib:unknown_vocab_id; 
     15declare variable $voclib:ndg_formats_vocab as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/N021'; 
    1116 
    12 declare variable $voclib:ndg_data_provider_vocab as xs:string {'http://vocab.ndg.nerc.ac.uk/term/N010'}; 
    13 declare variable $voclib:ndg_online_reference_classes_vocab as xs:string {'http://vocab.ndg.nerc.ac.uk/term/L041'}; 
    14 declare variable $voclib:ndg_activity_relations_vocab as xs:string {$voclib:unknown_vocab_id}; 
    15 declare variable $voclib:ndg_de_relations_vocab as xs:string {$voclib:unknown_vocab_id}; 
    16 declare variable $voclib:ndg_formats_vocab as xs:string {'http://vocab.ndg.nerc.ac.uk/term/N021'}; 
     17declare variable $voclib:bodc_unit_names as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P061'; 
     18declare variable $voclib:cf_standard_names as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P071'; 
     19declare variable $voclib:cf_cell_methods as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P151'; 
    1720 
    18 declare variable $voclib:bodc_unit_names as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P061'}; 
    19 declare variable $voclib:cf_standard_names as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P071'}; 
    20 declare variable $voclib:cf_cell_methods as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P151'}; 
     21declare variable $voclib:gcmd_instrument_valids as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P101';  
     22declare variable $voclib:gcmd_science_valids as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P04';  
     23declare variable $voclib:gcmd_science_valids_correct as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P041';  
     24declare variable $voclib:gcmd_science_valids_deprecated as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P042';  
     25declare variable $voclib:gcmd_science_valids_categories as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P111';  
     26declare variable $voclib:gcmd_science_valids_topics as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P121';  
     27declare variable $voclib:gcmd_science_valids_terms as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P131';  
     28declare variable $voclib:gcmd_science_valids_variables as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P141';  
    2129 
    22 declare variable $voclib:gcmd_instrument_valids as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P101'};  
    23 declare variable $voclib:gcmd_science_valids as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P04'};  
    24 declare variable $voclib:gcmd_science_valids_correct as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P041'};  
    25 declare variable $voclib:gcmd_science_valids_deprecated as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P042'};  
    26 declare variable $voclib:gcmd_science_valids_categories as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P111'};  
    27 declare variable $voclib:gcmd_science_valids_topics as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P121'};  
    28 declare variable $voclib:gcmd_science_valids_terms as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P131'};  
    29 declare variable $voclib:gcmd_science_valids_variables as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P141'};  
     30declare variable $voclib:gcmd_project_valids as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P161';  
     31declare variable $voclib:gcmd_location_valids as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P171';  
     32declare variable $voclib:gcmd_chronostratigraphic_valids as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P181';  
     33declare variable $voclib:gcmd_url_content_valids as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P201';  
    3034 
    31 declare variable $voclib:gcmd_project_valids as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P161'};  
    32 declare variable $voclib:gcmd_location_valids as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P171'};  
    33 declare variable $voclib:gcmd_chronostratigraphic_valids as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P181'};  
    34 declare variable $voclib:gcmd_url_content_valids as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P201'};  
    35  
    36 declare variable $voclib:gcmd_iso_topic_list as xs:string {'http://gcmd.gsfc.nasa.gov/Resources/valids/iso_topic_list.html'}; 
     35declare variable $voclib:gcmd_iso_topic_list as xs:string := 'http://gcmd.gsfc.nasa.gov/Resources/valids/iso_topic_list.html'; 
    3736 
    3837(: ISO 19115 vocab namespaces :) 
    39 declare variable $voclib:iso_topic_list as xs:string {'http://vocab.ndg.nerc.ac.uk/term/P051'}; 
    40 declare variable $voclib:iso_CI_RoleCode as xs:string {'http://http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode'}; 
    41 declare variable $voclib:iso_CI_RoleCode_custodian as xs:string {'http://http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode_custodian'}; 
    42 declare variable $voclib:iso_MD_ScopeCode as xs:string {'http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode'}; 
    43 declare variable $voclib:iso_MD_ScopeCode_dataset as xs:string {'http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode_dataset'}; 
     38declare variable $voclib:iso_topic_list as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/P051'; 
     39declare variable $voclib:iso_CI_RoleCode as xs:string := 'http://http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode'; 
     40declare variable $voclib:iso_CI_RoleCode_custodian as xs:string := 'http://http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode_custodian'; 
     41declare variable $voclib:iso_MD_ScopeCode as xs:string := 'http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode'; 
     42declare variable $voclib:iso_MD_ScopeCode_dataset as xs:string := 'http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode_dataset'; 
    4443 
    4544(: MDIP specific namespaces :) 
    46 declare variable $voclib:ISO_639-2_ns as xs:string{'UKGemini_Language_Categories'}; 
    47 declare variable $voclib:ISO_3166_ns as xs:string{'UKGemini_Land_Area_Categories'}; 
     45declare variable $voclib:ISO_639-2_ns as xs:string := 'UKGemini_Language_Categories'; 
     46declare variable $voclib:ISO_3166_ns as xs:string := 'UKGemini_Land_Area_Categories'; 
    4847 
    4948(: IHO list :) 
    50 declare variable $voclib:iho_s23_list as xs:string {'http://vocab.ndg.nerc.ac.uk/term/C161'}; 
     49declare variable $voclib:iho_s23_list as xs:string := 'http://vocab.ndg.nerc.ac.uk/term/C161'; 
    5150 
    5251declare function voclib:spot-vocab($vocab_root as xs:string, $vocab_uri as xs:string) as xs:boolean  
Note: See TracChangeset for help on using the changeset viewer.