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

Re: [gpsxml] gpx format not valid??

Expand Messages
  • Robert Lipe
    ... They aren t invalid; they re in a private groundspeak namespace. We got around it by implementing that namespace. There are dozens of tools, including
    Message 1 of 10 , Sep 7, 2004
    View Source
    • 0 Attachment
      ariestiger.rm wrote:

      > Note Colons are reserved for use with namespaces. [ ... ]
      > information about which Unicode characters are acceptable letters
      > and digits, see Appendix B of the XML specification.
      >
      > This would make the format of the gpx file used by Geocaching
      > invalid. If any of you have worked with this format, how have you
      > gotten around this problem.

      They aren't invalid; they're in a private groundspeak namespace. We
      "got around it" by implementing that namespace. There are dozens of
      tools, including my own GPSBabel, that handle all this just fine.

      RJL
    • Kevin Z Grey
      If you send a snippet of the XML, someone might be able to help you. I m not sure if you re saying that you re having trouble parsing XML Namespaces in
      Message 2 of 10 , Sep 7, 2004
      View Source
      • 0 Attachment
        If you send a snippet of the XML, someone might be able to help you. I'm
        not sure if you're saying that you're having trouble parsing XML Namespaces
        in general or if someone puts a malformed colon in XML you're trying to
        parse.

        _____

        From: ariestiger.rm [mailto:ariestiger@...]
        Sent: Tuesday, September 07, 2004 9:41 AM
        To: gpsxml@yahoogroups.com
        Subject: [gpsxml] gpx format not valid??

        I was working with a tool to make my own parser for the gpx file
        from Geocaching.com. I ran into a problem where the naming of
        elements included a ":" and the code I was using would not recognize
        the element name. This was found by a colleague of mine.

        Microsoft XML 4.0 Parser SDK
        XML Developer's Guide / Concepts / document Map / Elements

        Element Names
        All elements must have names. Element names are case-sensitive and
        must start with a letter or underscore. An element name can contain
        letters, digits, hyphens, underscores, and periods.

        Note Colons are reserved for use with namespaces. For more
        information about which Unicode characters are acceptable letters
        and digits, see Appendix B of the XML specification.

        This would make the format of the gpx file used by Geocaching
        invalid. If any of you have worked with this format, how have you
        gotten around this problem.

        Tigg





        Yahoo! Groups Sponsor


        ADVERTISEMENT

        <http://us.ard.yahoo.com/SIG=129hm1po8/M=298184.5285298.6392945.3001176/D=gr
        oups/S=1706030390:HM/EXP=1094661681/A=2319498/R=0/SIG=11thfntfp/*http:/www.n
        etflix.com/Default?mqso=60185352&partid=5285298> click here


        <http://us.adserver.yahoo.com/l?M=298184.5285298.6392945.3001176/D=groups/S=
        :HM/A=2319498/rand=883702057>

        _____

        Yahoo! Groups Links
        * To visit your group on the web, go to:
        http://groups.yahoo.com/group/gpsxml/

        * To unsubscribe from this group, send an email to:
        gpsxml-unsubscribe@yahoogroups.com
        <mailto:gpsxml-unsubscribe@yahoogroups.com?subject=Unsubscribe>

        * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
        <http://docs.yahoo.com/info/terms/> .


        [Non-text portions of this message have been removed]
      • ariestiger.rm
        They aren t invalid; they re in a private groundspeak namespace. We got around it by implementing that namespace. There are dozens of tools, including my
        Message 3 of 10 , Sep 7, 2004
        View Source
        • 0 Attachment
          They aren't invalid; they're in a private groundspeak namespace. We
          "got around it" by implementing that namespace. There are dozens of
          tools, including my own GPSBabel, that handle all this just fine.


          So how does one go about implementing a private namespace so one can
          properly read this file? Is it like using a library that defines
          the namespace? Is there a particular language that one needs to
          program in to be able to read it properly?

          Thanks for the help.

          BTW I like GPSBabel.

          Tigg
        • Robert Lipe
          ... Private namespaces allow folks (like Groundspeak) to extend the base spec definitions in a way that won t conflict with others and keeps their peanut
          Message 4 of 10 , Sep 7, 2004
          View Source
          • 0 Attachment
            ariestiger.rm wrote:

            > So how does one go about implementing a private namespace so one can
            > properly read this file? Is it like using a library that defines
            > the namespace?

            Private namespaces allow folks (like Groundspeak) to extend the base
            spec definitions in a way that won't conflict with others and keeps
            their peanut butter out of everyone else's chocolate.

            At the risk of sounding rude, documentation on XML is plentiful in
            bookstores and the web. One such is:
            http://www.xml.com/pub/a/1999/01/3namespace.html
            a few minutes on your favorite search engine should uncover a wealth
            of information.

            > Is there a particular language that one needs to
            > program in to be able to read it properly?

            You could program it in Fortran, Forth, RPG, assembler, or anything else
            that aroused you.

            "It's a mere matter of programming."

            Source for GPSBabel is available if you want to see one possible
            approach.

            RJL
          • Dan Foster
            Hello, Someone pointed out to me off-list that and were removed from in GPX 1.1. GPX 1.1 defines , , and
            Message 5 of 10 , Sep 7, 2004
            View Source
            • 0 Attachment
              Hello,

              Someone pointed out to me off-list that <course> and <speed> were
              removed from <trkpt> in GPX 1.1. GPX 1.1 defines <wpt>, <rtept>, and
              <trkpt> identically. In GPX 1.0, <trkpt> contained these two extra
              elements.

              Should we add these elements back into the GPX 1.1 schema?
              Should we leave them out, and anyone who wants to use them can create
              a new namespace to handle them?

              If you are currently using these elements or have an opinion on how we
              should proceed, please speak out.

              --
              Dan Foster
            • balloon_flyer
              I, for one, would like to see the changes for and implemented in GPX 1_1 as this was a very nice feature in 1_0 and I would hate to see us go
              Message 6 of 10 , Sep 7, 2004
              View Source
              • 0 Attachment
                I, for one, would like to see the changes for <course> and <speed>
                implemented in GPX 1_1 as this was a very nice feature in 1_0 and I
                would hate to see us go backwards in functionality. Most applications
                that generate track files have these elements in place and it would
                be a shame to have to extend the schema to get these elements back.
                Although it's not extremely difficult to extend the schema (as
                goundspeek has done) it's just another step that we will have to go
                through to implement tracks as they have been in the past.

                I'm suprised that others havn't tried validating their existing .gpx
                files against the new schema yet. Maybe I'm the only one out there
                buildin track files in GPX?

                See Yah
                --- In gpsxml@yahoogroups.com, Dan Foster <egroups@t...> wrote:
                > Hello,
                >
                > Someone pointed out to me off-list that <course> and <speed> were
                > removed from <trkpt> in GPX 1.1. GPX 1.1 defines <wpt>, <rtept>,
                and
                > <trkpt> identically. In GPX 1.0, <trkpt> contained these two extra
                > elements.
                >
                > Should we add these elements back into the GPX 1.1 schema?
                > Should we leave them out, and anyone who wants to use them can
                create
                > a new namespace to handle them?
                >
                > If you are currently using these elements or have an opinion on how
                we
                > should proceed, please speak out.
                >
                > --
                > Dan Foster
              • ariestiger.rm
                Thanks for the help and the direction to the xml site. Found out why I could not call the groundspeak elements and am able to work with it. Thanks for the
                Message 7 of 10 , Sep 7, 2004
                View Source
                • 0 Attachment
                  Thanks for the help and the direction to the xml site. Found out
                  why I could not call the groundspeak elements and am able to work
                  with it. Thanks for the help.
                • balloon_flyer
                  Here is a quick example of how to extend the GPX_1_0 schema using a Navaid Waypoint Generator File. Note the line starting with xmls:bpt=.... This sets up an
                  Message 8 of 10 , Sep 9, 2004
                  View Source
                  • 0 Attachment
                    Here is a quick example of how to extend the GPX_1_0 schema using a
                    Navaid Waypoint Generator File. Note the line starting with
                    xmls:bpt=....
                    This sets up an extended namespace for the xml (gpx) file so that the
                    custom
                    <bpt:freq>123.3</bpt:freq>
                    can be added. This is the communications frequency of the SANDS
                    RANCH,HAVRE,MT,US airport (not really just an example). This file
                    will work with the GPX_1_0 schema file. You should always add these
                    elements to the end of the list of child elements you are extending.
                    BTW the files generated with Navaid Waypoint Generator won't validate
                    straight out of the box as they have a few elements in the wrong
                    order. This example still has the elements in the wrong order. The
                    file works but it just won't pass a XMLSpy validation.

                    This is only one way to extend an xml schema. There are others! I
                    think this is the simple one.

                    See Yah

                    <?xml version="1.0" ?>
                    - <gpx version="1.0" creator="Navaid Waypoint Generator -
                    http://navaid.com/GPX/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
                    instance" xmlns="http://www.topografix.com/GPX/1/0"
                    xmlns:bpt="http://gravityinduceddevelopments.com"
                    xsi:schemaLocation="http://www.topografix.com/GPX/1/0">
                    <author>Paul Tomblin</author>
                    <email>ptomblin@...</email>
                    <url>http://navaid.com/GPX/</url>
                    <urlname>Navaid Waypoint Generator for GPX</urlname>
                    <wpt lat="48.5374983333333" lon="-109.704923611111">
                    <ele>792.48</ele>
                    <name>00MT</name>
                    <cmt>
                    <![CDATA[ SANDS RANCH,HAVRE,MT,US]]>
                    </cmt>
                    <src>FAA</src>
                    <type>AIRPORT</type>
                    <bpt:freq>123.3</bpt:freq>
                    </wpt>
                    </gpx>


                    --- In gpsxml@yahoogroups.com, "ariestiger.rm" <ariestiger@r...>
                    wrote:
                    > Thanks for the help and the direction to the xml site. Found out
                    > why I could not call the groundspeak elements and am able to work
                    > with it. Thanks for the help.
                  • David S. Wissenbach
                    ... I ... applications ... would ... go ... existing .gpx ... An gpx 1.0 file will not validate against the gpx1.1 schema in the very first line, because of
                    Message 9 of 10 , Sep 10, 2004
                    View Source
                    • 0 Attachment
                      --- In gpsxml@yahoogroups.com, "balloon_flyer" <steve_raffaele@s...>
                      wrote:
                      > I, for one, would like to see the changes for <course> and <speed>
                      > implemented in GPX 1_1 as this was a very nice feature in 1_0 and
                      I
                      > would hate to see us go backwards in functionality. Most
                      applications
                      > that generate track files have these elements in place and it
                      would
                      > be a shame to have to extend the schema to get these elements back.
                      > Although it's not extremely difficult to extend the schema (as
                      > goundspeek has done) it's just another step that we will have to
                      go
                      > through to implement tracks as they have been in the past.
                      >
                      > I'm suprised that others havn't tried validating their
                      existing .gpx
                      > files against the new schema yet. Maybe I'm the only one out there
                      > buildin track files in GPX?
                      >

                      An gpx 1.0 file will not validate against the gpx1.1 schema in the
                      very first line, because of the required version="1.1" attribute.

                      I know this because I have validated gpx 1.1 output from Wissenbach
                      Map3D.

                      My approach on compatiblity for Wissenbach Map3D is to read GPX1.0
                      files but output GPX1.1 files, which most applications should be
                      able to parse and read. For best intoperability we are strict
                      conformists when we write, but don't get pedantic when reading.

                      As far as course and speed, I couldn't care less. But I don't object
                      to these remaining in the format if someone else does care!

                      Dave

                      > See Yah
                      > --- In gpsxml@yahoogroups.com, Dan Foster <egroups@t...> wrote:
                      > > Hello,
                      > >
                      > > Someone pointed out to me off-list that <course> and <speed> were
                      > > removed from <trkpt> in GPX 1.1. GPX 1.1 defines <wpt>,
                      <rtept>,
                      > and
                      > > <trkpt> identically. In GPX 1.0, <trkpt> contained these two
                      extra
                      > > elements.
                      > >
                      > > Should we add these elements back into the GPX 1.1 schema?
                      > > Should we leave them out, and anyone who wants to use them can
                      > create
                      > > a new namespace to handle them?
                      > >
                      > > If you are currently using these elements or have an opinion on
                      how
                      > we
                      > > should proceed, please speak out.
                      > >
                      > > --
                      > > Dan Foster
                    Your message has been successfully submitted and would be delivered to recipients shortly.