ZedVal output report format

Version 1.0.0 — James Pritchett, 24 July 2003

Overview

This document describes output report from the DefaultReporter class, which is part of the ZedVal application layer. Other ZedReporter implementations can be created and used (see the ZedVal customization document for details).

The output of ZedVal is a report that gives general information about the book being tested and the application environment; that lists all the test failures and test processor failures; and that gives summary information about the validation run. This report is an XML document written to the standard output. The overall structure of the document is as follows:

                
                <zedValReport engineVersion="1.0.0">
                  <head>
                    ... 
                  </head>
                  <body>
                    ...
                  </body>
                  <foot>
                    ...
                  </foot>
                </zedValReport>
                
            

The engineVersion attribute gives the version number of the ZedVal core engine java classes used. This can be helpful for debugging, etc.

The elements and attributes of the other sections of the report are described in detail below.

Report header

The report header contains information on the book being tested and on the ZedVal application environment.

                
                  <head>
                    <book uid="us-rfbd-GK619" href="C:\ZedVal\GK619\GK619.opf">
                      <fileCount>78</fileCount>
                      <title>BASICS OF BIBLICAL GREEK : GRAMMAR</title>
                      <creator>MOUNCE, WILLIAM D</creator>
                    </book>
                    <program appName="ZedVal" appVersion="1.0.0" >
                      <testMap href="H:\ZedValWork\src\zedsuite\maps\testMap.xml" />
                      <procMap href="H:\ZedValWork\src\zedsuite\maps\procMap.xml" />
                      <cmdLineArg name="-verbosity" value="2" />
                      <startTime>2003-06-30T10:45:43.451-04:00</startTime>
                    </program>
                  </head>
                
            

Elements

book
Contains data about the book being tested. It has the following attributes:
uid
The unique identifier given in the package file (if available)
href
The path to the package file of the book being tested
fileCount
The total number of files listed in the package file manifest (if available)
title
The title of the book, as given in the package file (if available)
creator
The author (or other creator) of the book, as given in the package file (if available). This element may be repeated.
program
Contains data about the application and application context. It has the following attributes:
appName
The name of the application
appVersion
The version of the application
testMap
Identification of the test map file being used or "null" if file could not be found
procMap
Identification of the test processor map file being used or "null" if file could not be found
cmdLineArg
Identification of ZedVal application command line arguments
name
The name of the command line argument
value
The value of the argument
startTime
Time the application was started. Time is in ISO 8601 extended format: YYYY-MM-DDThh:mm:ss.sss, followed by the number of hours difference from UCT.

Report body

The report body contains zero or more message elements, generated during the validation run. There are three types of messages: test failures, test processor errors, and application errors.

                
                  <body>
                    <message type="failure">
                       ...
                    </message>
                    <message type="testProcessorError">
                       ...
                    </message>
                    <message type="applicationError">
                       ...
                    </message>
                    ...
                  </body>
                
            

Failure messages

A failure message represents a specific validation test that a specific file in the book has failed.

                
                <message type="failure">
                  <file name="C:\ZedVal\GK619\GK619_0001d.SMIL" line="19" column="1"/>
                  <test id="smil_validRegion" type="requirement">
                    <testDesc>region attribute on media object points to region 
                              defined in layout</testDesc>
                    <specRef href="z3986.html#li_318" />
                    <onFalseMsg>
                      <msg class="short">undefined region</msg>
                      <msg class="long">region attribute points to undefined region</msg>
                     </onFalseMsg>
                   </test>
                  <detail>region attribute value = texts</detail>
                  <testProcessor id="smil_3" type="XSL" uses="dtbsmil110.xsl">
                    <label>SMIL XSL tests</label>
                  </testProcessor>
                </message>
                
            

Elements

file
Identifies the file that failed the test. For XML files, may optionally include a line and column number where the failure occurred
test
A full description of the specific test that the file failed (if known). This is copied directly from the test map document
detail
Optional specific details about the failure
testProcessor
Identification of the test processor that generated this message. This is copied directly from the test processor map document

Test processor errors

A test processor error message reports an error that prevented a test processor from being executed successfully on a file. This will result in one or more tests being skipped for that file.

                
                <message type="testProcessorError">
                  <file name="C:\ZedVal\GK619\GK619_1014.mp3" />
                  <detail>Cannot run testProcessor [Audio file tests] on file 
                          GK619_1014.mp3: File does not exist</detail>
                  <testProcessor id="audio_1" type="CUSTOM" uses="org.daisy.zedsuite.AudioTests">
                    <label>Audio file tests</label>
                  </testProcessor>
                </message>
                
            

Elements

file
Identifies the file that could not be tested
detail
Description of the error
testProcessor
Identification of the test processor that could not be executed. This is copied directly from the test processor map document

Application errors

An application error message reports an error that occurred at the top, application level. These errors may affect the results of the validation.

                
                 <message type="applicationError">
                   <detail>Package file/Processor map spec Version mismatch; map is 
                           for version ANSI/NISO Z39.86-2002, package declares text/XML1.0.</detail>
                   <context>org.daisy.zedval.ZedVal.main</context>
                </message>
                
            

Elements

detail
Description of the error
context
The method in which the error was generated

Report footer

The report footer contains summary statistics about the validation run.

                
                  <foot>
                    <endTime>2003-06-30T10:45:19.993-04:00</endTime>
                    <elapsedTime>0:00:36.542</elapsedTime>
                    <failureCount>116</failureCount>
                    <procErrCount>29</procErrCount>
                    <appErrCount>0</appErrCount>
                  </foot>
                
            

Elements

endTime
Time the validation run ended. Time is in ISO 8601 extended format (see above)
elapsedTime
Total elapsed time of validation run (in SMIL clock format)
failureCount
Total number of test failures
procErrCount
Total number of test processor errors generated
appErrCount
Total number of application errors generated

Appendix: Schema for output report

The following is a RELAX NG schema for the ZedVal default output report.


<grammar 
 xmlns="http://relaxng.org/ns/structure/1.0" 
 datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">

<start>
    <ref name="ZedValReport"/>
</start>

<define name="ZedValReport">
    <element name="zedValReport">
        <attribute name="engineVersion">
            <text />
        </attribute>
        <ref name="Head"/>
        <ref name="Body"/>
        <ref name="Foot"/>
    </element>
</define>

<define name="Head">
    <element name="head">
        <ref name="Book"/>
        <ref name="Program"/>
    </element>
</define>

<define name="Book">
    <element name="book">
        <attribute name="uid">
            <text/>
        </attribute>
        <ref name="Href"/>
        <optional>
            <element name="fileCount">
                <data type="integer" 
                 datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
            </element>
        </optional>
        <optional>
            <element name="title">
                <text/>
            </element>
        </optional>
        <zeroOrMore>
            <element name="creator">
                <text/>
            </element>
        </zeroOrMore>
    </element>
</define>

<define name="Program">
    <element name="program">
        <attribute name="appName">
            <text/>
        </attribute>
        <attribute name="appVersion">
            <text />
        </attribute>
        <element name="testMap">
            <empty/>
            <ref name="Href"/>
        </element>
        <element name="procMap">
            <empty/>
            <ref name="Href"/>
        </element>
        <zeroOrMore>
            <element name="arg">
                <empty/>
                <attribute name="name">
                    <text />
                </attribute>
                <attribute name="value">
                    <text />
                </attribute>
            </element>
        </zeroOrMore>
        <element name="startTime">
            <data type="dateTime"
             datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
        </element>
    </element>
</define>


<define name="Body">
    <element name="body">
        <zeroOrMore>
            <ref name="Message"/>
        </zeroOrMore>
    </element>
</define>

<define name="Message">
    <zeroOrMore>
        <ref name="FailMessage"/>
    </zeroOrMore>
    <zeroOrMore>
        <ref name="TestProcessorErrorMessage"/>
    </zeroOrMore>
    <zeroOrMore>
        <ref name="ApplicationErrorMessage"/>
    </zeroOrMore>
</define>

<define name="FailMessage">
    <element name="message">
        <attribute name="type">
            <value>failure</value>
        </attribute>
        <element name="file">
            <attribute name="name">
               <text />
            </attribute>
            <optional>
                <attribute name="line">
                    <data type="integer" 
                     datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
                </attribute>
            </optional>
            <optional>
                <attribute name="column">
                    <data type="integer" 
                     datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
                </attribute>
            </optional>
        </element>
        <optional>
            <ref name="Test"/>
        </optional>
        <ref name="Detail"/>
        <ref name="TestProcessor"/>
    </element>
</define>

<define name="TestProcessorErrorMessage">
    <element name="message">
        <attribute name="type">
            <value>testProcessorError</value>
        </attribute>
        <element name="file">
            <attribute name="name">
                <text/>
            </attribute>
        </element>
        <ref name="Detail"/>
        <ref name="TestProcessor"/>
    </element>
</define>

<define name="ApplicationErrorMessage">
    <element name="message">
        <attribute name="type">
            <value>applicationError</value>
        </attribute>
        <ref name="Detail"/>
        <element name="context">
            <text/>
        </element>
    </element>
</define>

<define name="Detail">
    <element name="detail">
       <text/>
    </element>
</define>

<define name="Test">
    <element name="test">
        <ref name="ReferencedId" />
        <attribute name="type">
            <choice>
                <value>requirement</value>
                <value>recommendation</value>
                <value>strongRecommendation</value>
            </choice>
        </attribute>
        <element name="testDesc">
            <text/>
        </element>
        <element name="specRef">
            <ref name="Href"/>
        </element>
        <element name="onFalseMsg">
            <zeroOrMore>
            <element name="msg">
                <attribute name="class">
                    <text />
                </attribute>
                <text/>
            </element>
            </zeroOrMore>
        </element>
    </element>
</define>

<define name="TestProcessor">
    <element name="testProcessor">
        <ref name="ReferencedId" />
        <attribute name="type">
            <choice>
                <value>DTD</value>
                <value>RNG</value>
                <value>XSL</value>
                <value>CUSTOM</value>
                <value>MANUAL</value>
            </choice>
        </attribute>
        <attribute name="uses">
            <text />
        </attribute>
        <element name="label">
            <text/>
        </element>
    </element>
</define>

<define name="Foot">
    <element name="foot">
        <element name="endTime">
            <data type="dateTime"
             datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
        </element>
        <element name="elapsedTime">
            <ref name="smilFullClockValue" />
        </element>
        <element name="failureCount">
            <data type="integer">
                <param name="pattern">[+]?[0-9]+</param>
            </data>
        </element>
        <element name="procErrCount">
            <data type="integer">
                <param name="pattern">[+]?[0-9]+</param>
            </data>
        </element>
        <element name="appErrCount">
            <data type="integer">
                <param name="pattern">[+]?[0-9]+</param>
            </data>
        </element>
    </element>
</define>

<define name="Href">
    <attribute name="href">
        <data type="anyURI"/>
    </attribute>
</define>

<define name="ReferencedId">  <!-- Note:  These are ids brought in from test/processor maps -->
    <attribute name="id">
        <data type="Name"
         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"/>
    </attribute>
</define>

<define name="smilFullClockValue">
    <data type="token">
        <param
         name="pattern">[0-9]+:[0-5][0-9]:[0-5][0-9](\.[0-9]+)?</param>
    </data>
</define>

</grammar>