Loading ...
Sorry, an error occurred while loading the content.

FLDIGI_DEF.XML file

Expand Messages
  • Leigh L. Klotz, Jr.
    I noticed the new FLDIGI_DEF.XML file; cool. I d like to suggest using XML schema type declarations instead of custom and tags. This will allow
    Message 1 of 5 , Mar 4 12:16 PM
    • 0 Attachment
      I noticed the new FLDIGI_DEF.XML file; cool.

      I'd like to suggest using XML schema type declarations instead of custom <INT> and <DBL> tags.
      This will allow other programs that can read and write these type of configuration files to understand the type declarations because this is based on a standard way of doing it.

      Here are the proposed changes:

      Start of file:
      <?xml version="1.0"?>
      <FLDIGI_DEFS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

      Strings:
      <MYCALL>
          wa5znu
      </MYCALL>


      Doubles:
      <SQUELCH xsi:type="xsd:double">
          14
      </SQUELCH>


      Booleans:
      <STARTATSWEETSPOT xsi:type="xsd:boolean">
          0
      </STARTATSWEETSPOT>


      Integers:
      <RTTYBAUD xsi:type="xsd:integer">
          0
      </RTTYBAUD>


      Here is proposed code change for writing.  There is no reading code yet so there are no proposed changes.
      The correct thing to do for reading is to note what attribute prefixes in the top of the file have the values that correspond to what xsi and xsd are in the example above, and recognize attributes xsi:type and xsd:integer beginning with those names; however, I don't think that's necessary.  Just always assume xsi:type and xsd:integer and write out the definitions in the header, and the interop will work fine for fldigi writing and reading and other programs reading.

      void writeXMLint(ofstream &f, const char * tag,  int val)
      {
          f << "<" << tag << " xsi:type=\"xsd:integer\">\n";
          f << "\t" << val << "\n";
          f << "</" << tag << ">\n";
      }

      void writeXMLdbl(ofstream &f, const char * tag, double val)
      {
          f << "<" << tag << " xsi:type=\"xsd:double\">\n";
          f << "\t" << val << "\n";
          f << "</" << tag << ">\n";
      }

      void writeXMLstr(ofstream &f, const char * tag, string val)
      {
          f << "<" << tag << ">\n";
          f << "\t" << val.c_str() << "\n";
          f << "</" << tag << ">\n";
      }

      void writeXMLbool(ofstream &f, const char * tag, bool val)
      {
              f << "<" << tag << " xsi:type=\"xsd:boolean\">\n";
          f << "\t" << val << "\n";
          f << "</" << tag << ">\n";
      }

      Leigh/WA5ZNU

    • Leigh L. Klotz, Jr.
      I ve written a sample HTML page to show how the XML data can be viewed and edited in Firefox: http://wa5znu.org/2007/03/fldigi/ Leigh/WA5ZNU
      Message 2 of 5 , Mar 4 12:55 PM
      • 0 Attachment
        I've written a sample HTML page to show how the XML data can be viewed
        and edited in Firefox:

        http://wa5znu.org/2007/03/fldigi/

        Leigh/WA5ZNU
      • w1hkj
        I will visit after the 1.31 work is done. In the meantime I should tell you that I am working on an ARQ implementation that will be integral to fldigi. It is
        Message 3 of 5 , Mar 4 1:17 PM
        • 0 Attachment
          I will visit after the 1.31 work is done.

          In the meantime I should tell you that I am working on an ARQ
          implementation that will be integral to fldigi. It is slow and
          painstaking work, but I am beginning to see the end goal.

          The xml output is there in anticipation of changing to that type of a
          def file in the future. I work on it as time permits. I would be happy
          to accept your assistance in replacing the current configuration.cxx
          code with a new xml reader.

          Dave
        • w1hkj
          ... Looks pretty good Leigh. I would hope that users would not modify the def file outside of the application. As soon as they do they will be complaining
          Message 4 of 5 , Mar 4 3:45 PM
          • 0 Attachment
            Leigh L. Klotz, Jr. wrote:
            > I've written a sample HTML page to show how the XML data can be viewed
            > and edited in Firefox:
            >
            Looks pretty good Leigh. I would hope that users would not modify the
            def file outside of the application. As soon as they do they will be
            complaining that fldigi no longer works etc.

            1.31 is being uploaded right now and should be ready within the hour.

            Dave
          • Leigh L. Klotz, Jr.
            Thanks Dave! Yes, my idea was just showing interoperability with other XML applications. Those boolean parameters automatically showed up as checkboxes because
            Message 5 of 5 , Mar 4 7:05 PM
            • 0 Attachment
              Thanks Dave!
              Yes, my idea was just showing interoperability with other XML applications.
              Those boolean parameters automatically showed up as checkboxes because
              Mozilla recoginizes the boolean declaration and value.
              Leigh/WA5ZNU

              w1hkj wrote:
              > Leigh L. Klotz, Jr. wrote:
              >
              >> I've written a sample HTML page to show how the XML data can be viewed
              >> and edited in Firefox:
              >>
              >>
              > Looks pretty good Leigh. I would hope that users would not modify the
              > def file outside of the application. As soon as they do they will be
              > complaining that fldigi no longer works etc.
              >
              > 1.31 is being uploaded right now and should be ready within the hour.
              >
              > Dave
              >
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.