Todo produces invalid XML
Stephen Bridges <[email protected]>
| Newsgroups | gmane.comp.handhelds.opie.devel |
|---|---|
| Message-ID | <[email protected]> |
This appears to occur in todo records that are recurrent, producing an output
as so:
<Task Completed="0" HasDate="0" Priority="4" Progress="0" Categories=""
Description="" Summary="test" Uid="-1143313349" rtype="Weekly"
rweekdays="32" rfreq="2" rhasenddate="0" created="1143295527"State="3"
created="1143295380" />
</Tasks>
There is no space between the created and State attribute (or whatever
attribute happens to follow, depending on the record). The created attribute
is also repeated if the record is then edited.
I traced the error to OPimRecurrence::toString() which leaves the function
early if (I think) there are no exceptions to the recurrence of the task.
This means no space is added after the created attribute, the last to be
added.
A patch is included at the bottom of the mail. Unfortunately, I can't see why
a second created attribute is created if the record is edited. I get the
impression from the OPimReccurence class that this is probably an empty
object being written out, but how it exists within the todo record along with
the original data, I don't know.
Stephen (TinheadNed on IRC)
--- opimrecurrence.cpp 29 Jul 2004 19:43:00 -0000 1.3
+++ opimrecurrence.cpp 25 Mar 2006 19:52:58 -0000
@@ -577,9 +577,10 @@
+ recMap[OPimRecurrence::EndDate]
+ "\"";
buf += " created=\"" + recMap[OPimRecurrence::Created] + "\"";
+ buf += " ";
if ( data->list.isEmpty() ) return buf;
- buf += " exceptions=\"";
+ buf += "exceptions=\"";
buf += recMap[OPimRecurrence::Exceptions];
buf += "\" ";
_______________________________________________
http://opie.handhelds.org/cgi-bin/moin.cgi/DeveloperWikiIndex
Opie-devel mailing list
[email protected]
https://handhelds.org/mailman/listinfo/opie-devel