Ignore:
Timestamp:
20/03/07 12:59:12 (14 years ago)
Author:
ko23
Message:

Corrected DIF output query (Related_URLs)

File:
1 edited

Legend:

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

    r2291 r2302  
    1111        exists('moles:dgDataEntity')  
    1212        and moles:dgMetadataID/moles:schemeIdentifier='NDG-B0'  
    13         and moles:dgMetadataID/moles:repositoryIdentifier=$repositoryIdentifier] 
     13        and moles:dgMetadataID/moles:repositoryIdentifier=$repositoryIdentifier 
    1414        and moles:dgMetadataID/moles:localIdentifier=$localIdentifier] 
    1515        return 
     
    234234                        }, 
    235235        element Summary {string($DE/moles:dgMetadataDescription/moles:abstract/moles:abstractText)}, 
    236         element Related_URL  { 
    237             element URL_Content_Type {'NDG_B_SERVICE'}, 
    238             element URL {data($DE/moles:dgMetadataID/moles:repositoryIdentifier)}, 
    239             element Description {'The NDG service for browsing metadata.'} 
    240             }, 
    241236        for $DG in $DE/moles:dgDataEntity/moles:dgDataGranule 
    242237            return 
     
    291286            return 
    292287                    element Related_URL { 
    293                             element URL {data($RelURL_Desc)}, 
    294                             element Description {concat(data($RelURL_Desc/moles:name), ' - ', data($RelURL_Desc/moles:notes))}               
     288                    if (exist($RelURL_Desc/dgSimpleLink)) then 
     289                    element URL {data($RelURL_Desc/dgSimpleLink/URI)}, 
     290                    element Description {concat(data($RelURL_Desc/dgSimpleLink/moles:name), ' - ', data($RelURL_Desc/dgSimpleLink/moles:notes))} 
     291                    else () 
    295292                         }, 
    296293        element Metadata_Name {'[CEOS IDN DIF]'}, 
Note: See TracChangeset for help on using the changeset viewer.