Skip to content

Commit

Permalink
Modifications in the ETS to solve the issue 46
Browse files Browse the repository at this point in the history
The test will pass validation when the element has an attribute 'indeterminatePosition' with one of the following values:

'unknown', 'now', 'before' or 'after'.

Note: The test will be correct even if the element has an empty value.
  • Loading branch information
inakidiazdecerio committed May 24, 2019
1 parent 830b448 commit 5150cfa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions data/schemas/ets-schemas-bsxets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Source: <a href="http://inspire.ec.europa.eu/id/ats/data/3.0rc3/schemas" target=
Pre-requisite conformance classes:
<ul><li><a href="http://inspire.ec.europa.eu/id/ats/data-encoding/3.3/inspire-gml" target="_blank">Conformance Class 'INSPIRE GML encoding'</a></li></ul>]]></description>
<reference>../../inspire-bsxets.xq</reference>
<version>0.2.4</version>
<version>0.2.5</version>
<author>interactive instruments GmbH</author>
<creationDate>2016-08-15T00:00:00Z</creationDate>
<lastEditor>interactive instruments GmbH</lastEditor>
Expand Down Expand Up @@ -206,13 +206,14 @@ Source: <a href="http://inspire.ec.europa.eu/id/ats/data/3.0rc3/schemas/gml-mode
<parent ref="EIDc04ade3c-0ad2-4fa5-9977-d83022855e3b"/>
<expectedResult>NOT_APPLICABLE</expectedResult>
<expression>
let $featuresWithErrors := $features[*[not(@xlink:href or element() or (text() and string-length(normalize-space(text()))&gt;0) or @xsi:nil eq 'true')] or */*/*[not(@xlink:href or element() or (text() and string-length(normalize-space(text()))&gt;0) or @xsi:nil eq 'true')]][position() le $limitErrors]
let $indeterminatePositionValues := ('unknown', 'now', 'before', 'after')
let $featuresWithErrors := $features[*[not(@xlink:href or element() or (text() and string-length(normalize-space(text()))&gt;0) or @xsi:nil eq 'true' or @indeterminatePosition = $indeterminatePositionValues)] or */*/*[not(@xlink:href or element() or (text() and string-length(normalize-space(text()))&gt;0) or @xsi:nil eq 'true' or @indeterminatePosition = $indeterminatePositionValues)]][position() le $limitErrors]
return
(if ($featuresWithErrors) then 'FAILED' else 'PASSED',
local:error-statistics('TR.featuresWithErrors', count($featuresWithErrors)),
for $feature in $featuresWithErrors
order by $feature/@gml:id
let $properties := $feature/*[not(@xlink:href or element() or (text() and string-length(normalize-space(text()))&gt;0) or @xsi:nil eq 'true')] | $feature/*/*/*[not(@xlink:href or element() or (text() and string-length(normalize-space(text()))&gt;0) or @xsi:nil eq 'true')]
let $properties := $feature/*[not(@xlink:href or element() or (text() and string-length(normalize-space(text()))&gt;0) or @xsi:nil eq 'true' or @indeterminatePosition = $indeterminatePositionValues)] | $feature/*/*/*[not(@xlink:href or element() or (text() and string-length(normalize-space(text()))&gt;0) or @xsi:nil eq 'true' or @indeterminatePosition = $indeterminatePositionValues)]
return
local:addMessage('TR.emptyValue', map { 'filename': local:filename($feature), 'featureType': local-name($feature), 'gmlid': string($feature/@gml:id), 'propertyNames': fn:string-join($properties/local-name(),', ') }))
</expression>
Expand Down

0 comments on commit 5150cfa

Please sign in to comment.