<div dir="ltr">Hi Willem,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 20, 2014 at 11:16 AM, Willem Ferguson <span dir="ltr"><<a href="mailto:willemferguson@zoology.up.ac.za" target="_blank">willemferguson@zoology.up.ac.za</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Miika,<br>
<br>
I refer to the discussions we had about Poseidon dive log imports early this year and the problem with developing XSLT transforms without using XSLT 2.<br>
<br>
Attached are:<br>
1) C code<br>
2) two text files comprising a raw Poseidon log dump.<br>
<br>
Would you be prepared to look at the C code and see whether this could be of any use at all? This is not meant as a formal patch, more as a proof-of-concept. I have commented fairly liberally to try and make the code more understandable.<br></blockquote><div><br></div><div>When I was looking into this conversion earlier, I ended up thinking about writing the whole import in C. This is due to the log file being too big to be processed as XSLT transformation. I did prototyping in "compressing" the input csv file from Subsurface (grepping only the lines we are interested in). But in the end, I think we can  parse the file with same effort and ignore the XSLT transform in this import.<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The issues are:<br>
1) Would something like this be useful at all for importing the log data into Subsurface? Should one try and stick to XSLT ?<br></blockquote><div><br></div><div>This format does not sit well with XSLT, so it might make more sense to read it in C code (C++ should work as well).<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2) Assuming a C-code approach is viable, then one needs to solve the issue of automatic recognition of the Poseidon log files by Subsurface so that the universal log importer can be used (Import -> Import log files). The raw log dump contains 2 files with extensions of .txt and .csv.<br></blockquote><div><br></div><div>This should be quite easy if we assume user selects the .csv file. We do currently have the option to select what type of log file is selected. And we can trigger special parsing when Poseidon is selected. This selection should be quite easy from our current import functions.<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am away from the office at the moment with very erratic Internet access. So if I do not respond soon, please excuse me. Will be back next week 29th.<br></blockquote><div><br></div><div>I was hoping, I could do some coding during the GSoC mentor summit this weekend. And this import was what I was planning on looking at.<br></div><div> </div><div>miika <br></div></div><br></div></div></div>