opengeospatial / ets-cat30

OGC Catalogue 3.0 Conformance Test Suite
Other
0 stars 6 forks source link

Possible invalid expression in BasicGetRecordsTests.presentSubjectProperty() #13

Closed pandzel-zz closed 9 years ago

pandzel-zz commented 9 years ago

The test is: "count(csw:SummaryRecord[dc:subject]) = ./@numberOfRecordsReturned". However, considering that it might be more than one dc:subject in the record, shouldn't it rather be: "count(csw:SummaryRecord[dc:subject]) >= ./@numberOfRecordsReturned" ?

rjmartell commented 9 years ago

The expression looks ok. It counts the number of SummaryRecord elements that contain at least one dc:subject child element. So the assertion will fail only if there is a record without dc:subject.

Now, dc:subject is an optional property. If no value exists is an empty dc:subject element to be expected in the response? If not, then the test will have to select dc:title instead (which is a required element)--and verify that no other optional elements are present.