better error messages on the build server

Jos van den Oever jos at vandenoever.info
Tue May 15 16:39:12 BST 2012


On Tuesday 15 May 2012 16:44:29 PM Friedrich W. H. Kossebau wrote:
> Hi Jos,
> 
> good stuff, we need more people working on this like you, thanks!
> /me looks at wall without mirror ;)

It feels good that it's appreciated. I have a penchant for large scale 
automated testing and leads to long lists of errors. I like that because it 
gives a clear list of things to fix. Some get depressed by the list, but it's 
really not so bad. The problems are very fixable and if the list should 
evaporate due to developer heat, it will look very good for Calligra.

> 
> Am Dienstag, 15. Mai 2012, 13:00:58 schrieb Jos van den Oever:
> > Hello all,
> > 
> > Over the weekend I ported the script to test document round-tripping and
> > conversion from python to java. The advantage is an increase in speed and
> > better error messages. The runtime for the tests has decreased from two
> > hours to one hours and fifteen minutes.
> > 
> > The main advantage is that the ODF documents are now validated with Jing
> > instead of libxml2. libxml2 has an incomplete implementation of Relax NG
> > and this led to false positives (reported errors that are not real
> > errors) and missed problems.
> > 
> > Currently 528 failing documents and 2175 passing. So one in five
> > documents either crashes calligra or results in invalid ODF.
> 
> A few of these invalid ODFs are about
> --- 8< ---
> token "0pt" invalid; must be a string matching the regular expression
> "([0-9]*[1-9][0-9]*(\.[0-9]*)?|0+\.[0-9]*[1-9][0-9]*|\.[0-9]*[1-9][0-9]*)
> ((cm)|(mm)|(in)|(pt)|(pc)|(px))"
> --- 8< ---
> 
> From 18.3.18 length or 18.3.26 positiveLength I cannot directly see why
> "0pt" is not valid. Do I miss to read the spec correctly, is that
> knowledge not hardcoded in the spec, or is the regular expression used in
> the validator perhaps too strict?

In the list of errors there are five messages that says that token '0pt' is 
not ok. This is noted for the attributes style:border-line-width, 
style:border-line-width-top, style:border-line-width-right, style:border-line-
width-left, style:border-line-width-bottom.

All of these have a definition in the 1.2 spec like this:

The values of the style:border-line-width attribute are three white space 
separated values of type positiveLength 18.3.26.

So, "0pt" is not correct, positiveLength means larger than 0. Also 3 numbers 
are needed, so "1pt 10pt 1pt" would be a valid value.

I've attached an example file with
  <style:paragraph-properties fo:border="double"
						style:border-line-width="1pt 1cm 1pt" />
and a pdf rendering by Calligra of that file.

I created these files with odfautotests [1], which is also used on the build 
server now.

Cheers,
Jos

[1] https://gitorious.org/odfautotests
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output7970865913042203975.pdf
Type: application/pdf
Size: 8747 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120515/13782234/attachment.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: input3881304688286607954.odt
Type: application/vnd.oasis.opendocument.text
Size: 1738 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120515/13782234/attachment.odt>


More information about the calligra-devel mailing list