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.
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>
book
uid
href
fileCount
title
creator
program
appName
appVersion
testMap
procMap
cmdLineArg
name
value
startTime
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>
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>
file
test
detail
testProcessor
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>
file
detail
testProcessor
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>
detail
context
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>
endTime
elapsedTime
failureCount
procErrCount
appErrCount
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>