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

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

Temporal output from mini-MOLES to DIF enabled (see #680)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1import module namespace voclib='http://ndg.nerc.ac.uk/xquery/lib/vocab' at 'xmldb:exist:///db/xqueryLib/Vocabs/vocab_xquery_lib.xquery';
2import module namespace utillib='http://ndg.nerc.ac.uk/xquery/lib/utilities' at 'xmldb:exist:///db/xqueryLib/Utilities/utility_xquery_lib.xquery';
3declare default element namespace 'http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/';
4declare namespace xsi='http://www.w3.org/2001/XMLSchema-instance';
5declare namespace moles='http://ndg.nerc.ac.uk/moles';
6(: Keep
7declare variable $targetCollection as xs:string {'TargetCollection'};
8declare variable $repositoryIdentifier as xs:string {'RepositoryID'};
9declare variable $localIdentifier as xs:string {'LocalID'};
10:)
11declare variable $targetCollection as xs:string {'/db/discovery'};
12declare variable $repositoryIdentifier as xs:string {'grid.bodc.nerc.ac.uk'};
13declare variable $localIdentifier as xs:string {'neodc.nerc.ac.uk:DIF:NEODC_NCAVEO_LCM2000'};
14
15for $DE in collection($targetCollection)/moles:dgMetadata/moles:dgMetadataRecord[
16        exists('moles:dgDataEntity')
17        and moles:dgMetadataID/moles:schemeIdentifier='NDG-B0'
18        and moles:dgMetadataID/moles:repositoryIdentifier=$repositoryIdentifier
19        and moles:dgMetadataID/moles:localIdentifier=$localIdentifier]
20        return
21element DIF {
22        attribute xsi:schemaLocation {'http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/ http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/dif_v9.4.xsd'},
23        element Entry_ID {concat($DE/moles:dgMetadataID/moles:repositoryIdentifier, $utillib:moles_id_separator, 'DIF', $utillib:moles_id_separator, $DE/moles:dgMetadataID/moles:localIdentifier)},
24        element Entry_Title {string($DE/moles:name)},
25        element Data_Set_Citation {
26            for $DataCreatorRole in $DE/moles:dgDataEntity/moles:dgDataRoles/moles:dgDataCreator/moles:dgRoleHolder[not(exists(moles:endDate)) or moles:endDate=''][1]
27                return
28                    for $DataCreatorRoleHolder in collection($targetCollection)/moles:dgMetadata/*[(moles:dgMetadataID/moles:schemeIdentifier='NDG-B0'
29                               and moles:dgMetadataID/moles:repositoryIdentifier=$DataCreatorRole/*/moles:repositoryIdentifier
30                               and moles:dgMetadataID/moles:localIdentifier=$DataCreatorRole/*/moles:localIdentifier)]
31                        return
32                            element Dataset_Creator {
33                                if (exists($DataCreatorRoleHolder/moles:name/moles:initials)) then
34                                    string(concat(string($DataCreatorRoleHolder/moles:name/moles:initials), ' ', string($DataCreatorRoleHolder/moles:name/moles:familyName)))
35                                else
36                                   string($DataCreatorRoleHolder/moles:abbreviation)
37                                },
38            element Dataset_Title {string($DE/moles:name)}
39        },
40        for $StructuredKeyword in ($DE//(moles:dgStructuredKeyword | moles:dgStdParameterMeasured)[(voclib:spot-vocab($voclib:gcmd_science_valids, moles:dgValidTermID/moles:ParentListID) or voclib:spot-vocab($voclib:gcmd_science_valids_correct, moles:dgValidTermID/moles:ParentListID) or voclib:spot-vocab($voclib:gcmd_science_valids_categories, moles:dgValidTermID/moles:ParentListID))]
41        )
42                return if (exists($StructuredKeyword/*/moles:dgValidTerm)) then
43                    element Parameters {
44                        element Category {string($StructuredKeyword/*/moles:dgValidTerm)},
45                        if (exists($StructuredKeyword//moles:dgValidSubterm)
46                                and $StructuredKeyword//moles:dgValidSubterm != ''
47                                and $StructuredKeyword//moles:dgValidSubterm != ' ') then
48                        for $Subterm in $StructuredKeyword//moles:dgValidSubterm[exists(moles:dgValidTerm)]
49                            where exists($Subterm/moles:dgValidSubterm)
50                            order by $Subterm/moles:ListLevel
51                                return
52                                        if ($Subterm/moles:ListLevel=1) then element Topic {string($Subterm/moles:dgValidSubterm/moles:dgValidTerm)}
53                                        else if ($Subterm/moles:ListLevel=2) then element Term {string($Subterm/moles:dgValidSubterm/moles:dgValidTerm)}
54                                        else if ($Subterm/moles:ListLevel=3) then element Variable {string($Subterm/moles:dgValidSubterm/moles:dgValidTerm)}
55                                        else if ($Subterm/moles:ListLevel=4) then element Detailed_Variable {string($Subterm/moles:dgValidSubterm/moles:dgValidTerm)}
56                                        else element GCMD_Science_Valid {string($Subterm/moles:dgValidSubterm/moles:dgValidTerm)}
57                        else()
58                    }
59                else(),
60        for $StructuredKeyword in ($DE//(moles:dgStructuredKeyword | moles:dgDataEntity/moles:dgDataSummary/moles:dgParameterSummary/moles:dgStdParameterMeasured)[voclib:spot-vocab($voclib:gcmd_science_valids, moles:dgValidTermID/moles:ParentListID) or voclib:spot-vocab($voclib:gcmd_science_valids_correct, moles:dgValidTermID/moles:ParentListID) or voclib:spot-vocab($voclib:gcmd_science_valids_deprecated, moles:dgValidTermID/moles:ParentListID) and (not(exists(moles:ListLevel)) or moles:ListLevel=0)])
61        return
62                element Parameters {data($StructuredKeyword/moles:dgValidTerm)},
63        for $ISOTopicCategory in ($DE/moles:dgStructuredKeyword[voclib:spot-vocab($voclib:iso_topic_list, moles:dgValidTermID/moles:ParentListID)])
64            return
65                element ISO_Topic_Category {string($ISOTopicCategory/moles:dgValidTerm)},
66        for $Keyword in distinct-values($DE//moles:dgStructuredKeyword[
67        not (voclib:spot-vocab($voclib:iso_topic_list, moles:dgValidTermID/moles:ParentListID)
68        or voclib:spot-vocab($voclib:gcmd_science_valids, moles:dgValidTermID/moles:ParentListID)
69        or voclib:spot-vocab($voclib:gcmd_science_valids_correct, moles:dgValidTermID/moles:ParentListID)
70        )]/moles:dgValidTerm)
71        return element Keyword {string($Keyword)},
72        for $DepDPT in ($DE/moles:dgDataEntity/moles:RelatedDeployment/moles:DataProductionToolID) 
73        return
74            element Sensor_Name {
75                for $DepDPTAbbrev in ((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))
76                    return element Short_Name {data($DepDPTAbbrev)},
77                for $DepDPTName in ((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))
78                    return element Long_Name {data($DepDPTName)}
79                },
80        for $DepObsStn in ($DE/moles:dgDataEntity/moles:RelatedDeployment/moles:ObservationStationID)
81        return
82            element Source_Name {
83                for $DepObsStnAbbrev in ((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))
84                    return element Short_Name {data($DepObsStnAbbrev)},
85                for $DepObsStnName in ((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))
86                    return element Long_Name {data($DepObsStnName)}
87                },
88        for $TemporalRange in ($DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataCoverage//moles:DateRange)
89                return
90                    element Temporal_Coverage
91                        {
92                        element Start_Date {data($TemporalRange/moles:DateRangeStart)},
93                        element End_Date {data($TemporalRange/moles:DateRangeEnd)}
94                        },
95        for $TemporalTerm in ($DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataCoverage//moles:dgArea[voclib:spot-vocab($voclib:gcmd_chronostratigraphic_valids, moles:dgValidTermID/moles:ParentListID)]/moles:dgValidTerm)
96                return element Paleo_Temporal_Coverage {element Chronostratigraphic_Unit {data($TemporalTerm)}},
97        for $Data_Set_Progress in ($DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataStatus/moles:dgDatasetClosure)
98                return element Data_Set_Progress {data($Data_Set_Progress)},
99        for $BoundingBox in ($DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataCoverage//moles:BoundingBox)
100        return
101            element Spatial_Coverage {
102                    element Southernmost_Latitude {data($BoundingBox/moles:LimitSouth)},
103                    element Northernmost_Latitude {data($BoundingBox/moles:LimitNorth)},
104                    element Westernmost_Longitude {data($BoundingBox/moles:LimitWest)},
105                    element Easternmost_Longitude {data($BoundingBox/moles:LimitEast)}
106                },
107        for $Location in ($DE/moles:dgDataEntity/moles:dgDataSummary/moles:dgDataCoverage//moles:dgArea[voclib:spot-vocab($voclib:gcmd_location_valids, moles:dgValidTermID/moles:ParentListID)])
108                return element Location {data($Location/moles:dgValidTerm)},
109        for $DepAct in ($DE/moles:dgDataEntity/moles:RelatedDeployment/moles:ActivityID)
110        return
111            element Project {
112                for $DepActAbbrev in (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)
113                    return
114                        element Short_Name {data($DepActAbbrev)},
115                for $DepActName in (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)
116                    return
117                        element Long_Name {data($DepActName)}
118                },
119        if (exists($DE/moles:dgDataEntity/moles:dgDataGranule/moles:accessControlPolicy)) then
120                for $DG in $DE/moles:dgDataEntity/moles:dgDataGranule
121                    return
122                                element Access_Constraints {
123                                if (exists($DG/moles:dgGranuleSummary/moles:dgGranuleName)) then
124                                    concat('For data granule ', $DG/moles:dgGranuleSummary/moles:dgGranuleName, ': ')
125                                else (),
126                                if (exists($DG/moles:accessControlPolicy/moles:accessControlPolicyURL)) then
127                                    concat('See access control policy at ', escape-uri($DG/moles:accessControlPolicy/moles:accessControlPolicyURL, true()))
128                                else if (exists($DG/moles:accessControlPolicy/moles:accessControlPolicyText)) then
129                                    data($DG/moles:accessControlPolicy/moles:accessControlPolicyText)
130                                 else
131                                     for $securityCondition in $DG/moles:accessControlPolicy/moles:dgSecurityCondition
132                                     return
133                                         if (exists($securityCondition/moles:conditionExplanationText)) then
134                                             concat('Effect: ', data($securityCondition/moles:effect), ' - ', data($securityCondition/moles:conditionExplanationText))
135                                         else concat('Effect: ', data($securityCondition/moles:effect), 'needs ', data($securityCondition/moles:attauthRole), ' from ', data($securityCondition/moles:dgAttributeAuthority))
136                            }
137                else (),
138        if (exists($DE/moles:dgDataEntity/moles:dgDataRoles/moles:dgDataCreator/moles:dgRoleHolder)) then
139                for $DataCreatorRole in $DE/moles:dgDataEntity/moles:dgDataRoles/moles:dgDataCreator/moles:dgRoleHolder
140                    order by $DataCreatorRole/moles:startDate empty least
141                            return
142                                for $DataCreatorRoleHolder in collection($targetCollection)/moles:dgMetadata/(moles:dgOrganisation | moles:dgPerson)
143                                                [(moles:dgMetadataID/moles:schemeIdentifier='NDG-B0'
144                                                and moles:dgMetadataID/moles:repositoryIdentifier=$DataCreatorRole/*/moles:repositoryIdentifier
145                                                and moles:dgMetadataID/moles:localIdentifier=$DataCreatorRole/*/moles:localIdentifier)]
146                                return
147                                        element Originating_Center {
148                                        if (string(local-name($DataCreatorRoleHolder))='dgOrganisation') then
149                                                (string($DataCreatorRoleHolder/moles:name))
150                                        else if (string(local-name($DataCreatorRoleHolder))='dgPerson') then
151                                                (string(concat(string($DataCreatorRoleHolder/moles:name/moles:initials), ' ', string($DataCreatorRoleHolder/moles:name/moles:familyName))))
152                                        else ('empty content')
153                                }
154        else (),
155        for $DataCuratorRole in $DE/moles:dgDataEntity/moles:dgDataRoles/moles:dgDataCurator/moles:dgRoleHolder
156        [not(exists(moles:endDate)) or moles:endDate='']
157        return
158        for $DataCuratorRoleHolder in collection($targetCollection)/moles:dgMetadata/(moles:dgOrganisation | moles:dgPerson)
159        [(moles:dgMetadataID/moles:schemeIdentifier='NDG-B0'
160        and moles:dgMetadataID/moles:repositoryIdentifier=$DataCuratorRole/*/moles:repositoryIdentifier
161        and moles:dgMetadataID/moles:localIdentifier=$DataCuratorRole/*/moles:localIdentifier)]
162        return
163        element Data_Center {
164        element Data_Center_Name {
165        element Short_Name {
166        if (exists($DataCuratorRoleHolder/moles:name/moles:initials)) then
167        string(concat(string($DataCuratorRoleHolder/moles:name/moles:initials), ' ', string($DataCuratorRoleHolder/moles:name/moles:familyName)))
168        else
169        string($DataCuratorRoleHolder/moles:abbreviation)
170        },
171        element Long_Name {
172        if (exists($DataCuratorRoleHolder/moles:name/moles:initials)) then
173        string(concat(string($DataCuratorRoleHolder/moles:name/moles:initials), ' ', string($DataCuratorRoleHolder/moles:name/moles:familyName)))
174        else string($DataCuratorRoleHolder/moles:name)
175        }
176        },
177        if (exists($DataCuratorRoleHolder/moles:contactDetails/moles:URI)) then
178        element Data_Center_URL {data($DataCuratorRoleHolder/moles:contactDetails/moles:URI)}
179        else (),
180        for $DGID in $DE/moles:dgDataEntity/moles:dgDataGranule/moles:dataModelID
181        return
182        element Data_Set_ID {concat($DGID/moles:repositoryIdentifier, $utillib:moles_id_separator, $DGID/moles:schemeIdentifier, $utillib:moles_id_separator, $DGID/moles:localIdentifier)},
183        element  Personnel {
184        element Role {'Data Center Contact'},
185        if (exists($DataCuratorRoleHolder/name/knownAs)) then
186        element First_Name {string($DataCuratorRoleHolder/moles:name/moles:knownAs)}
187        else if (exists($DataCuratorRoleHolder/moles:name/moles:initials)) then
188        element First_Name {string($DataCuratorRoleHolder/moles:name/moles:initials)}
189        else (),                                       
190        element Last_Name {
191        if (exists($DataCuratorRoleHolder/moles:name/moles:familyName)) then
192        string($DataCuratorRoleHolder/moles:name/moles:familyName)
193        else string($DataCuratorRoleHolder/moles:name)
194        },
195        if (exists($DataCuratorRole/moles:contactDetails/moles:eMail)) then
196        element Email {string($DataCuratorRole/moles:contactDetails/moles:eMail)}
197        else
198        if (exists($DataCuratorRoleHolder/contactDetails/eMail)) then
199        (element Email {string($DataCuratorRoleHolder/moles:contactDetails/moles:eMail)})
200        else (),
201        if (exists($DataCuratorRole/moles:contactDetails/moles:telephone)) then
202        element Phone {string($DataCuratorRole/moles:contactDetails/moles:telephone)}
203        else if (exists($DataCuratorRoleHolder/moles:contactDetails/moles:telephone)) then
204        element Phone {string($DataCuratorRoleHolder/moles:contactDetails/moles:telephone)}
205        else (),
206        if (exists($DataCuratorRole/moles:contactDetails/moles:fax)) then
207        element Fax {string($DataCuratorRole/moles:contactDetails/moles:fax)}
208        else if (exists($DataCuratorRoleHolder/moles:contactDetails/moles:fax)) then
209        element Fax {string($DataCuratorRoleHolder/moles:contactDetails/moles:fax)}
210        else (),
211        if (exists($DataCuratorRole/moles:contactDetails/moles:address)) then
212        element Contact_Address {
213        for $addressline in $DataCuratorRole/moles:contactDetails/moles:address/moles:addressline
214        return element Address {data($addressline)},
215        if (exists($DataCuratorRole/moles:contactDetails/moles:address/moles:city)) then
216        element City {string($DataCuratorRole/moles:contactDetails/moles:address/moles:city)}
217        else (),
218        if (exists($DataCuratorRole/moles:contactDetails/moles:address/moles:postcode)) then
219        element Postal_Code {string($DataCuratorRole/moles:contactDetails/moles:address/moles:postcode)}
220        else (),
221        if (exists($DataCuratorRole/moles:contactDetails/moles:address/moles:country)) then
222        element Country {string($DataCuratorRole/moles:contactDetails/moles:address/moles:country)}
223        else ()
224        }
225        else if (exists($DataCuratorRoleHolder/moles:contactDetails/moles:address)) then
226        element Contact_Address {
227        for $addressline in $DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:addressline
228        return element Address {data($addressline)},
229        if (exists($DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:city)) then
230        element City {string($DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:city)}
231        else (),
232        if (exists($DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:postcode)) then
233        element Postal_Code {string($DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:postcode)}
234        else (),
235        if (exists($DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:country)) then
236        element Country {string($DataCuratorRoleHolder/moles:contactDetails/moles:address/moles:country)}
237        else ()
238        }
239        else ()
240        }
241        },
242        element Summary {string($DE/moles:dgMetadataDescription/moles:abstract/moles:abstractText)},
243        for $DG in $DE/moles:dgDataEntity/moles:dgDataGranule
244            return
245                if ($DG/moles:dataModelID/moles:schemeIdentifier='NDG-A0') then
246                    (element Related_URL {
247                            element URL_Content_Type {'NDG_A_SERVICE'},
248                            if (exists($DG/instance/URI)) then
249                                element URL {escape-uri($DG/instance/URI, true())}
250                            else if ($DG/moles:dataModelID/moles:repositoryIdentifier='badc.nerc.ac.uk') then
251                                element URL {escape-uri('http://dmgdev1.esc.rl.ac.uk/cgi-bin/ndgDataAccess?datasetSource=dmgdev1.esc.rl.ac.uk&datasetID=', true())}
252                            else ($DG/moles:dataModelID/moles:repositoryIdentifier),
253                            element Description {'The NDG service delivering data via NDG A metadata.'}
254                        },
255                   element Related_URL {
256                            element URL_Content_Type {'GET DATA > CSML'},
257                            if (exists($DG/instance)) then
258                                element URL {escape-uri($DG/instance/URI, true())}
259                            else if ($DG/moles:dataModelID/moles:repositoryIdentifier='badc.nerc.ac.uk') then
260                                element URL {escape-uri('http://dmgdev1.esc.rl.ac.uk/cgi-bin/ndgDataAccess?datasetSource=dmgdev1.esc.rl.ac.uk&datasetID=', true())}
261                            else (),
262                            element Description {'The NDG service delivering data via NDG A metadata. Additional tag to be more in line with latest version of GCMD valids'}
263                        })
264                else if ($DG/moles:dataModelID/moles:schemeIdentifier='CDML-0') then
265                        (element Related_URL {
266                                   element URL_Content_Type {'NDG_A_SERVICE'},
267                            if (exists($DG/instance)) then
268                                element URL {escape-uri($DG/instance/URI, true())}
269                            else if ($DG/moles:dataModelID/moles:repositoryIdentifier='badc.nerc.ac.uk') then
270                                element URL {escape-uri('http://cdat.badc.nerc.ac.uk/cgi-bin/dxui.py?datasetURI_1=/', true())}
271                            else (),
272                            element Description {'The NDG service delivering data via Data extractor. Additional tag to be more in line with latest version of GCMD valids'}
273                            },
274                        element Related_URL {
275                            element URL_Content_Type {'GET DATA > DX'},
276                            if (exists($DG/instance)) then
277                                element URL {escape-uri($DG/instance/URI, true())}
278                            else if ($DG/moles:dataModelID/moles:repositoryIdentifier='badc.nerc.ac.uk') then
279                                element URL {escape-uri('http://cdat.badc.nerc.ac.uk/cgi-bin/dxui.py?datasetURI_1=/', true())}
280                            else (),
281                            element Description {'The NDG service delivering data via Data extractor. Additional tag to be more in line with latest version of GCMD valids'}
282                            })
283                else if ($DG/moles:dataModelID/moles:schemeIdentifier='URI') then
284                    element Related_URL {
285                            element URL {data($DG/moles:instance/moles:URI)},
286                            if (exists($DG/moles:instance/moles:instanceComment)) then
287                                    element Description {data($DG/moles:instance/moles:instanceComment)}           
288                            else
289                                    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.'}
290                            }
291            else (),
292            for $RelURL_Desc in ($DE/moles:dgMetadataDescription/moles:descriptionSection/moles:descriptionOnlineReference)
293            return
294                    if (exists($RelURL_Desc/moles:dgSimpleLink)) then
295                    element Related_URL {
296                    element URL {data($RelURL_Desc/moles:dgSimpleLink/URI)},
297                    element Description {concat(data($RelURL_Desc/dgSimpleLink/moles:name), ' - ', data($RelURL_Desc/dgSimpleLink/moles:notes))}
298                    }
299                    else (),
300        element Metadata_Name {'[CEOS IDN DIF]'},
301        element Metadata_Version {'9.4'},
302        if  (exists($DE/moles:dgMetadataProvenance/moles:RecordCreation)) then
303                element DIF_Creation_Date {data($DE/moles:dgMetadataProvenance/moles:RecordCreation/moles:CreatedDate)}
304        else (),
305        for $MDUpdt in $DE/moles:dgMetadataProvenance/moles:RecordUpdate
306        return 
307            element DIF_Revision_History {concat(data($MDUpdt/moles:UpdateDate), ' - ', data($MDUpdt/moles:UpdateSummary), ' - ', data($MDUpdt/moles:UpdatedBy))},
308        if  (exists($DE/moles:dgMetadataProvenance/moles:RecordReview)) then
309                element Future_DIF_Review_Date {data($DE/moles:dgMetadataProvenance/moles:RecordReview/moles:ReviewDate)}
310        else ()
311        }
Note: See TracBrowser for help on using the repository browser.