XML format change

Linus Torvalds torvalds at linux-foundation.org
Sun Dec 23 10:06:53 PST 2012


On Sun, Dec 23, 2012 at 9:53 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
>
> Comments?

Just two:

 - check out old versions of subsurface to make sure they don't break.
Our XML parsing is fairly relaxed (very much designed that way, since
it also parses other formats), but just in case.

 - ditch the "program" entry entirely, and just use the divelog one,
and make the root just be

    <divelog program='subsurface' version='2'>
      ..
    </divelog>

   instead.

With a small additional note:

 - I really think you should index the dive computer nickname not by
"deviceid", but by the <model,deviceid> tuple. I'm not at all
convinced that the deviceid is unique across models: I think that
libdivecomputer tends to use something like a serial number, and who
knows if two different models might not have overlapping serial
numbers.

So the nickname should be something like

  <divecomputer model='Suunto Vyper Air' deviceid='abc' nickname='my
computer' />

which would also (I think) be nice documentation for the user in case
you end up deleting all the dives that actually use that computer...

Hmm?

              Linus


More information about the subsurface mailing list