Review Request: fix writing of text:time values

Friedrich W. H. Kossebau kossebau at kde.org
Sat Jul 7 00:35:31 BST 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105463/
-----------------------------------------------------------

Review request for Calligra and Thorsten Zachmann.


Description
-------

The file interoperability/wordprocessing/oowriter/oow_insert_fields.odt from calligratests currently fails on this bad value:
text:time-value="0-00-00T07:37:38"

Reason is that ODF 19.881 text:time-value specifies
"The text:time-value attribute has the data type timeOrDateTime."
and ODF 18.3.36 timeOrDateTime says
"A timeOrDateTime value is either an [xmlschema-2] time or an [xmlschema-2] dateTime value."

Now, [xmlschema-2] demands for the year part a "four-or-more digit optionally negative-signed numeral that represents the year". Also, "There is no year 0, and '0000' is not a valid lexical representation.", see http://www.w3.org/TR/xmlschema-2/#year-zero

Thus the validator fails on this (good boy), for two reasons. And I wonder why the date part is needed at all. Just the time is perfectly fine here by the spec, no? At least the validator agrees with me after trying the patch, on this file.

Attached patch fixes the code to just write the time. And also removes the counterpart to the hack in the loading code.

Okay to backport to 2.5?


Diffs
-----

  plugins/variables/DateVariable.cpp cf5ef8b 

Diff: http://git.reviewboard.kde.org/r/105463/diff/


Testing
-------


Thanks,

Friedrich W. H. Kossebau

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120706/8e783870/attachment.htm>


More information about the calligra-devel mailing list