1 | declare default element namespace 'http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/'; |
---|
2 | declare namespace xsi='http://www.w3.org/2001/XMLSchema-instance'; |
---|
3 | declare namespace moles='http://ndg.nerc.ac.uk/moles'; |
---|
4 | declare namespace f='http://ndg.nerc.ac.uk/moles/localfunctions'; |
---|
5 | |
---|
6 | (: |
---|
7 | Updated descriptionSection to use from URI to URL in moles doc.. can now return links.. |
---|
8 | SJD 13/10/08 |
---|
9 | :) |
---|
10 | |
---|
11 | (: Keep this in official lib version :) |
---|
12 | declare variable $targetCollection as xs:string := 'TargetCollection'; |
---|
13 | declare variable $repositoryIdentifier as xs:string := 'RepositoryID'; |
---|
14 | declare variable $localIdentifier as xs:string := 'LocalID'; |
---|
15 | |
---|
16 | (: Keep |
---|
17 | declare variable $targetCollection as xs:string := '/db/ndg_B_metadata'; |
---|
18 | declare variable $repositoryIdentifier as xs:string := 'badc.nerc.ac.uk'; |
---|
19 | declare variable $localIdentifier as xs:string := 'dataent_CIRA'; |
---|
20 | :) |
---|
21 | |
---|
22 | |
---|
23 | for $DE in collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord[ |
---|
24 | exists('moles:dgDataEntity') |
---|
25 | and moles:dgMetadataID/moles:schemeIdentifier='NDG-B0' |
---|
26 | and moles:dgMetadataID/moles:repositoryIdentifier=$repositoryIdentifier |
---|
27 | and moles:dgMetadataID/moles:localIdentifier=$localIdentifier] |
---|
28 | return |
---|
29 | element DIF { |
---|
30 | attribute xsi:schemaLocation {'http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/ http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/dif_v9.4.xsd'}, |
---|
31 | element Entry_ID {concat($DE/moles:dgMetadataID/moles:repositoryIdentifier, ':DIF:', $DE/moles:dgMetadataID/moles:localIdentifier)}, |
---|
32 | element Entry_Title {string($DE/moles:name)}, |
---|
33 | element Data_Set_Citation { |
---|
34 | for $DataCreatorRole in $DE/moles:dgDataEntity/moles:dgDataRoles/moles:dgDataCreator/moles:dgRoleHolder[not(exists(moles:endDate)) or moles:endDate=''][1] |
---|
35 | return |
---|
36 | for $DataCreatorRoleHolder in collection($targetCollection)/moles:dgMetadata/*[(moles:dgMetadataID/moles:schemeIdentifier='NDG-B0' |
---|
37 | and moles:dgMetadataID/moles:repositoryIdentifier=$DataCreatorRole/*/moles:repositoryIdentifier |
---|
38 | and moles:dgMetadataID/moles:localIdentifier=$DataCreatorRole/*/moles:localIdentifier)] |
---|
39 | return |
---|
40 | element Dataset_Creator { |
---|
41 | if (exists($DataCreatorRoleHolder/moles:name/moles:initials)) then |
---|
42 | string(concat(string($DataCreatorRoleHolder/moles:name/moles:initials), ' ', string($DataCreatorRoleHolder/moles:name/moles:familyName))) |
---|
43 | else |
---|
44 | string($DataCreatorRoleHolder/moles:abbreviation) |
---|
45 | }, |
---|
46 | element Dataset_Title {string($DE/moles:name)} |
---|
47 | }, |
---|
48 | element Personnel |
---|
49 | {element Role {''}, |
---|
50 | element Last_Name {''} |
---|
51 | }, |
---|
52 | element Discipline { element Discipline_Name {''} }, |
---|
53 | for $StructuredKeyword in ($DE//(moles:dgStructuredKeyword | moles:dgStdParameterMeasured)[moles:dgValidTermID/moles:ParentListID='http://gcmd.gsfc.nasa.gov/Resources/valids/gcmd_parameters.html' and moles:ListLevel = 0]) |
---|
54 | return if (exists($StructuredKeyword/*/moles:dgValidTerm)) then |
---|
55 | element Parameters { |
---|
56 | element Category {string($StructuredKeyword/*/moles:dgValidTerm)}, |
---|
57 | if (exists($StructuredKeyword//moles:dgValidSubterm) |
---|
58 | and $StructuredKeyword//moles:dgValidSubterm != '' |
---|
59 | and $StructuredKeyword//moles:dgValidSubterm != ' ') then |
---|
60 | for $Subterm in $StructuredKeyword//moles:dgValidSubterm[exists(moles:dgValidTerm)] |
---|
61 | where exists($Subterm/moles:dgValidSubterm) |
---|
62 | order by $Subterm/moles:ListLevel |
---|
63 | return |
---|
64 | if ($Subterm/moles:ListLevel=1) then element Topic {string($Subterm/moles:dgValidSubterm/moles:dgValidTerm)} |
---|
65 | else if ($Subterm/moles:ListLevel=2) then element Term {string($Subterm/moles:dgValidSubterm/moles:dgValidTerm)} |
---|
66 | else if ($Subterm/moles:ListLevel=3) then element Variable {string($Subterm/moles:dgValidSubterm/moles:dgValidTerm)} |
---|
67 | else if ($Subterm/moles:ListLevel=4) then element Detailed_Variable {string($Subterm/moles:dgValidSubterm/moles:dgValidTerm)} |
---|
68 | else element GCMD_Science_Valid {string($Subterm/moles:dgValidSubterm/moles:dgValidTerm)} |
---|
69 | else () |
---|
70 | } |
---|
71 | else (), |
---|
72 | (: Parameters - this is fail safe :) |
---|
73 | element Parameters { element Category {''}, element Topic {''}, element Term {''} }, |
---|
74 | |
---|
75 | (: ISOTopic subcategory :) |
---|
76 | for $ISOTopicCategory in ($DE/moles:dgStructuredKeyword[moles:dgValidTermID/moles:ParentListID='http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_TopicCategoryCode']) |
---|
77 | return |
---|
78 | element ISO_Topic_Category {string($ISOTopicCategory/moles:dgValidTerm)}, |
---|
79 | |
---|
80 | (: ok from here :) |
---|
81 | for $Keyword in distinct-values($DE//moles:dgStructuredKeyword[ |
---|
82 | moles:dgValidTermID/moles:ParentListID!='http://gcmd.gsfc.nasa.gov/Resources/valids/gcmd_parameters.html' |
---|
83 | and |
---|
84 | moles:dgValidTermID/moles:ParentListID!='http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_TopicCategoryCode' |
---|
85 | ]/moles:dgValidTerm) |
---|
86 | |
---|
87 | return element Keyword {string($Keyword)}, |
---|
88 | for $DepDPT in ($DE/moles:dgDataEntity/moles:RelatedDeployment/moles:DataProductionToolID) |
---|
89 | return |
---|
90 | element Sensor_Name { |
---|
91 | for $DepDPTAbbrev in distinct-values((collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepDPT/moles:repositoryIdentifier and moles:localIdentifier=$DepDPT/moles:localIdentifier]]/moles:abbreviation)) |
---|
92 | return element Short_Name {data($DepDPTAbbrev)}, |
---|
93 | for $DepDPTName in distinct-values((collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepDPT/moles:repositoryIdentifier and moles:localIdentifier=$DepDPT/moles:localIdentifier]]/moles:name)) |
---|
94 | return element Long_Name {data($DepDPTName)} |
---|
95 | }, |
---|
96 | for $DepObsStn in ($DE/moles:dgDataEntity/moles:RelatedDeployment/moles:ObservationStationID) |
---|
97 | return |
---|
98 | element Source_Name { |
---|
99 | for $DepObsStnAbbrev in distinct-values((collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepObsStn/moles:repositoryIdentifier and moles:localIdentifier=$DepObsStn/moles:localIdentifier]]/moles:abbreviation)) |
---|
100 | return element Short_Name {data($DepObsStnAbbrev)}, |
---|
101 | for $DepObsStnName in distinct-values((collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepObsStn/moles:repositoryIdentifier and moles:localIdentifier=$DepObsStn/moles:localIdentifier]]/moles:name)) |
---|
102 | return element Long_Name {data($DepObsStnName)} |
---|
103 | }, |
---|
104 | for $TemporalRange in $DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataCoverage/(moles:dgTemporalCoverage | moles:dgSpatioTemporalCoverage/moles:dgSpatioTemporalRange/moles:dgTemporalCoverage)/moles:DateRange |
---|
105 | return |
---|
106 | element Temporal_Coverage |
---|
107 | { |
---|
108 | element Start_Date {data($TemporalRange/moles:DateRangeStart)}, |
---|
109 | element Stop_Date {data($TemporalRange/moles:DateRangeEnd)} |
---|
110 | }, |
---|
111 | for $TemporalTerm in ($DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataCoverage//moles:dgArea/moles:dgValidTerm) |
---|
112 | return element Paleo_Temporal_Coverage {element Chronostratigraphic_Unit {data($TemporalTerm)}}, |
---|
113 | for $Data_Set_Progress in ($DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataStatus/moles:dgDatasetClosure) |
---|
114 | return element Data_Set_Progress {data($Data_Set_Progress)}, |
---|
115 | for $BoundingBox in ($DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataCoverage//moles:BoundingBox) |
---|
116 | return |
---|
117 | element Spatial_Coverage { |
---|
118 | element Southernmost_Latitude {data($BoundingBox/moles:LimitSouth)}, |
---|
119 | element Northernmost_Latitude {data($BoundingBox/moles:LimitNorth)}, |
---|
120 | element Westernmost_Longitude {data($BoundingBox/moles:LimitWest)}, |
---|
121 | element Easternmost_Longitude {data($BoundingBox/moles:LimitEast)} |
---|
122 | }, |
---|
123 | for $Location in ($DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataCoverage//moles:dgArea[moles:dgValidTermID/moles:ParentListID='http://gcmd.gsfc.nasa.gov/Resources/valids/gcmd_locations.html']) |
---|
124 | return element Location {$Location}, |
---|
125 | element Data_Resolution {''}, |
---|
126 | for $DepAct in ($DE/moles:dgDataEntity/moles:RelatedDeployment/moles:ActivityID) |
---|
127 | return |
---|
128 | element Project { |
---|
129 | for $DepActAbbrev in distinct-values(collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepAct/moles:repositoryIdentifier and moles:localIdentifier=$DepAct/moles:localIdentifier]]/moles:abbreviation) |
---|
130 | return |
---|
131 | element Short_Name {data($DepActAbbrev)}, |
---|
132 | for $DepActName in distinct-values(collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord[moles:dgMetadataID[moles:schemeIdentifier='NDG-B0' and moles:repositoryIdentifier=$DepAct/moles:repositoryIdentifier and moles:localIdentifier=$DepAct/moles:localIdentifier]]/moles:name) |
---|
133 | return |
---|
134 | element Long_Name {data($DepActName)} |
---|
135 | }, |
---|
136 | element Quality {''}, |
---|
137 | if (exists($DE/moles:dgDataEntity/moles:dgDataGranule/moles:accessControlPolicy)) then |
---|
138 | for $DG in $DE/moles:dgDataEntity/moles:dgDataGranule |
---|
139 | return |
---|
140 | element Access_Constraints { |
---|
141 | if (exists($DG/moles:dgGranuleSummary/moles:dgGranuleName)) then |
---|
142 | concat('For data granule ', $DG/moles:dgGranuleSummary/moles:dgGranuleName, ': ') |
---|
143 | else (), |
---|
144 | if (exists($DG/moles:accessControlPolicy/moles:accessControlPolicyURL)) then |
---|
145 | concat('See access control policy at ', encode-for-uri($DG/moles:accessControlPolicy/moles:accessControlPolicyURL)) |
---|
146 | else if (exists($DG/moles:accessControlPolicy/moles:accessControlPolicyText)) then |
---|
147 | data($DG/moles:accessControlPolicy/moles:accessControlPolicyText) |
---|
148 | else |
---|
149 | for $securityCondition in $DG/moles:accessControlPolicy/moles:dgSecurityCondition |
---|
150 | return |
---|
151 | if (exists($securityCondition/moles:conditionExplanationText)) then |
---|
152 | concat('Effect: ', data($securityCondition/moles:effect), ' - ', data($securityCondition/moles:conditionExplanationText)) |
---|
153 | else concat('Effect: ', data($securityCondition/moles:effect), 'needs ', data($securityCondition/moles:attauthRole), ' from ', data($securityCondition/moles:dgAttributeAuthority)) |
---|
154 | } |
---|
155 | else (), |
---|
156 | element Use_Constraints {''}, |
---|
157 | element Data_Set_Language {''}, |
---|
158 | if (exists($DE/moles:dgDataEntity/moles:dgDataRoles/moles:dgDataCreator/moles:dgRoleHolder)) then |
---|
159 | for $DataCreatorRole in $DE/moles:dgDataEntity/moles:dgDataRoles/moles:dgDataCreator/moles:dgRoleHolder |
---|
160 | order by $DataCreatorRole/moles:startDate empty least |
---|
161 | return |
---|
162 | for $DataCreatorRoleHolder in collection($targetCollection)/moles:dgMetadata/(moles:dgOrganisation | moles:dgPerson) |
---|
163 | [(moles:dgMetadataID/moles:schemeIdentifier='NDG-B0' |
---|
164 | and moles:dgMetadataID/moles:repositoryIdentifier=$DataCreatorRole/(moles:dgOrganisationID | moles:dgPersonID)/moles:repositoryIdentifier |
---|
165 | and moles:dgMetadataID/moles:localIdentifier=$DataCreatorRole/(moles:dgOrganisationID | moles:dgPersonID)/moles:localIdentifier)] |
---|
166 | return |
---|
167 | element Originating_Center { |
---|
168 | if (string(local-name($DataCreatorRoleHolder))='dgOrganisation') then |
---|
169 | (string($DataCreatorRoleHolder/moles:name)) |
---|
170 | else if (string(local-name($DataCreatorRoleHolder))='dgPerson') then |
---|
171 | (string(concat(string($DataCreatorRoleHolder/moles:name/moles:initials), ' ', string($DataCreatorRoleHolder/moles:name/moles:familyName)))) |
---|
172 | else ('empty content') |
---|
173 | } |
---|
174 | else (), |
---|
175 | (: Data Centre fail safe code in here.. somewhere :) |
---|
176 | for $DataCuratorRole in $DE/moles:dgDataEntity/moles:dgDataRoles/moles:dgDataCurator/moles:dgRoleHolder[not(exists(moles:endDate)) or moles:endDate=''] |
---|
177 | return |
---|
178 | for $DataCuratorRoleHolder in collection($targetCollection)/moles:dgMetadata/*[(moles:dgMetadataID/moles:schemeIdentifier='NDG-B0' |
---|
179 | and moles:dgMetadataID/moles:repositoryIdentifier=$DataCuratorRole/*/moles:repositoryIdentifier |
---|
180 | and moles:dgMetadataID/moles:localIdentifier=$DataCuratorRole/*/moles:localIdentifier)] |
---|
181 | return |
---|
182 | element Data_Center { |
---|
183 | element Data_Center_Name { |
---|
184 | element Short_Name { |
---|
185 | if (exists($DataCuratorRoleHolder/moles:name/moles:initials)) then |
---|
186 | string(concat(string($DataCuratorRoleHolder/moles:name/moles:initials), ' ', string($DataCuratorRoleHolder/moles:name/moles:familyName))) |
---|
187 | else |
---|
188 | string($DataCuratorRoleHolder/moles:abbreviation) |
---|
189 | }, |
---|
190 | element Long_Name { |
---|
191 | if (exists($DataCuratorRoleHolder/moles:name/moles:initials)) then |
---|
192 | string(concat(string($DataCuratorRoleHolder/moles:name/moles:initials), ' ', string($DataCuratorRoleHolder/moles:name/moles:familyName))) |
---|
193 | else string($DataCuratorRoleHolder/moles:name) |
---|
194 | } |
---|
195 | }, |
---|
196 | if (exists($DataCuratorRoleHolder/moles:contactDetails/moles:URI)) then |
---|
197 | element Data_Center_URL {data($DataCuratorRoleHolder/moles:contactDetails/moles:URI)} |
---|
198 | else (), |
---|
199 | for $DGID in $DE/moles:dgDataEntity/moles:dgDataGranule/moles:dataModelID |
---|
200 | return |
---|
201 | element Data_Set_ID {concat($DGID/moles:repositoryIdentifier, ':', $DGID/moles:schemeIdentifier, ':', $DGID/moles:localIdentifier)}, |
---|
202 | element Personnel { |
---|
203 | element Role {'Data Center Contact'}, |
---|
204 | if (exists($DataCuratorRoleHolder/name/knownAs)) then |
---|
205 | element First_Name {string($DataCuratorRoleHolder/moles:name/moles:knownAs)} |
---|
206 | else if (exists($DataCuratorRoleHolder/moles:name/moles:initials)) then |
---|
207 | element First_Name {string($DataCuratorRoleHolder/moles:name/moles:initials)} |
---|
208 | else (), |
---|
209 | element Last_Name { |
---|
210 | if (exists($DataCuratorRoleHolder/moles:name/moles:familyName)) then |
---|
211 | string($DataCuratorRoleHolder/moles:name/moles:familyName) |
---|
212 | else string($DataCuratorRoleHolder/moles:name) |
---|
213 | }, |
---|
214 | if (exists($DataCuratorRole/moles:contactDetails/moles:eMail)) then |
---|
215 | element Email {string($DataCuratorRole/moles:contactDetails/moles:eMail)} |
---|
216 | else |
---|
217 | if (exists($DataCuratorRoleHolder/contactDetails/eMail)) then |
---|
218 | (element Email {string($DataCuratorRoleHolder/moles:contactDetails/moles:eMail)}) |
---|
219 | else (), |
---|
220 | if (exists($DataCuratorRole/moles:contactDetails/moles:telephone)) then |
---|
221 | element Phone {string($DataCuratorRole/moles:contactDetails/moles:telephone)} |
---|
222 | else if (exists($DataCuratorRoleHolder/moles:contactDetails/moles:telephone)) then |
---|
223 | element Phone {string($DataCuratorRoleHolder/moles:contactDetails/moles:telephone)} |
---|
224 | else (), |
---|
225 | if (exists($DataCuratorRole/moles:contactDetails/moles:fax)) then |
---|
226 | element Fax {string($DataCuratorRole/moles:contactDetails/moles:fax)} |
---|
227 | else if (exists($DataCuratorRoleHolder/moles:contactDetails/moles:fax)) then |
---|
228 | element Fax {string($DataCuratorRoleHolder/moles:contactDetails/moles:fax)} |
---|
229 | else (), |
---|
230 | if (exists($DataCuratorRole/moles:contactDetails/moles:address)) then |
---|
231 | element Contact_Address { |
---|
232 | for $addressline in $DataCuratorRole/moles:contactDetails/moles:address/moles:addressline |
---|
233 | return element Address {data($addressline)}, |
---|
234 | if (exists($DataCuratorRole/moles:contactDetails/moles:address/moles:city)) then |
---|
235 | element City {string($DataCuratorRole/moles:contactDetails/moles:address/moles:city)} |
---|
236 | else (), |
---|
237 | if (exists($DataCuratorRole/moles:contactDetails/moles:address/moles:postcode)) then |
---|
238 | element Postal_Code {string($DataCuratorRole/moles:contactDetails/moles:address/moles:postcode)} |
---|
239 | else (), |
---|
240 | if (exists($DataCuratorRole/moles:contactDetails/moles:address/moles:country)) then |
---|
241 | element Country {string($DataCuratorRole/moles:contactDetails/moles:address/moles:country)} |
---|
242 | else () |
---|
243 | } |
---|
244 | else if (exists($DataCuratorRoleHolder/moles:contactDetails/moles:address)) then |
---|
245 | element Contact_Address { |
---|
246 | for $addressline in $DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:addressline |
---|
247 | return element Address {data($addressline)}, |
---|
248 | if (exists($DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:city)) then |
---|
249 | element City {string($DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:city)} |
---|
250 | else (), |
---|
251 | if (exists($DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:postcode)) then |
---|
252 | element Postal_Code {string($DataCuratorRole/moles:contactDetails/moles:postcode)} |
---|
253 | else (), |
---|
254 | if (exists($DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:country)) then |
---|
255 | element Country {string($DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:country)} |
---|
256 | else () |
---|
257 | } |
---|
258 | else () |
---|
259 | } |
---|
260 | }, |
---|
261 | (: fail safe... :) |
---|
262 | element Data_Center { |
---|
263 | element Data_Center_Name { element Short_Name {''} }, |
---|
264 | element Personnel { element Role {''}, element Last_Name {''} } |
---|
265 | }, |
---|
266 | element Distribution {''}, |
---|
267 | element Multimedia_Sample {''}, |
---|
268 | element Reference {''}, |
---|
269 | element Summary {string($DE/moles:dgMetadataDescription/moles:abstract/moles:abstractText)}, |
---|
270 | for $DG in $DE/moles:dgDataEntity/moles:dgDataGranule |
---|
271 | (: BNL need to make sure we have a function for doing related URLs :) |
---|
272 | return |
---|
273 | if ($DG/moles:dataModelID/moles:schemeIdentifier='NDG-A0') then |
---|
274 | () |
---|
275 | else if ($DG/moles:dataModelID/moles:schemeIdentifier='URI') then |
---|
276 | element Related_URL { |
---|
277 | element URL {data($DG/moles:instance/moles:URI)}, |
---|
278 | if (exists($DG/moles:instance/moles:instanceComment)) then |
---|
279 | element Description {data($DG/moles:instance/moles:instanceComment)} |
---|
280 | else |
---|
281 | element Description {'URL to aid in delivering data. Note that this may point directly to the data or, more likely, point to the web site of the curator.'} |
---|
282 | } |
---|
283 | else (), |
---|
284 | for $RelURL_Desc in ($DE/moles:dgMetadataDescription/moles:descriptionSection/moles:descriptionOnlineReference) |
---|
285 | return |
---|
286 | element Related_URL { |
---|
287 | (:element URL {data($RelURL_Desc)}, this bit just loops through everything in the xpath and conmcats it -just as I thought -put in mroe structure! |
---|
288 | element URL {data($DE/moles:dgMetadataDescription/moles:descriptionSection/moles:descriptionOnlineReference/moles:dgSimpleLink/moles:URI)},:) |
---|
289 | |
---|
290 | element URL {data($RelURL_Desc/moles:dgSimpleLink/moles:URL)}, |
---|
291 | |
---|
292 | (: According to Sue, the description can be the standard definition as served by the NDG vocalb server :) |
---|
293 | element Description {data($RelURL_Desc/moles:dgSimpleLink/moles:name)} |
---|
294 | }, |
---|
295 | element Parent_DIF {''}, |
---|
296 | element IDN_Node { element Short_Name {''} }, |
---|
297 | element Originating_Metadata_Node {''}, |
---|
298 | element Metadata_Name {'[CEOS IDN DIF]'}, |
---|
299 | element Metadata_Version {'9.4'}, |
---|
300 | if (exists($DE/moles:dgMetadataProvenance/moles:RecordCreation)) then |
---|
301 | element DIF_Creation_Date {data($DE/moles:dgMetadataProvenance/moles:RecordCreation/moles:CreatedDate)} |
---|
302 | else (), |
---|
303 | for $MDUpdt in $DE/moles:dgMetadataProvenance/moles:RecordUpdate |
---|
304 | return |
---|
305 | element DIF_Revision_History {concat(data($MDUpdt/moles:UpdateDate), ' - ', data($MDUpdt/moles:UpdateSummary), ' - ', data($MDUpdt/moles:UpdatedBy))}, |
---|
306 | if (exists($DE/moles:dgMetadataProvenance/moles:RecordReview)) then |
---|
307 | element Future_DIF_Review_Date {data($DE/moles:dgMetadataProvenance/moles:RecordReview/moles:ReviewDate)} |
---|
308 | else () |
---|
309 | } (: </DIF> :) |
---|