Old C code

Dazed_75 lthielster at gmail.com
Sat Jun 29 09:10:27 MST 2013


Joseph,
I found in the source code a directory containing .xslt files that look
like this:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
  <xsl:strip-space elements="*"/>
  <xsl:output method="xml" indent="no" encoding="UTF-8"
omit-xml-declaration="yes"/>

  <xsl:template match="/">
    <divelog program='subsurface-import' version='2'>
      <dives>
        <xsl:apply-templates select="DIVELOGSDATA"/>
      </dives>
    </divelog>
  </xsl:template>
...

Is that what you mean?  I think so and may be able to figure out how to use
them but would appreciate any help too.  As far as the source of the data,
it is all in flat files containg the data in nested structures where all
records are a fixed size.  Them I already know and need to write a program
to read them and write out the XML stuff for SubSurface to import (I
believe).

Mark,
It looks like SubSurface uses the libdivecomputer stuff as I already have
the source on my machine.  I sure wish I had had that 25 years ago :)


On Fri, Jun 28, 2013 at 4:18 PM, Joseph Sinclair
<plug-discussion at stcaz.net>wrote:

> If you have examples and/or a data schema(preferred) from the existing and
> destination systems, I could help with the XML structure and definition...
>
> On 06/28/2013 07:53 AM, Dazed_75 wrote:
> > Yes, outputting XML style text IS trivial.  Knowing what all to put there
> > is an issue I should be able to resolve by exporting something from
> > SubSurface.  Whether there are tools, style sheets or anything to assist
> > with converting my data to that form is a bigger question.
> >
> >
> > On Fri, Jun 28, 2013 at 7:27 AM, kitepilot at kitepilot.com <
> > kitepilot at kitepilot.com> wrote:
> >
> >> XML is trivial stuff <partialtruth>(to a point)</partialtruth>.
> >> If you can output text, you can output XML.
> >> How do you need to output the XML to make it usable for your next input
> is
> >> a different story.
> >> ET
> >>
> >>
> >> Dazed_75 writes:
> >>
> >>> Thanks for the offer.  We could also just chat sometime.
> >>> Looks like I will need to take my existing data which is in one or more
> >>> data files and output it in some form of XML which I know next to
> nothing
> >>> about.  I'll be looking for tools and/or tutorial type stuff on that.
> >>>
> >>> On Fri, Jun 28, 2013 at 5:10 AM, kitepilot at kitepilot.com <
> >>> kitepilot at kitepilot.com> wrote:
> >>>
> >>>> I'll be glad to give you a hand when/if the time comes.
> >>>> Gotta get my scuba cert too...
> >>>> ET
> >>>>
> >>>> Dazed_75 writes:
> >>>>
> >>>>> As I said, I was looking over some old C code from my DOS/Windows
> time
> >>>>> about 25 years ago.  I finally found most of what I needed so the
> main
> >>>>> .h
> >>>>> include file will compile without error.  It was not as bad as I had
> >>>>> thought.  The biggest thing that was confusing me was the plethora of
> >>>>> include files and architecture variations I did not have to deal with
> >>>>> back
> >>>>> then.  Trying to find where something is typedef'd today is a lot
> more
> >>>>> complex.
> >>>>> Nevertheless, if I continue this project I may be asking for some
> >>>>> assistance from time to time.
> >>>>> Basically, I wrote a scuba diving "log" program called "Dive-In" back
> >>>>> around 1988 for the same reasons Linus Torvalds did in the last few
> >>>>> years.
> >>>>> Mine was better than SubSurface in a several ways and SubSurface is
> >>>>> better
> >>>>> than Dive-In in a number of ways.  I still use Dive-In  and have
> around
> >>>>> 780
> >>>>> dives in it, but I have to run it in DosBox or WINE and that causes
> some
> >>>>> issues for me.  I'd like to export the data to a format that
> SubSurface
> >>>>> can
> >>>>> import and that is essentially the project.
> >>>>> --
> >>>>> Dazed_75 a.k.a. Larry
> >>>>> Please protect my address like I protect yours. When sending
> messages to
> >>>>> multiple recipients, use the BCC: (Blind carbon copy). Remove
> addresses
> >>>>> from a forwarded message body before clicking Send.
> >>>>>
> >>>> ------------------------------****---------------------
> >>>> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.****org<
> >>>> PLUG-discuss at lists.**phxlinux.org <PLUG-discuss at lists.phxlinux.org>>
> >>>>
> >>>> To subscribe, unsubscribe, or to change your mail settings:
> >>>> http://lists.phxlinux.org/****mailman/listinfo/plug-discuss<
> http://lists.phxlinux.org/**mailman/listinfo/plug-discuss>
> >>>> <**http://lists.phxlinux.org/**mailman/listinfo/plug-discuss<
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss>>
> >>>>
> >>>>
> >>>
> >>>
> >>> --
> >>> Dazed_75 a.k.a. Larry
> >>> Please protect my address like I protect yours. When sending messages
> to
> >>> multiple recipients, use the BCC: (Blind carbon copy). Remove addresses
> >>> from a forwarded message body before clicking Send.
> >>>
> >> ------------------------------**---------------------
> >> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.**org<
> PLUG-discuss at lists.phxlinux.org>
> >> To subscribe, unsubscribe, or to change your mail settings:
> >> http://lists.phxlinux.org/**mailman/listinfo/plug-discuss<
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss>
> >>
> >
> >
> >
> >
> >
> > ---------------------------------------------------
> > PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> > To subscribe, unsubscribe, or to change your mail settings:
> > http://lists.phxlinux.org/mailman/listinfo/plug-discuss
> >
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>



-- 
Dazed_75 a.k.a. Larry

Please protect my address like I protect yours. When sending messages to
multiple recipients, use the BCC: (Blind carbon copy). Remove addresses
from a forwarded message body before clicking Send.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20130629/d6f1f591/attachment.html>


More information about the PLUG-discuss mailing list