[PATCH] Recognize O2 percentage from MacDive import

Linus Torvalds torvalds at linux-foundation.org
Thu Jan 31 15:02:52 PST 2013


On Fri, Feb 1, 2013 at 8:54 AM,  <subsurface at henrik.synth.no> wrote:
>
> MacDive use "o2percent" in its XML export

I don't know if you're aware of this, but for totally historical
reasons, subsurface has a "verbosity" flag that when you set it to two
or more, will talk about all the XML tags it doesn't understand while
parsing.

So you can do "subsurface -vv macdive.xml" to see subsurface talk
about all the xml tags it ignores because it doesn't know what the
heck they are. Your example dive has a few events, for example. So you
get things like

  Unable to match sample 'dives.dive.samples.sample.alarm' (po2_high)
  Unable to match sample 'dives.dive.samples.sample.alarm' (deep_stop)
  Unable to match sample 'dives.dive.samples.sample.alarm' (surface)

which could be turned into events, but currently aren't.

I didn't bother, in the hope that Miika would just do it in the xslt,
but if you want to use the current parser then the "-vv" trick may be
useful.

Of course, *most* of the things that subsurface doesn't understand are
about all the equipment management that macdive clearly does. So it's
about the model of the knife that you had with you on the dive. We
just don't track things like that, so teaching the xml parser to
*parse* them is the least of your worries.

How married are people to the whole "tell the dive log about all the
gear you had?" It isn't something I'm all that interested in
personally, and it clearly won't be for 3.0, but maybe we want to at
least discuss it..

                        Linus


More information about the subsurface mailing list