Changeset 1616


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
Files:
2 added
4 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)} 
  • TI07-MOLES/trunk/DublinCore/XQuery/NDG-DublinCore.xquery

    r1528 r1616  
    66declare variable $iso_topic_list as xs:string {'http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_TopicCategoryCode'}; 
    77 
    8 for $DE in collection('/db/ndg_B_metadata')/dgMetadata/dgMetadataRecord[dgDataEntity!='' and dgMetadataID/schemeIdentifier='NDG-B0' and dgMetadataID/repositoryIdentifier='badc.nerc.ac.uk' and dgMetadataID/localIdentifier='dataent3'] 
     8for $DE in collection('/db/ndg_B_metadata')/dgMetadata/dgMetadataRecord[dgDataEntity!='' and dgMetadataID/schemeIdentifier='NDG-B0' and dgMetadataID/repositoryIdentifier='badc.nerc.ac.uk' and dgMetadataID/localIdentifier='dataent1'] 
    99return  
    1010<oai_dc:dc xmlns:oai_dc='http://www.openarchives.org/OAI/2.0/oai_dc/' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd'> 
     
    2424            }, 
    2525         
    26         for $StructuredKeyword in distinct-values($DE/dgStructuredKeyword [dgValidTermID/ParentListID=$cf_standard_names or dgValidTermID/ParentListID=$gcmd_science_valids or dgValidTermID/ParentListID=$gcmd_project_valids or dgValidTermID/ParentListID=$iso_topic_list ]//dgValidTerm )  
     26        for $StructuredKeyword in distinct-values($DE/dgStructuredKeyword [dgValidTermID/ParentListID=$cf_standard_names or dgValidTermID/ParentListID=$gcmd_science_valids or dgValidTermID/ParentListID=$gcmd_project_valids or dgValidTermID/ParentListID=$iso_topic_list ]//dgValidTerm)  
    2727                order by $StructuredKeyword 
    2828                return  
     
    3333                return  
    3434                element dc:subject  {string($StructuredKeyword1)}, 
    35          
    3635        for $DataCreatorRole in $DE/dgDataEntity/dgDataRoles/dgDataCreator/dgRoleHolder  
    37             order by $DataCreatorRole/startDate empty least, $DataCreatorRole/endDate empty least 
     36            order by $DataCreatorRole/startDate empty least 
    3837                    return  
    39                 for $DataCreatorRoleHolder in collection('/db/ndg_B_metadata')/(dgOrganisation | dgPerson)[((not(exists($DataCreatorRole/endDate)) or empty($DataCreatorRole/endDate)) and dgMetadataID/schemeIdentifier='NDG-B0' and dgMetadataID/repositoryIdentifier=$DataCreatorRole/*/repositoryIdentifier and dgMetadataID/localIdentifier=$DataCreatorRole/*/localIdentifier)] 
     38                for $DataCreatorRoleHolder in collection('/db/ndg_B_metadata')/dgMetadata/(dgOrganisation | dgPerson) 
     39                            [(dgMetadataID/schemeIdentifier='NDG-B0' 
     40                            and dgMetadataID/repositoryIdentifier=$DataCreatorRole/(dgOrganisationID | dgPersonID)/repositoryIdentifier 
     41                            and dgMetadataID/localIdentifier=$DataCreatorRole/(dgOrganisationID | dgPersonID)/localIdentifier)] 
    4042                return  
    4143                    element dc:creator { 
     
    4749                }, 
    4850            for $DataCuratorRole in $DE/dgDataEntity/dgDataRoles/dgDataCurator/dgRoleHolder[not(exists(endDate)) or endDate=''] 
     51            order by $DataCuratorRole/startDate empty least 
    4952                return  
    50                     for $DataCuratorRoleHolder in collection('/db/ndg_B_metadata')/dgMetadata/*[(dgMetadataID/schemeIdentifier='NDG-B0' 
    51                             and dgMetadataID/repositoryIdentifier=$DataCuratorRole/*/repositoryIdentifier 
    52                             and dgMetadataID/localIdentifier=$DataCuratorRole/*/localIdentifier)] 
     53                    for $DataCuratorRoleHolder in collection('/db/ndg_B_metadata')/dgMetadata/(dgOrganisation | dgPerson) 
     54                            [(dgMetadataID/schemeIdentifier='NDG-B0' 
     55                            and dgMetadataID/repositoryIdentifier=$DataCuratorRole/(dgOrganisationID | dgPersonID)/repositoryIdentifier 
     56                            and dgMetadataID/localIdentifier=$DataCuratorRole/(dgOrganisationID | dgPersonID)/localIdentifier)] 
    5357                        return  
    5458                            element dc:publisher { 
  • TI07-MOLES/trunk/MOLES.xpr

    r1547 r1616  
    88        <folder path="ISO19115-19139/Examples/"/> 
    99        <file name="StubB/XQuery/NDG-ActStubB.xquery"/> 
     10        <file name="StubB/XQuery/NDG-ActStubBmoles.xquery"/> 
    1011        <file name="StubB/XQuery/NDG-DEStubB.xquery"/> 
     12        <file name="StubB/XQuery/NDG-DEStubBmoles.xquery"/> 
    1113        <file name="DIF/XQuery/NDG-DIF-test.xquery"/> 
    1214        <file name="DIF/XQuery/NDG-DIF.xquery"/> 
     15        <file name="DIF/XQuery/NDG-DIFmoles.xquery"/> 
    1316        <file name="StubB/XQuery/NDG-DPTStubB.xquery"/> 
    1417        <file name="DublinCore/XQuery/NDG-DublinCore.xquery"/> 
     
    1821        <file name="ISO19115-WMO/XQuery/NDG-ISO19115-WMO.xquery"/> 
    1922        <file name="StubB/XQuery/NDG-ObsStnStubB.xquery"/> 
     23        <file name="StubB/XQuery/NDG-ObsStnStubBmoles.xquery"/> 
    2024        <file name="DIF/Schemae/dif9-4.xsd"/> 
    2125        <file name="ISO19115-WMO/TC211-WMO/wmo_examples/example1.xml"/> 
  • TI07-MOLES/trunk/v1Schema/Schemae/ndgmetadata1.3.xsd

    r1561 r1616  
    22<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by Kev O'Neill (CCLRC) --> 
    33<xs:schema targetNamespace="http://ndg.nerc.ac.uk/moles" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:moles="http://ndg.nerc.ac.uk/moles" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.03"> 
     4        <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="http://www.isotc211.org/2005/xlink/xlinks.xsd"/> 
    45        <!--version 1.03 of NDG metadata schema. Modifications from 1.02.05: 
    56                removal of dgDataObjectType 
     
    2021                        move current content of type into element dgSimpleLink 
    2122                        include dgCitation 
    22                 add description to dgGranuleSummary 
    23                          
     23                add optional description to dgGranuleSummary 
     24                 
    2425                change type of DQStatementReference to dgOnlineReferenceType 
    2526                        --> 
     
    12541255        </xs:complexType> 
    12551256        <xs:complexType name="dgOnlineReferenceType"> 
    1256                 <xs:complexContent> 
    1257                         <xs:extension base="moles:dgOnlineReferenceType"> 
    1258                                 <xs:sequence> 
    1259                                         <xs:element name="dgCitation" type="moles:dgCitationType" minOccurs="0"/> 
    1260                                         <xs:choice> 
    1261                                                 <xs:element name="dgSimpleLink" type="moles:dgSimpleLinkType"/> 
    1262                                                 <xs:element name="dgXLink"/> 
    1263                                         </xs:choice> 
    1264                                 </xs:sequence> 
    1265                         </xs:extension> 
    1266                 </xs:complexContent> 
     1257                <xs:sequence maxOccurs="1" minOccurs="1"> 
     1258                        <xs:element maxOccurs="1" minOccurs="0" type="moles:dgCitationType" name="dgCitation"> 
     1259                        </xs:element> 
     1260                        <xs:choice maxOccurs="1" minOccurs="1"> 
     1261                                <xs:element maxOccurs="1" minOccurs="1" name="dgSimpleLink" type="moles:dgSimpleLinkType"> 
     1262                                         
     1263                                </xs:element> 
     1264                                <xs:element name="dgXlink" type="xs:string"> 
     1265                                         
     1266                                </xs:element> 
     1267                        </xs:choice> 
     1268                </xs:sequence> 
    12671269        </xs:complexType> 
    12681270        <xs:complexType name="dgSimpleLinkType"> 
Note: See TracChangeset for help on using the changeset viewer.