[CITE-Forum] CSW 2.0.2 Test Specification: nextRecord value when maxRecords="0"
Duthie, Roger J.A.
rogie at bas.ac.uk
Mon Dec 11 06:28:15 EST 2017
Dear CITE Forum,
This is my first post to this mailing group, so: hello!
I have recently been working on a harvester and validation service for internal use at my organisation. The harvestable endpoint of our metadata catalogue uses CSW and specifically the PyCSW package. Firstly, I had noticed an inconsistency in the response from PyCSW when the numberOfRecordsReturned was less than the maxRecords, but the number of matched records was greater than maxRecords; this can can happen if startPosition != 0. In these cases, the numberOfRecordsReturned erroneously took the value of maxRecords. As a result I started helping fix this problem with the PyCSW team.
This went well, as the fix was rather simple; however, my analysis exposed another issue which is preventing the patch I have written from being accepted. The issue is that, with the fix to the software and associated functional tests, PyCSW does not pass all the CITE tests.
The issue arises when maxRecords="0", which should force the same behaviour as if resultType="hits" [v07-006r1 "OpenGIS Catalogue Services Specification specification v2.0.2" 10.8.4.7 p149]. Looking at what that behaviour should be [10.8.4.3 p147]:
"[...] the catalogue service shall return a < GetRecordsResponse > element containing an empty < SearchResults > element that indicates the estimated size of the result set. Optional attributes may or may not be set accordingly."
When I was making my fix for the other issue, the value of nextRecord was discussed on the PyCSW IRC channel (freenode #pycsw). The answer to the question, what should the nextRecord attribute be when no records have been returned, but all records have been reported, was nextRecord=0. This also is the value nextRecord would take if the last of the records had been returned.
However, it is true that the specification does not dictate what this value should be. The question to the CITE forum is: is nextRecord=1 expected for some reason that I haven't found yet, or is this test being over unnecessarily strict on this?
Thanks for reading, I look forward to seeing a response. Let me know if any further information is required.
All the best,
Data Manager / Software Developer
British Antarctic Survey
The particular test is:
The response to a GetRecords request that specifies
maxRecords="0" must not include any results.
The request and response from the test:
<csw:SearchResults nextRecord="0" numberOfRecordsMatched="11" numberOfRecordsReturned="0"
<!--Response received in  milliseconds--></csw:GetRecordsResponse>
Error message from CITE:
[FAILURE] Expected csw:SearchResults/@nextRecord = 1.
This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the CITE-Forum