claeis / ilivalidator

INTERLIS validator
14 stars 21 forks source link

Validating empty files: OK or not? #339

Closed Pierre-de-la-Verre closed 2 years ago

Pierre-de-la-Verre commented 2 years ago

I checked a XTF like this:

<?xml version="1.0" encoding="utf-8" ?> 
<TRANSFER xmlns:xsi="http://www.w3.org/2001/XMLSchema[-](https://github.com/claeis/ilivalidator/issues/new#)instance" xsi:schemaLocation="http://www.interlis.ch/INTERLIS2.3" xmlns="http://www.interlis.ch/INTERLIS2.3">
- <HEADERSECTION VERSION="2.3" SENDER="my name">
- <MODELS>
  <MODEL NAME="SIA405_SCHUTZROHR_2015_LV95" VERSION="18.04.2018" URI="http://www.sia.ch/405" /> 
  </MODELS>
  </HEADERSECTION>
  <DATASECTION /> 
  </TRANSFER>

Only header, no data. ilivalidator reports:

Info: validate data...
Info: assume unknown external objects
Info: first validation pass...
Info: second validation pass...
Info: ...validation done

Now I'm thinking about it: Is this correct? What is "correct"? When there are no errors? Or when there are no errors in the existing data? (Thinking back to my school exams - an empty sheet of paper was not correct either ..)

So at least the validator should report something like "No data found .."

claeis commented 2 years ago

This is correct. And there are no objects/baskets statistics, so you know/see it is empty.