Edit this page on Github

Document Validation Report

This gets output by various validators (DTBook Validator on the “report” port; NIMAS Fileset Validator on several ports). It is a concatenation of all the report types generated by the various validation steps (RelaxNG, Schematron, custom).

There is a Relax NG schema for it here.

<d:document-validation-report xmlns:d="http://www.daisy.org/ns/pipeline/data">
  <d:document-info>
    <d:document-name>Filename or title</d:document-name>
    <d:document-type>What was the document validated as</d:document-type>
    <d:document-path>Full path to the document</d:document-path>
    <d:report-path>Path to this report</d:report-path>
    <d:error-count>Number of errors as an integer</d:error-count>
  </d:document-info>
  <d:reports>
    <d:report type="relaxng">
      <d:errors>
        <d:error type="relaxng">
          <d:desc>Error description from RelaxNG validator output</d:desc>
           <d:location line="3" column="44"/>
        </d:error>
      </d:errors>
      <d:report type="schematron">
        <svrl:schematron-output>
        This comes right from the schematron validator
        </svrl:schematron-output>
      </d:report>
      <d:report type="filecheck">
        <d:errors>
          <d:error type="file-not-found">
            <d:desc>File not found</desc>
            <d:file>Broken URI</d:file>
            <d:location href="file:/path/document.xml#referringID"/>
          </d:error>
       </d:errors>
     </d:report>
  </d:reports>
</d:document-validation-report>

Files List

This intermediate format is sent to the Validation Utils step check-files-exist. The step checks each @path to see if it exists on disk. The report generated includes @ref, which should be a reference to the element that points to @path.

The resulting report from the check-files-exist step is formatted as a <d:errors> element, described above.

<d:files xmlns:d="http://www.daisy.org/ns/pipeline/data">
  <d:file path="file:/full/path/to/image1.jpg" ref="file:/full/path/to/dtbook.xml#ID"/>
  <d:file path="file:/full/path/to/image1.jpg" ref="file:/full/path/to/dtbook.xml#ID"/>
</d:files>