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

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

d2b* DIF deconstruction update

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