Changeset 811
- Timestamp:
- 21/04/06 11:02:21 (15 years ago)
- Location:
- TI07-MOLES
- Files:
-
- 4 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TI07-MOLES/trunk/DIF/XQuery/NDG-DIF.xquery
r648 r811 1 for $DE in collection('/db/ndg_B_metadata')/dgMetadata/dgMetadataRecord[ dgDataEntity!='' and dgMetadataID/schemeIdentifier='NDG-B0' and dgMetadataID/repositoryIdentifier='repositoryID' and dgMetadataID/localIdentifier='localID']1 for $DE in collection('/db/ndg_B_metadata')/dgMetadata/dgMetadataRecord[exists('dgDataEntity') and dgMetadataID/schemeIdentifier='NDG-B0' and dgMetadataID/repositoryIdentifier='www.npm.ac.uk' and dgMetadataID/localIdentifier='recordID.0'] 2 2 return 3 3 <DIF> … … 5 5 <Entry_Title>{string($DE/name)}</Entry_Title> 6 6 <Parameters> 7 {for $StructuredKeyword in ($DE//(dgStructuredKeyword | dgStdParameterMeasured)) 8 where (($DE//(dgStructuredKeyword | dgStdParameterMeasured)/dgValidTermID/ParentListID='http://gcmd.gsfc.nasa.gov/Resources/valids/gcmd_parameters.html' or $DE//(dgStructuredKeyword | dgStdParameterMeasured)/dgValidTermID/ParentListID='http://gcmd.gsfc.nasa.gov/Resources/valids/projects.html') and ($DE//(dgStructuredKeyword | dgStdParameterMeasured)/ListLevel = 0)) 7 {for $StructuredKeyword in ($DE//(dgStructuredKeyword | dgStdParameterMeasured)[dgValidTermID/ParentListID='http://gcmd.gsfc.nasa.gov/Resources/valids/gcmd_parameters.html' and ListLevel = 0]) 9 8 return if (exists($StructuredKeyword/*/dgValidTerm)) then ( 10 9 <Parameter> 11 {string($StructuredKeyword/*/dgValidTerm)} 12 {if (exists($StructuredKeyword//dgValidSubterm) and $StructuredKeyword//dgValidSubterm != '' and $StructuredKeyword//dgValidSubterm != ' ') then ( 10 <Category>{string($StructuredKeyword/*/dgValidTerm)}</Category> 11 {if (exists($StructuredKeyword//dgValidSubterm) 12 and $StructuredKeyword//dgValidSubterm != '' 13 and $StructuredKeyword//dgValidSubterm != ' ') then ( 13 14 for $Subterm in $StructuredKeyword//dgValidSubterm[exists(dgValidTerm)] 14 15 where exists($Subterm/dgValidSubterm) 15 16 order by $Subterm/ListLevel 16 return concat(' > ', string($Subterm/dgValidSubterm/dgValidTerm)) 17 return 18 if ($Subterm/ListLevel=1) then (<Topic>{string($Subterm/dgValidSubterm/dgValidTerm)}</Topic>) 19 else ( 20 if ($Subterm/ListLevel=2) then (<Term>{string($Subterm/dgValidSubterm/dgValidTerm)}</Term>) 21 else ( 22 if ($Subterm/ListLevel=3) then (<Variable>{string($Subterm/dgValidSubterm/dgValidTerm)}</Variable>) 23 else ( 24 if ($Subterm/ListLevel=4) then (<Detailed_Variable>{string($Subterm/dgValidSubterm/dgValidTerm)}</Detailed_Variable>) 25 else (<GCMD_Science_Valid>{string($Subterm/dgValidSubterm/dgValidTerm)}</GCMD_Science_Valid>)))) 17 26 ) 18 27 else()} … … 22 31 } 23 32 </Parameters> 24 <ISO_Topic_Category> 25 </ISO_Topic_Category> 33 {for $ISOTopicCategory in ($DE/dgStructuredKeyword[dgValidTermID/ParentListID='ISO 19115 Topic Category']) 34 return 35 <ISO_Topic_Category>{$ISOTopicCategory/dgValidTerm}</ISO_Topic_Category> 36 } 26 37 {for $DataCuratorRole in $DE/dgDataEntity/dgDataRoles/dgDataCurator/dgRoleHolder[not(exists(endDate)) or endDate=''] 27 38 return … … 32 43 string(concat(string($DataCuratorRoleHolder/name/initials), ' ', string($DataCuratorRoleHolder/name/familyName))) 33 44 else if (exists($DataCuratorRole/dgOrganisationID)) then 34 for $DataCuratorRoleHolder in collection('/db/ndg_B_metadata')/dgMetadata/dgOrganisation[(dgMetadataID/schemeIdentifier='NDG-B0' and dgMetadataID/repositoryIdentifier=$DataCuratorRole/*/repositoryIdentifier and dgMetadataID/localIdentifier=$DataCuratorRole/*/localIdentifier)] 45 for $DataCuratorRoleHolder in collection('/db/ndg_B_metadata')/dgMetadata/dgOrganisation[(dgMetadataID/schemeIdentifier='NDG-B0' 46 and dgMetadataID/repositoryIdentifier=$DataCuratorRole/*/repositoryIdentifier 47 and dgMetadataID/localIdentifier=$DataCuratorRole/*/localIdentifier)] 35 48 return 36 49 string($DataCuratorRoleHolder/name) … … 43 56 <Metadata_Version>9.4</Metadata_Version> 44 57 </DIF> 58 (: Stylus Studio meta-information - (c) 2004-2005. Progress Software Corporation. All rights reserved. 59 <metaInformation> 60 <scenarios ><scenario default="yes" name="StubB" userelativepaths="yes" externalpreview="no" url="..\..\..\..\..\..\..\My Documents\ndgBXML\ndgB.xml" outputurl="" processortype="saxon" tcpport="2233" profilemode="7" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" host="" port="8000" user="" password=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition></MapperMetaTag> 61 </metaInformation> 62 :)
Note: See TracChangeset
for help on using the changeset viewer.