source: TI07-MOLES/trunk/DIF/XQuery/NDG-DIF.xquery @ 326

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI07-MOLES/trunk/DIF/XQuery/NDG-DIF.xquery@549
Revision 326, 3.2 KB checked in by ko23, 14 years ago (diff)

* empty log message *

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1for $DE in //dgMetadataRecord[dgDataEntity!='' and dgMetadataID/schemeIdentifier='NDG-B0' and dgMetadataID/repositoryIdentifier='badc.nerc.ac.uk' and dgMetadataID/localIdentifier='dataent2']
2return
3        <DIF>
4        <Entry_ID>{concat($DE/dgMetadataID/repositoryIdentifier, ':DC:', $DE/dgMetadataID/localIdentifier)}</Entry_ID>
5        <Entry_Title>{string($DE/name)}</Entry_Title>
6        <Parameters>
7        </Parameters>
8        <ISO_Topic_Category>
9        </ISO_Topic_Category>
10        {for $DataCuratorRole in $DE/dgDataEntity/dgDataRoles/dgDataCurator/dgRoleHolder[empty(endDate)]
11        order by $DataCuratorRole/startDate empty least
12        return
13                for $DataCuratorRoleHolder in /*/(dgOrganisation | dgPerson)[((not(exists($DataCuratorRole/endDate)) or empty($DataCuratorRole/endDate)) and dgMetadataID/schemeIdentifier='NDG-B0' and dgMetadataID/repositoryIdentifier=$DataCuratorRole/*/repositoryIdentifier and dgMetadataID/localIdentifier=$DataCuratorRole/*/localIdentifier)]
14                return
15                <Data_Center>
16                {if (string(local-name($DataCuratorRoleHolder))='dgOrganisation') then
17                        (string($DataCuratorRoleHolder/name))
18                else if (string(local-name($DataCuratorRoleHolder))='dgPerson') then
19                        (string(concat(string($DataCuratorRoleHolder/name/initials), ' ', string($DataCuratorRoleHolder/name/familyName))))
20                else ('empty content')}
21                </Data_Center>}
22        <Summary>{string($DE/dgMetadataDescription/abstract/abstractText)}</Summary>
23        <Metadata_Name>[CEOS IDN DIF]</Metadata_Name>
24        <Metadata_Version>9.4</Metadata_Version>
25        </DIF>
26(: Stylus Studio meta-information - (c) 2004-2005. Progress Software Corporation. All rights reserved.
27<metaInformation>
28<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" ><SourceSchema srcSchemaPath="..\..\..\Project File Archive\NERC DataGRID\MetadataModelv1a\ndgmetadata.xsd" srcSchemaRoot="dgMetadata" AssociatedInstance="" loaderFunction="document" loaderFunctionUsesURI="no"/></MapperInfo><MapperBlockPosition><template name="xquery_body"><block path="flwr" x="220" y="18"/><block path="flwr/dgMetadataRecord/dgDataEntity/dgDataRoles/dgDataCreator/flwr" x="140" y="126"/><block path="flwr/dgMetadataRecord/dgDataEntity/dgDataRoles/dgDataCurator/flwr" x="180" y="162"/><block path="flwr/dgMetadataRecord/dgDataEntity/flwr" x="220" y="180"/><block path="flwr/dgMetadataRecord/dgDataEntity/flwr/RelatedDeployment/flwr" x="260" y="198"/><block path="flwr/dgMetadataRecord/dgDataEntity/flwr/RelatedDeployment/flwr[1]" x="260" y="109"/><block path="flwr/dgMetadataRecord/dgDataEntity/flwr/RelatedDeployment/flwr[2]" x="180" y="109"/><block path="flwr/dgMetadataRecord/dgDataEntity/flwr[1]" x="220" y="109"/></template></MapperBlockPosition></MapperMetaTag>
29</metaInformation>
30:)
Note: See TracBrowser for help on using the repository browser.