On 21/04/2014 15:51, Dirk Hohndel wrote:
3) About reading dive log xml files. Miika and myself are trying to
write xslt that does not require exslt. It appears Subsurface can easily
handle irregular item definitions, that is, each line defining a xml
sample item does not need to have exactly the same set of attributes.
Correct. That has always been the way we did XML in Subsurface - remove
everything that's redundant.
Currently it appears that many xml log files are written by Subsurface
with time, a depth, and then only attributes that indicate changes to
the values of these attributes. This allows the dive log only to update
attributes when values of parameters change, e.g. temperature or PO2.
But will Subsurface accept an extreme degree of unbalanced attributes?
The extreme case is if each xml sample item only has a time attribute
and one other attribute? This means that the attributes are not reported
regularly but only when a value, e.g. depth, presssure or PO2 has changed.
The reason I asked that question is because the attached xml creates an
unusual profile.
Looks like if depth is not explicitly specified then it makes depth zero
for that sample? But
I was not sure whether it is an artifact of the very short file, rather
than expected behaviour.
Kind regards,
willemf
<divelog program="subsurface-import" version="2">
<dives>
<dive tags="rebreather" date="2011-06-13" time="10:33">
<notes>
MkVI_Config v1.08
Dive started at : 2011-06-13 10:33:08
Starting O2 Pressure(Bar) : 200.8
Starting Dil Pressure(Bar) : 190.4
Starting PO2 Sensor 1 (Bar): 0.36
Starting PO2 Sensor 2 (Bar): 0.39
Starting PO2 Sensor 1 (mV) : 20
Starting PO2 Sensor 2 (mV) : 19
Starting Depth (m) : 0.5
Depth offset (m) : 0.0
Mouthpiece Position : Closed Circuit (1)
Version number of logger : 19
Assumed FO2 of oxygen : 99
Software version : 44
Battery Serial number : 0754
Rig Serial number : 0754
Helium percentage : 0
Nitrogen percentage : 79
Battery SoC (%) : 68
Battery millivoltage : 3904
Battery cycles : 12
Cumulative OTUs : 301
Nitrogen tension 1 : 26.2557
Nitrogen tension 2 : 26.2557
Nitrogen tension 3 : 26.2557
Nitrogen tension 4 : 26.2558
Nitrogen tension 5 : 26.2572
Nitrogen tension 6 : 26.2842
Nitrogen tension 7 : 26.3773
Nitrogen tension 8 : 26.8641
Nitrogen tension 9 : 27.2841
Helium tension 1 : 0.0000
Helium tension 2 : 0.0000
Helium tension 3 : 0.0000
Helium tension 4 : 0.0000
Helium tension 5 : 0.0000
Helium tension 6 : 0.0000
Helium tension 7 : 0.0000
Helium tension 8 : 0.0000
Helium tension 9 : 0.0000
---
</notes>
<cylinder size="3.0 l" description='3l 200 bar' workpressure="200.0 bar" o2="100%"/>
<cylinder size="3.0 l" description='3l 200 bar' workpressure="200.0 bar" o2="21%"/>
<divecomputer model="Poseidon MkVI Discovery" isrebreather="3">
<sample time="0:00" setpoint="0.41 bar"/>
<sample time="0:01" sensor1="0.38 bar" sensor2="0.4 bar"/>
<sample time="0:06" sensor1="0.39 bar" />
<sample time="0:08" sensor2="0.42 bar"/>
<sample time="0:12" temp="27.8 C"/>
<sample time="0:14" PO2="0.41 bar"/>
<sample time="0:15" depth="0.5 m"/>
<sample time="1:17" pressure="200 bar"/>
<sample time="2:19" depth="1 m"/>
<sample time="3:21" PO2="0.4 bar"/>
<sample time="4:22" depth="1.5 m"/>
<sample time="5:23" pressure="200 bar"/>
<sample time="6:24" depth="2.5 m"/>
<sample time="7:25" pdiluent="189 bar"/>
<sample time="8:26" depth="3 m"/>
<sample time="9:27" sensor1="0.39 bar"/>
<sample time="10:28" depth="3.5 m"/>
<sample time="11:29" sensor2="0.43 bar"/>
<sample time="12:30" depth="4 m"/>
<sample time="13:31" sensor2="0.45 bar"/>
<sample time="14:32" pressure="199 bar"/>
<sample time="15:36" depth="5 m"/>
<sample time="16:37" pdiluent="187 bar"/>
<sample time="17:38" sensor1="0.47 bar"/>
<sample time="18:39" sensor2="0.5 bar"/>
</divecomputer>
</dive>
</dives>
</divelog>
_______________________________________________
subsurface mailing list
subsurface@hohndel.org
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface