Changeset 1616 for TI07-MOLES/trunk/DIF


Ignore:
Timestamp:
23/10/06 10:44:55 (13 years ago)
Author:
ko23
Message:

Re-fix of onlineReferenceType XMLSpy mess up. Update of XQueries

Location:
TI07-MOLES/trunk/DIF/XQuery
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • TI07-MOLES/trunk/DIF/XQuery/NDG-DIF.xquery

    r1547 r1616  
    1 for $DE in collection('/db/ndg_B_metadata')/dgMetadata/dgMetadataRecord[exists('dgDataEntity') and dgMetadataID/schemeIdentifier='NDG-B0' and dgMetadataID/repositoryIdentifier='badc.nerc.ac.uk' and dgMetadataID/localIdentifier='dataent3'] 
     1for $DE in collection('/db/ndg_B_metadata')/dgMetadata/dgMetadataRecord[exists(dgDataEntity) and dgMetadataID/schemeIdentifier='NDG-B0' and dgMetadataID/repositoryIdentifier='badc.nerc.ac.uk' and dgMetadataID/localIdentifier='dataent1'] 
    22return 
    33    <DIF  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'  xmlns='http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/' xsi:schemaLocation='http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/ http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/dif_v9.4.xsd'> 
     
    7171                    return element Long_Name {data($DepDPTName)} 
    7272                }, 
    73  
    7473        for $DepObsStn in ($DE/dgDataEntity/RelatedDeployment/ObservationStationID) 
    7574        return  
     
    8281                }, 
    8382 
    84         for $TemporalRange in ($DE/dgDataEntity/dgDataSummary/dgDataCoverage/(dgTemporalCoverage | dgSpatioTemporalcoverage/dgSpatioTemporalRange/dgSpatialCoverage)/dgDateRange) 
     83        for $TemporalRange in ($DE/dgDataEntity/dgDataSummary/dgDataCoverage//dgDateRange) 
    8584                return  
    8685                    element Temporal_Coverage 
     
    8988                        element End_Date {data($TemporalRange/DateRangeEnd)} 
    9089                        }, 
    91         for $TemporalTerm in ($DE/dgDataEntity/dgDataSummary/dgDataCoverage/(dgTemporalCoverage | dgSpatioTemporalcoverage/dgSpatioTemporalRange/dgSpatialCoverage)/dgArea/dgValidTerm) 
     90        for $TemporalTerm in ($DE/dgDataEntity/dgDataSummary/dgDataCoverage//dgArea/dgValidTerm) 
    9291                return element Paleo_Temporal_Coverage  
    9392                    { 
     
    9695 
    9796        for $Data_Set_Progress in ($DE/dgDataEntity/dgDataSummary/dgDataStatus/dgDatasetClosure) 
    98                 return element Data_Set_Progress {$Data_Set_Progress}, 
    99  
    100         for $BoundingBox in ($DE/dgDataEntity/dgDataSummary/dgDataCoverage/(dgSpatialCoverage | dgSpatioTemporalcoverage/dgSpatioTemporalRange/dgSpatialCoverage)/BoundingBox) 
     97                return element Data_Set_Progress {data($Data_Set_Progress)}, 
     98 
     99        for $BoundingBox in ($DE/dgDataEntity/dgDataSummary/dgDataCoverage//BoundingBox) 
    101100        return  
    102101            element Spatial_Coverage 
     
    108107                }, 
    109108 
    110         for $Location in ($DE/dgDataEntity/dgDataSummary/dgDataCoverage/(dgSpatialCoverage | dgSpatioTemporalcoverage/dgSpatioTemporalRange/dgSpatialCoverage)/dgArea[dgValidTermID/ParentListID='http://gcmd.gsfc.nasa.gov/Resources/valids/gcmd_locations.html']) 
     109        for $Location in ($DE/dgDataEntity/dgDataSummary/dgDataCoverage//dgArea[dgValidTermID/ParentListID='http://gcmd.gsfc.nasa.gov/Resources/valids/gcmd_locations.html']) 
    111110                return element Location {$Location},  
    112111        element Data_Resolution {''}, 
     
    115114            element Project 
    116115                { 
    117                 for $DepActAbbrev in distinct-values((collection('/db/ndg_B_metadata')/dgMetadata/dgMetadataRecord[dgMetadataID[schemeIdentifier='NDG-B0' and repositoryIdentifier=$DepAct/repositoryIdentifier and localIdentifier=$DepAct/localIdentifier]]/abbreviation)) 
     116                for $DepActAbbrev in distinct-values(collection('/db/ndg_B_metadata')/dgMetadata/dgMetadataRecord[dgMetadataID[schemeIdentifier='NDG-B0' and repositoryIdentifier=$DepAct/repositoryIdentifier and localIdentifier=$DepAct/localIdentifier]]/abbreviation) 
    118117                    return  
    119118                        element Short_Name {data($DepActAbbrev)}, 
    120                 for $DepActName in distinct-values((collection('/db/ndg_B_metadata')/dgMetadata/dgMetadataRecord[dgMetadataID[schemeIdentifier='NDG-B0' and repositoryIdentifier=$DepAct/repositoryIdentifier and localIdentifier=$DepAct/localIdentifier]]/name)) 
     119                for $DepActName in distinct-values(collection('/db/ndg_B_metadata')/dgMetadata/dgMetadataRecord[dgMetadataID[schemeIdentifier='NDG-B0' and repositoryIdentifier=$DepAct/repositoryIdentifier and localIdentifier=$DepAct/localIdentifier]]/name) 
    121120                    return  
    122121                        element Long_Name {data($DepActName)} 
Note: See TracChangeset for help on using the changeset viewer.