|
54 | 54 | <xsl:apply-templates select="//immetingen:Organization"/> |
55 | 55 | <xsl:apply-templates select="//imsikb0101:Filter"/> |
56 | 56 | <xsl:apply-templates select="//immetingen:MeasurementObject"/> |
57 | | - <xsl:apply-templates select="//imsikb0101:Borehole" mode="twee"/> |
| 57 | + <xsl:apply-templates select="//imsikb0101:Borehole"/> |
58 | 58 | <xsl:apply-templates select="//imsikb0101:Layer"/> |
59 | | - <xsl:apply-templates select="//imsikb0101:Sample" mode="twee"/> |
| 59 | + <xsl:apply-templates select="//imsikb0101:Sample"/> |
60 | 60 | <xsl:apply-templates select="//immetingen:Analysis"/> |
61 | 61 | <xsl:apply-templates select="//immetingen:AnalysisProcess"/> |
62 | 62 | <xsl:apply-templates select="//imsikb0101:featureMember"/> |
|
171 | 171 | </xsl:if> |
172 | 172 | </xsl:template> |
173 | 173 | <!-- Sample --> |
174 | | - <xsl:template match="immetingen:Sample" mode="een"> |
175 | | - <xsl:variable name="prGUID" select="@gml:id"/> |
176 | | - <xsl:choose> |
177 | | - <xsl:when test="count(spec:specimenType[fn:lower-case(@xlink:href) = fn:lower-case('urn:immetingen:MonsterType:id:1')]) = 1"> |
178 | | - <!-- VELDMONSTER --> |
179 | | - <xsl:copy-of select="sikb:checkExistence(., $prGUID, 'name', 'ERROR')"/> |
180 | | - <xsl:copy-of select="sikb:checkFilled(., $prGUID, 'name', 'ERROR')"/> |
181 | | - </xsl:when> |
182 | | - <xsl:otherwise> |
183 | | - <xsl:copy-of select="sikb:checkExistence(., $prGUID, 'name', 'ERROR')"/> |
184 | | - <xsl:copy-of select="sikb:checkFilled(., $prGUID, 'name', 'ERROR')"/> |
185 | | - </xsl:otherwise> |
186 | | - </xsl:choose> |
187 | | - <xsl:copy-of select="sikb:checkLength(., $prGUID, 'name', 24, 'ERROR')"/> |
188 | | - |
189 | | - <xsl:copy-of select="sikb:checkDateBeforeDate(., $prGUID, 'startTime','current', 'ERROR')"/> |
190 | | - <xsl:copy-of select="sikb:checkDateAfterDate(., $prGUID, 'startTime','1980-01-01T00:00:00.00', 'ERROR')"/> |
191 | | - |
192 | | - |
193 | | - <!-- alle analysemonster en conclusiemonster voor GROND --> |
194 | | - <xsl:if test="(fn:lower-case(spec:specimenType/@xlink:href) = fn:lower-case('urn:immetingen:MonsterType:id:10') |
195 | | - or fn:lower-case(spec:specimenType/@xlink:href) = fn:lower-case('urn:immetingen:MonsterType:id:12')) |
196 | | - and fn:lower-case(spec:materialClass/@xlink:href) = fn:lower-case('urn:immetingen:compartiment:id:1')"> |
197 | | - <!-- Check tov maaiveld --> |
198 | | - <xsl:if test="not(fn:lower-case(immetingen:upperDepth/immetingen:Depth/immetingen:condition) = fn:lower-case('urn:immetingen:Hoedanigheid:id:11') |
199 | | - or fn:lower-case(immetingen:upperDepth/immetingen:Depth/immetingen:condition) = fn:lower-case(''))"> |
200 | | - <xsl:copy-of select="sikb:createRecord('WARNING', 'imsikb0101:Sample', string-join(('Bij een grond analysemonster of asbest conclusiemonster mag de Begindiepte alleen t.o.v. Maaiveld zijn.; Sample gml:id =', $prGUID), ' ') )"/> |
201 | | - </xsl:if> |
202 | | - <xsl:if test="not(fn:lower-case(immetingen:lowerDepth/immetingen:Depth/immetingen:condition) = fn:lower-case('urn:immetingen:Hoedanigheid:id:11') |
203 | | - or fn:lower-case(immetingen:lowerDepth/immetingen:Depth/immetingen:condition) = fn:lower-case(''))"> |
204 | | - <xsl:copy-of select="sikb:createRecord('WARNING', 'imsikb0101:Sample', string-join(('Bij een grond analysemonster of asbest conclusiemonster mag de Einddiepte alleen t.o.v. Maaiveld zijn.; Sample gml:id =', $prGUID), ' ') )"/> |
205 | | - </xsl:if> |
206 | | - </xsl:if> |
207 | | - |
208 | | - </xsl:template> |
209 | | - <xsl:template match="imsikb0101:Sample" mode="twee"> |
| 174 | + <xsl:template match="imsikb0101:Sample"> |
210 | 175 | <xsl:variable name="prGUID" select="@gml:id"/> |
211 | 176 |
|
212 | 177 | <xsl:copy-of select="sikb:checkExistence(., $prGUID, 'specimenType', 'ERROR')"/> |
|
234 | 199 | <xsl:if test="(fn:lower-case(spec:specimenType/@xlink:href) = fn:lower-case('urn:immetingen:MonsterType:id:1')) and not(fn:lower-case(spec:materialClass/@xlink:href) = fn:lower-case('urn:immetingen:compartiment:id:1'))"> |
235 | 200 | <xsl:copy-of select="sikb:checkExistence(., $prGUID, 'relatedObservation', 'WARNING')"/> |
236 | 201 | </xsl:if> |
| 202 | + <!-- veldmonsters (wel grond)--> |
| 203 | + <xsl:if test="(fn:lower-case(spec:specimenType/@xlink:href) = fn:lower-case('urn:immetingen:MonsterType:id:1')) and fn:lower-case(spec:materialClass/@xlink:href) = fn:lower-case('urn:immetingen:compartiment:id:1')"> |
| 204 | + <xsl:copy-of select="sikb:checkExistence(., $prGUID, 'upperDepth', 'ERROR')"/> |
| 205 | + <xsl:copy-of select="sikb:checkFilled(., $prGUID, 'upperDepth', 'ERROR')"/> |
| 206 | + <xsl:copy-of select="sikb:checkExistence(., $prGUID, 'lowerDepth', 'ERROR')"/> |
| 207 | + <xsl:copy-of select="sikb:checkFilled(., $prGUID, 'lowerDepth', 'ERROR')"/> |
| 208 | + </xsl:if> |
237 | 209 | <!-- analysemonsters--> |
238 | 210 | <xsl:if test="fn:lower-case(spec:specimenType/@xlink:href) = fn:lower-case('urn:immetingen:MonsterType:id:10')"> |
239 | 211 | <xsl:copy-of select="sikb:checkExistence(., $prGUID, 'relatedObservation', 'WARNING')"/> |
|
251 | 223 | <xsl:if test="fn:lower-case(spec:specimenType/@xlink:href) = fn:lower-case('urn:immetingen:MonsterType:id:12')"> |
252 | 224 | <xsl:copy-of select="sikb:checkExistence(., $prGUID, 'relatedSamplingFeature', 'WARNING')"/> |
253 | 225 | <xsl:copy-of select="sikb:checkExistence(., $prGUID, 'relatedObservation', 'WARNING')"/> |
| 226 | + <xsl:copy-of select="sikb:checkExistence(., $prGUID, 'upperDepth', 'ERROR')"/> |
| 227 | + <xsl:copy-of select="sikb:checkFilled(., $prGUID, 'upperDepth', 'ERROR')"/> |
| 228 | + <xsl:copy-of select="sikb:checkExistence(., $prGUID, 'lowerDepth', 'ERROR')"/> |
| 229 | + <xsl:copy-of select="sikb:checkFilled(., $prGUID, 'lowerDepth', 'ERROR')"/> |
254 | 230 | </xsl:if> |
255 | 231 |
|
256 | 232 | <xsl:copy-of select="sikb:checkDateBeforeDate(., $prGUID, 'startTime','current', 'ERROR')"/> |
|
272 | 248 | </xsl:if> |
273 | 249 | </xsl:if> |
274 | 250 |
|
275 | | - </xsl:template> |
276 | | - <!-- Analysis--> |
277 | | - <xsl:template match="immetingen:Analysis"> |
278 | | - <xsl:variable name="arGUID" select="@gml:id"/> |
279 | | - <xsl:variable select="string(om:result/@*)" name="arType"/> |
280 | | - <xsl:if test="not(contains($arType,'immetingen:AnalyticResultType'))"> |
281 | | - <xsl:if test="not(contains($arType,'immetingen:MeasureResultType'))"> |
282 | | - <xsl:copy-of select="sikb:createRecord('ERROR', 'imsikb0101:AnalyticResult', string-join(('Er moet een AnalyticResult of MeasureResult in Analysis aanwezig zijn; Analysis gml:id =', $arGUID), ' ') )"/> |
283 | | - </xsl:if> |
284 | | - </xsl:if> |
285 | | - <!-- Check AnalysisProcess --> |
286 | | - <xsl:variable select="replace(om:procedure/@xlink:href, '#', '')" name="prLiGUID"/> |
287 | | - <xsl:variable select="om:procedure/*/@gml:id" name="prInGUID"/> |
288 | | - <xsl:if test="concat($prInGUID, '', $prLiGUID) != ''"> |
289 | | - <xsl:if test="count(//immetingen:AnalysisProcess[@gml:id = concat($prInGUID, '', $prLiGUID)]) != 1"> |
290 | | - <xsl:copy-of select="sikb:createRecord('ERROR', 'immetingen:AnalysisProcess', string-join(('Analysis verwijst niet naar procedure van type: AnalysisProcess; Analysis gml:id =', $arGUID), ' ') )"/> |
291 | | - </xsl:if> |
292 | | - </xsl:if> |
293 | | - <xsl:copy-of select="sikb:checkLookupId(., $arGUID, 'parameter', 'Parameter', 'WARNING')"/> |
294 | | - </xsl:template> |
| 251 | + </xsl:template> |
295 | 252 | <!-- Analysis Process--> |
296 | 253 | <xsl:template match="immetingen:AnalysisProcess"> |
297 | 254 | <xsl:variable name="arpGUID" select="@gml:id"/> |
298 | 255 | <xsl:copy-of select="sikb:checkLookupId(., $arpGUID, 'analyticalTechnique', 'Waardebepalingstechniek', 'WARNING')"/> |
299 | 256 | <xsl:copy-of select="sikb:checkLookupId(., $arpGUID, 'valuationMethod', 'Waardebepalingsmethode', 'WARNING')"/> |
300 | 257 | </xsl:template> |
301 | 258 | <!-- Borehole --> |
302 | | - <xsl:template match="imsikb0101:Borehole" mode="twee"> |
| 259 | + <xsl:template match="imsikb0101:Borehole"> |
303 | 260 | <xsl:variable name="prGUID" select="@gml:id"/> |
304 | 261 | <xsl:copy-of select="sikb:checkExistence(., $prGUID, 'name', 'ERROR')"/> |
305 | 262 | <xsl:copy-of select="sikb:checkFilled(., $prGUID, 'name', 'ERROR')"/> |
|
405 | 362 | <xsl:copy-of select="sikb:checkFilled(., $prGUID, 'name', 'ERROR')"/> |
406 | 363 | <xsl:copy-of select="sikb:checkExistence(., $prGUID, 'startTime', 'WARNING')"/> |
407 | 364 | <xsl:copy-of select="sikb:checkExistence(., $prGUID, 'upperDepth', 'ERROR')"/> |
| 365 | + <xsl:copy-of select="sikb:checkFilled(., $prGUID, 'upperDepth', 'ERROR')"/> |
408 | 366 | <xsl:copy-of select="sikb:checkExistence(., $prGUID, 'lowerDepth', 'ERROR')"/> |
| 367 | + <xsl:copy-of select="sikb:checkFilled(., $prGUID, 'lowerDepth', 'ERROR')"/> |
409 | 368 | <xsl:copy-of select="sikb:checkLength(., $prGUID, 'name', 24, 'ERROR')"/> |
410 | 369 | </xsl:template> |
411 | 370 | <xsl:template match="imsikb0101:geometry"> |
|
430 | 389 | </xsl:otherwise> |
431 | 390 | </xsl:choose> |
432 | 391 | </xsl:template> |
| 392 | + <!-- Analysis--> |
433 | 393 | <xsl:template match="immetingen:Analysis"> |
434 | 394 | <xsl:variable name="arGUID" select="@gml:id"/> |
435 | 395 | <xsl:variable select="string(om:result/@*)" name="arType"/> |
|
482 | 442 | </xsl:if> |
483 | 443 | </xsl:if> |
484 | 444 |
|
| 445 | + <xsl:apply-templates select="./immetingen:physicalProperty/immetingen:PhysicalProperty"/> |
485 | 446 | <xsl:copy-of select="sikb:checkLookupId(./om:result, 'analyseResultaat', 'valueProcessingMethod', 'Waardebewerkingsmethode', 'WARNING')"/> |
486 | 447 | </xsl:template> |
487 | 448 | <xsl:template match="immetingen:PhysicalProperty"> |
488 | 449 | <xsl:copy-of select="sikb:checkExistence(., 'analyseResultaat', 'quantity', 'ERROR')"/> |
| 450 | + <xsl:copy-of select="sikb:checkFilled(., 'analyseResultaat', 'quantity', 'ERROR')"/> |
489 | 451 | <!-- check nog aanpassen in verband met check op attribuut ipv element --> |
490 | 452 | <xsl:copy-of select="sikb:checkLookupId(., 'analyseResultaat', 'quantity', 'Parameter', 'WARNING')"/> |
491 | 453 | <xsl:copy-of select="sikb:checkLookupId(., 'analyseResultaat', 'parameter', 'Parameter', 'WARNING')"/> |
|
867 | 829 | </xsl:if> |
868 | 830 | </xsl:when> |
869 | 831 | <xsl:when test="$checkCorrectTable = '0'"> |
870 | | - <xsl:variable name="wrongTable" select="replace(string-join(('Verwijzing naar LookupTabel {',$lookupCategory,' } van het element', $field, 'bij', $elementLocalName, $prGUID, 'moet verwijzen naar LookupTabel {', $CategoryElement,'} in de lookup-files.'), ' '), ' ', ' ')"/> |
| 832 | + <xsl:variable name="wrongTable" select="replace(string-join(('Verwijzing naar LookupTabel {',$lookupCategory,' } (', $lookupValue ,') van het element', $field, 'bij', $elementLocalName, $prGUID, 'moet verwijzen naar LookupTabel {', $CategoryElement,'} in de lookup-files.'), ' '), ' ', ' ')"/> |
871 | 833 | <xsl:copy-of select="sikb:createRecord('ERROR', $elementName, $wrongTable)"/> |
872 | 834 | </xsl:when> |
873 | 835 | </xsl:choose> |
|
0 commit comments