GPX 2 GPX - lost content

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

GPX 2 GPX - lost content

Honza
Hello,

reading of valid GPX has problem with CDATA (see source GPX file in
attachment):

gpsbabel.exe -i gpx -f input.gpx -o gpx -F output.gpx

This conversion lost content of tag 'name'.

I used GPSBabel Version 1.5.1.

Is it possible to preserve comments during conversion (try to see world
"test" inside output GPX file)?

Best,
    Honza


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc

input.gpx (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GPX 2 GPX - lost content

tsteven4-2
This is a problem handling whitespace around CDATA.  A possible workaround is
~/work/gc/trunk3% xmllint --format /media/sf_Shared/input.gpx | ./gpsbabel -i gpx -f - -o gpx -F -
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/1" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
  <metadata>
    <time>2014-06-13T01:13:57.175Z</time>
    <bounds minlat="50.110742109" minlon="14.268908486" maxlat="50.110744183" maxlon="14.268932530"/>
  </metadata>
  <trk>
    <name>Track2013/10/17_10:28</name>
    <trkseg>
      <trkpt lat="50.110744183" lon="14.268932530">
        <ele>443.599030</ele>
        <time>2013-10-17T08:28:38Z</time>
      </trkpt>
      <trkpt lat="50.110742305" lon="14.268908486">
        <ele>441.248108</ele>
        <time>2013-10-17T08:28:43Z</time>
      </trkpt>
      <trkpt lat="50.110742109" lon="14.268909746">
        <ele>441.270203</ele>
        <time>2013-10-17T08:28:47Z</time>
        <name>Lat:50.110742, Lon:14.268910, Ele:441.270203</name>
      </trkpt>
    </trkseg>
  </trk>
</gpx>

On 6/12/2014 4:08 PM, Honza wrote:
Hello,

reading of valid GPX has problem with CDATA (see source GPX file in attachment):

gpsbabel.exe -i gpx -f input.gpx -o gpx -F output.gpx

This conversion lost content of tag 'name'.

I used GPSBabel Version 1.5.1.

Is it possible to preserve comments during conversion (try to see world "test" inside output GPX file)?

Best,
   Honza



------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems


_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|

Re: GPX 2 GPX - lost content

Honza
Hello Steven,

I understand that program changed root tag (e.g. 'creator') or add new
tags (e.g. 'bounds') but the result must content all tags from the
source document if this source document was valid.

I reformatted the source document (remove whitespace) and then the tag
'name' remained in output document.

Unfortunately the output document is not valid GPX document
(see http://www.topografix.com/gpx_validation.asp).
SAXCount.exe" -v=always -n -s -f output.gpx

Best
Honza

Dne 13.6.2014 3:14, tsteven4 napsal(a):

> This is a problem handling whitespace around CDATA.  A possible
> workaround is
>> ~/work/gc/trunk3% xmllint --format /media/sf_Shared/input.gpx |
>> ./gpsbabel -i gpx -f - -o gpx -F -
>> <?xml version="1.0" encoding="UTF-8"?>
>> <gpx version="1.1" creator="GPSBabel - http://www.gpsbabel.org"
>> xmlns="http://www.topografix.com/GPX/1/1"
>> xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
>> xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
>>   <metadata>
>>     <time>2014-06-13T01:13:57.175Z</time>
>>     <bounds minlat="50.110742109" minlon="14.268908486"
>> maxlat="50.110744183" maxlon="14.268932530"/>
>>   </metadata>
>>   <trk>
>>     <name>Track2013/10/17_10:28</name>
>>     <trkseg>
>>       <trkpt lat="50.110744183" lon="14.268932530">
>>         <ele>443.599030</ele>
>>         <time>2013-10-17T08:28:38Z</time>
>>       </trkpt>
>>       <trkpt lat="50.110742305" lon="14.268908486">
>>         <ele>441.248108</ele>
>>         <time>2013-10-17T08:28:43Z</time>
>>       </trkpt>
>>       <trkpt lat="50.110742109" lon="14.268909746">
>>         <ele>441.270203</ele>
>>         <time>2013-10-17T08:28:47Z</time>
>>         <name>Lat:50.110742, Lon:14.268910, Ele:441.270203</name>
>>       </trkpt>
>>     </trkseg>
>>   </trk>
>> </gpx>
>
> On 6/12/2014 4:08 PM, Honza wrote:
>> Hello,
>>
>> reading of valid GPX has problem with CDATA (see source GPX file in
>> attachment):
>>
>> gpsbabel.exe -i gpx -f input.gpx -o gpx -F output.gpx
>>
>> This conversion lost content of tag 'name'.
>>
>> I used GPSBabel Version 1.5.1.
>>
>> Is it possible to preserve comments during conversion (try to see
>> world "test" inside output GPX file)?
>>
>> Best,
>>    Honza
>>
>>
>>
>> ------------------------------------------------------------------------------
>> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
>> Find What Matters Most in Your Big Data with HPCC Systems
>> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
>> http://p.sf.net/sfu/hpccsystems
>>
>>
>> _______________________________________________
>> Gpsbabel-misc mailing listhttp://www.gpsbabel.org
>> [hidden email]
>> To unsubscribe, change list options, or see archives, visit:
>> https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
>

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|

Re: GPX 2 GPX - lost content

tsteven4-2
Honza,

It is possible to reformat the document and not corrupt it.  My
validator is based on Xerces C DOM.  It appears that you somehow
corrupted the document when you reformatted it, but without knowing how
you reformatted it or having the reformatted document I can't say what
happened.  My reformatted document is attached.

> ~/work/gc/trunk3% xmllint --format -o i2.gpx /media/sf_Shared/input.gpx
> ~/work/gc/trunk3% StevesDOMCount -v=always -n -s -f -sc=$HOME/schema
> -slp=gpx11 i2.gpx
> Using schemaLocation: "http://www.topografix.com/GPX/1/1 
> /home/tsteven4/schema/gpx11/gpx.xsd
> http://www.garmin.com/xmlschemas/GpxExtensions/v3 
> /home/tsteven4/schema/gpx11/GpxExtensionsv3.xsd
> http://www.garmin.com/xmlschemas/TrackPointExtension/v1 
> /home/tsteven4/schema/gpx11/TrackPointExtensionv1.xsd"
> i2.gpx: 11 ms (16 elems).
> ~/work/gc/trunk3% ./gpsbabel -i gpx -f i2.gpx -o gpx -F -
> <?xml version="1.0" encoding="UTF-8"?>
> <gpx version="1.1" creator="GPSBabel - http://www.gpsbabel.org"
> xmlns="http://www.topografix.com/GPX/1/1"
> xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
> xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
>   <metadata>
>     <time>2014-06-14T12:24:11.782Z</time>
>     <bounds minlat="50.110742109" minlon="14.268908486"
> maxlat="50.110744183" maxlon="14.268932530"/>
>   </metadata>
>   <trk>
>     <name>Track2013/10/17_10:28</name>
>     <trkseg>
>       <trkpt lat="50.110744183" lon="14.268932530">
>         <ele>443.599030</ele>
>         <time>2013-10-17T08:28:38Z</time>
>       </trkpt>
>       <trkpt lat="50.110742305" lon="14.268908486">
>         <ele>441.248108</ele>
>         <time>2013-10-17T08:28:43Z</time>
>       </trkpt>
>       <trkpt lat="50.110742109" lon="14.268909746">
>         <ele>441.270203</ele>
>         <time>2013-10-17T08:28:47Z</time>
>         <name>Lat:50.110742, Lon:14.268910, Ele:441.270203</name>
>       </trkpt>
>     </trkseg>
>   </trk>
> </gpx>
Steve
On 6/14/2014 6:09 AM, Honza wrote:

> Hello Steven,
>
> I understand that program changed root tag (e.g. 'creator') or add new
> tags (e.g. 'bounds') but the result must content all tags from the
> source document if this source document was valid.
>
> I reformatted the source document (remove whitespace) and then the tag
> 'name' remained in output document.
>
> Unfortunately the output document is not valid GPX document
> (see http://www.topografix.com/gpx_validation.asp).
> SAXCount.exe" -v=always -n -s -f output.gpx
>
> Best
> Honza
>
> Dne 13.6.2014 3:14, tsteven4 napsal(a):
>> This is a problem handling whitespace around CDATA.  A possible
>> workaround is
>>> ~/work/gc/trunk3% xmllint --format /media/sf_Shared/input.gpx |
>>> ./gpsbabel -i gpx -f - -o gpx -F -
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <gpx version="1.1" creator="GPSBabel - http://www.gpsbabel.org"
>>> xmlns="http://www.topografix.com/GPX/1/1"
>>> xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
>>> xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
>>>   <metadata>
>>>     <time>2014-06-13T01:13:57.175Z</time>
>>>     <bounds minlat="50.110742109" minlon="14.268908486"
>>> maxlat="50.110744183" maxlon="14.268932530"/>
>>>   </metadata>
>>>   <trk>
>>>     <name>Track2013/10/17_10:28</name>
>>>     <trkseg>
>>>       <trkpt lat="50.110744183" lon="14.268932530">
>>>         <ele>443.599030</ele>
>>>         <time>2013-10-17T08:28:38Z</time>
>>>       </trkpt>
>>>       <trkpt lat="50.110742305" lon="14.268908486">
>>>         <ele>441.248108</ele>
>>>         <time>2013-10-17T08:28:43Z</time>
>>>       </trkpt>
>>>       <trkpt lat="50.110742109" lon="14.268909746">
>>>         <ele>441.270203</ele>
>>>         <time>2013-10-17T08:28:47Z</time>
>>>         <name>Lat:50.110742, Lon:14.268910, Ele:441.270203</name>
>>>       </trkpt>
>>>     </trkseg>
>>>   </trk>
>>> </gpx>
>>
>> On 6/12/2014 4:08 PM, Honza wrote:
>>> Hello,
>>>
>>> reading of valid GPX has problem with CDATA (see source GPX file in
>>> attachment):
>>>
>>> gpsbabel.exe -i gpx -f input.gpx -o gpx -F output.gpx
>>>
>>> This conversion lost content of tag 'name'.
>>>
>>> I used GPSBabel Version 1.5.1.
>>>
>>> Is it possible to preserve comments during conversion (try to see
>>> world "test" inside output GPX file)?
>>>
>>> Best,
>>>    Honza
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> HPCC Systems Open Source Big Data Platform from LexisNexis Risk
>>> Solutions
>>> Find What Matters Most in Your Big Data with HPCC Systems
>>> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>>> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
>>> http://p.sf.net/sfu/hpccsystems
>>>
>>>
>>> _______________________________________________
>>> Gpsbabel-misc mailing listhttp://www.gpsbabel.org
>>> [hidden email]
>>> To unsubscribe, change list options, or see archives, visit:
>>> https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
>>

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc

i2.gpx (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GPX 2 GPX - lost content

Honza
Steve,

I did the same changes like your in 'i2.gpx'.
gpsbabel -i gpx -f i2.gpx -o gpx -F o2.gpx

I am using Xerces (http://xerces.apache.org/) too:
SAXCount.exe -v=always -n -s -f o2.gpx

Program returns many errors due missing 'xsi:schemaLocation' inside file
'o2.gpx'.

Is it possible to see a log with ignoring input of gpsbabel (e.g. option
-D9 do not produce it).

For source i2.gpx:
- line 2: creator XXX
- line 2: xsi:schemaLocation XXX

For source input.gpx:
- same like prevoius
- line X: comment XXX
- line X: name XXX
- line X: name XXX

The base of my question is that I want to merge some GPX files and I do
not want lost the content.

Honza


Dne 14.6.2014 14:29, tsteven4 napsal(a):

> Honza,
>
> It is possible to reformat the document and not corrupt it.  My
> validator is based on Xerces C DOM.  It appears that you somehow
> corrupted the document when you reformatted it, but without knowing how
> you reformatted it or having the reformatted document I can't say what
> happened.  My reformatted document is attached.
>> ~/work/gc/trunk3% xmllint --format -o i2.gpx /media/sf_Shared/input.gpx
>> ~/work/gc/trunk3% StevesDOMCount -v=always -n -s -f -sc=$HOME/schema
>> -slp=gpx11 i2.gpx
>> Using schemaLocation: "http://www.topografix.com/GPX/1/1
>> /home/tsteven4/schema/gpx11/gpx.xsd
>> http://www.garmin.com/xmlschemas/GpxExtensions/v3
>> /home/tsteven4/schema/gpx11/GpxExtensionsv3.xsd
>> http://www.garmin.com/xmlschemas/TrackPointExtension/v1
>> /home/tsteven4/schema/gpx11/TrackPointExtensionv1.xsd"
>> i2.gpx: 11 ms (16 elems).
>> ~/work/gc/trunk3% ./gpsbabel -i gpx -f i2.gpx -o gpx -F -
>> <?xml version="1.0" encoding="UTF-8"?>
>> <gpx version="1.1" creator="GPSBabel - http://www.gpsbabel.org"
>> xmlns="http://www.topografix.com/GPX/1/1"
>> xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
>> xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
>>   <metadata>
>>     <time>2014-06-14T12:24:11.782Z</time>
>>     <bounds minlat="50.110742109" minlon="14.268908486"
>> maxlat="50.110744183" maxlon="14.268932530"/>
>>   </metadata>
>>   <trk>
>>     <name>Track2013/10/17_10:28</name>
>>     <trkseg>
>>       <trkpt lat="50.110744183" lon="14.268932530">
>>         <ele>443.599030</ele>
>>         <time>2013-10-17T08:28:38Z</time>
>>       </trkpt>
>>       <trkpt lat="50.110742305" lon="14.268908486">
>>         <ele>441.248108</ele>
>>         <time>2013-10-17T08:28:43Z</time>
>>       </trkpt>
>>       <trkpt lat="50.110742109" lon="14.268909746">
>>         <ele>441.270203</ele>
>>         <time>2013-10-17T08:28:47Z</time>
>>         <name>Lat:50.110742, Lon:14.268910, Ele:441.270203</name>
>>       </trkpt>
>>     </trkseg>
>>   </trk>
>> </gpx>
>
> Steve
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>>
>>>> HPCC Systems Open Source Big Data Platform from LexisNexis Risk
>>>> Solutions
>>>> Find What Matters Most in Your Big Data with HPCC Systems
>>>> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>>>> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
>>>> http://p.sf.net/sfu/hpccsystems
>>>>
>>>>
>>>> _______________________________________________
>>>> Gpsbabel-misc mailing listhttp://www.gpsbabel.org
>>>> [hidden email]
>>>> To unsubscribe, change list options, or see archives, visit:
>>>> https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
>>>
>

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|

Re: GPX 2 GPX - lost content

tsteven4-2
Honza,

I think o2.gpx is probably valid.  The output I create from your
reformmated input is valid.  We don't use optional the
xsi:schemaLocation, which means you need to provide the schema location
to your validator if you want to verify schema conformance.  The options
you are using with SAXCount are requesting checks against the schema.  
This is why I modified DOMCount, so I can tell it where the schema are.

If you send me your output I will validate it.

Steve

On 6/14/2014 6:58 AM, Honza wrote:

> Steve,
>
> I did the same changes like your in 'i2.gpx'.
> gpsbabel -i gpx -f i2.gpx -o gpx -F o2.gpx
>
> I am using Xerces (http://xerces.apache.org/) too:
> SAXCount.exe -v=always -n -s -f o2.gpx
>
> Program returns many errors due missing 'xsi:schemaLocation' inside
> file 'o2.gpx'.
>
> Is it possible to see a log with ignoring input of gpsbabel (e.g.
> option -D9 do not produce it).
>
> For source i2.gpx:
> - line 2: creator XXX
> - line 2: xsi:schemaLocation XXX
>
> For source input.gpx:
> - same like prevoius
> - line X: comment XXX
> - line X: name XXX
> - line X: name XXX
>
> The base of my question is that I want to merge some GPX files and I
> do not want lost the content.
>
> Honza
>
>
> Dne 14.6.2014 14:29, tsteven4 napsal(a):
>> Honza,
>>
>> It is possible to reformat the document and not corrupt it.  My
>> validator is based on Xerces C DOM.  It appears that you somehow
>> corrupted the document when you reformatted it, but without knowing how
>> you reformatted it or having the reformatted document I can't say what
>> happened.  My reformatted document is attached.
>>> ~/work/gc/trunk3% xmllint --format -o i2.gpx /media/sf_Shared/input.gpx
>>> ~/work/gc/trunk3% StevesDOMCount -v=always -n -s -f -sc=$HOME/schema
>>> -slp=gpx11 i2.gpx
>>> Using schemaLocation: "http://www.topografix.com/GPX/1/1
>>> /home/tsteven4/schema/gpx11/gpx.xsd
>>> http://www.garmin.com/xmlschemas/GpxExtensions/v3
>>> /home/tsteven4/schema/gpx11/GpxExtensionsv3.xsd
>>> http://www.garmin.com/xmlschemas/TrackPointExtension/v1
>>> /home/tsteven4/schema/gpx11/TrackPointExtensionv1.xsd"
>>> i2.gpx: 11 ms (16 elems).
>>> ~/work/gc/trunk3% ./gpsbabel -i gpx -f i2.gpx -o gpx -F -
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <gpx version="1.1" creator="GPSBabel - http://www.gpsbabel.org"
>>> xmlns="http://www.topografix.com/GPX/1/1"
>>> xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
>>> xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
>>>   <metadata>
>>>     <time>2014-06-14T12:24:11.782Z</time>
>>>     <bounds minlat="50.110742109" minlon="14.268908486"
>>> maxlat="50.110744183" maxlon="14.268932530"/>
>>>   </metadata>
>>>   <trk>
>>>     <name>Track2013/10/17_10:28</name>
>>>     <trkseg>
>>>       <trkpt lat="50.110744183" lon="14.268932530">
>>>         <ele>443.599030</ele>
>>>         <time>2013-10-17T08:28:38Z</time>
>>>       </trkpt>
>>>       <trkpt lat="50.110742305" lon="14.268908486">
>>>         <ele>441.248108</ele>
>>>         <time>2013-10-17T08:28:43Z</time>
>>>       </trkpt>
>>>       <trkpt lat="50.110742109" lon="14.268909746">
>>>         <ele>441.270203</ele>
>>>         <time>2013-10-17T08:28:47Z</time>
>>>         <name>Lat:50.110742, Lon:14.268910, Ele:441.270203</name>
>>>       </trkpt>
>>>     </trkseg>
>>>   </trk>
>>> </gpx>
>>
>> Steve
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>>
>>>>>
>>>>> HPCC Systems Open Source Big Data Platform from LexisNexis Risk
>>>>> Solutions
>>>>> Find What Matters Most in Your Big Data with HPCC Systems
>>>>> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>>>>> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
>>>>> http://p.sf.net/sfu/hpccsystems
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Gpsbabel-misc mailing listhttp://www.gpsbabel.org
>>>>> [hidden email]
>>>>> To unsubscribe, change list options, or see archives, visit:
>>>>> https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
>>>>
>>


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|

Re: GPX 2 GPX - lost content

Honza
Steve,

Yes, I checked it again XSD and the output is valid.
I even found that you remove this attribute from gpsbabel during 2013.

Thank you for your support and sorry for my English. Maybe my questions
was not so clear.

I wrote short script in perl (package XML::Twig) to solve my doubt about
losing tags (options keep_atts_order => 1, comments => 'keep') during today:
- it does not lost tags (no problem with whitespace)
- it preserve comments
- it does not "translate" CDATA (no problem with non ASCII letters /ř,
š, č etc./ inside).

I hoped that I could use existing SW to avoid my own lost labour.
Good luck to improve "your" XML parser.

Honza

Dne 14.6.2014 16:55, tsteven4 napsal(a):

> Honza,
>
> I think o2.gpx is probably valid.  The output I create from your
> reformmated input is valid.  We don't use optional the
> xsi:schemaLocation, which means you need to provide the schema location
> to your validator if you want to verify schema conformance.  The options
> you are using with SAXCount are requesting checks against the schema.
> This is why I modified DOMCount, so I can tell it where the schema are.
>
> If you send me your output I will validate it.
>
> Steve
>
> On 6/14/2014 6:58 AM, Honza wrote:
>> Steve,
>>
>> I did the same changes like your in 'i2.gpx'.
>> gpsbabel -i gpx -f i2.gpx -o gpx -F o2.gpx
>>
>> I am using Xerces (http://xerces.apache.org/) too:
>> SAXCount.exe -v=always -n -s -f o2.gpx
>>
>> Program returns many errors due missing 'xsi:schemaLocation' inside
>> file 'o2.gpx'.
>>
>> Is it possible to see a log with ignoring input of gpsbabel (e.g.
>> option -D9 do not produce it).
>>
>> For source i2.gpx:
>> - line 2: creator XXX
>> - line 2: xsi:schemaLocation XXX
>>
>> For source input.gpx:
>> - same like prevoius
>> - line X: comment XXX
>> - line X: name XXX
>> - line X: name XXX
>>
>> The base of my question is that I want to merge some GPX files and I
>> do not want lost the content.
>>
>> Honza
>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>>
>>>>>>
>>>>>> HPCC Systems Open Source Big Data Platform from LexisNexis Risk
>>>>>> Solutions
>>>>>> Find What Matters Most in Your Big Data with HPCC Systems
>>>>>> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>>>>>> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
>>>>>> http://p.sf.net/sfu/hpccsystems
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Gpsbabel-misc mailing listhttp://www.gpsbabel.org
>>>>>> [hidden email]
>>>>>> To unsubscribe, change list options, or see archives, visit:
>>>>>> https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
>>>>>
>>>
>

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|

Re: GPX 2 GPX - lost content

Robert Lipe-4
Thanx for the good test case, Honza.  You're correct that we don't handle the case of [data not in a cdata][cdata][datanotinacdata] very well.

We do handle correctly encoded non-ASCII data fine in GPX.  If you see otherwise, I'd welcome a test case.  Preserving comments and atrribute order isn't a goal for us.  We translate formats; we're not a general purpose XML editor.

Steve, I think that our cdata reader just needs to handle being called multiple times and concatenate all it gets until it sees and end.  If you don't hate the attached patch, please feel free to commit it.  (I'm going back on the road...)  It passes a testo.




On Sat, Jun 14, 2014 at 11:13 AM, Honza <[hidden email]> wrote:
Steve,

Yes, I checked it again XSD and the output is valid.
I even found that you remove this attribute from gpsbabel during 2013.

Thank you for your support and sorry for my English. Maybe my questions
was not so clear.

I wrote short script in perl (package XML::Twig) to solve my doubt about
losing tags (options keep_atts_order => 1, comments => 'keep') during today:
- it does not lost tags (no problem with whitespace)
- it preserve comments
- it does not "translate" CDATA (no problem with non ASCII letters /ř,
š, č etc./ inside).

I hoped that I could use existing SW to avoid my own lost labour.
Good luck to improve "your" XML parser.

Honza

Dne 14.6.2014 16:55, tsteven4 napsal(a):
> Honza,
>
> I think o2.gpx is probably valid.  The output I create from your
> reformmated input is valid.  We don't use optional the
> xsi:schemaLocation, which means you need to provide the schema location
> to your validator if you want to verify schema conformance.  The options
> you are using with SAXCount are requesting checks against the schema.
> This is why I modified DOMCount, so I can tell it where the schema are.
>
> If you send me your output I will validate it.
>
> Steve
>
> On 6/14/2014 6:58 AM, Honza wrote:
>> Steve,
>>
>> I did the same changes like your in 'i2.gpx'.
>> gpsbabel -i gpx -f i2.gpx -o gpx -F o2.gpx
>>
>> I am using Xerces (http://xerces.apache.org/) too:
>> SAXCount.exe -v=always -n -s -f o2.gpx
>>
>> Program returns many errors due missing 'xsi:schemaLocation' inside
>> file 'o2.gpx'.
>>
>> Is it possible to see a log with ignoring input of gpsbabel (e.g.
>> option -D9 do not produce it).
>>
>> For source i2.gpx:
>> - line 2: creator XXX
>> - line 2: xsi:schemaLocation XXX
>>
>> For source input.gpx:
>> - same like prevoius
>> - line X: comment XXX
>> - line X: name XXX
>> - line X: name XXX
>>
>> The base of my question is that I want to merge some GPX files and I
>> do not want lost the content.
>>
>> Honza
>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>>
>>>>>>
>>>>>> HPCC Systems Open Source Big Data Platform from LexisNexis Risk
>>>>>> Solutions
>>>>>> Find What Matters Most in Your Big Data with HPCC Systems
>>>>>> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>>>>>> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
>>>>>> http://p.sf.net/sfu/hpccsystems
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Gpsbabel-misc mailing listhttp://www.gpsbabel.org
>>>>>> [hidden email]
>>>>>> To unsubscribe, change list options, or see archives, visit:
>>>>>> https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
>>>>>
>>>
>

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc

gpx.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GPX 2 GPX - lost content

Honza
Robert,

It was my pleasure.

ad non-ASCII)
We used strange sentence for testing encoding:
"Příliš žluťoučký kůň úpěl ďábelské kódy."
"PŘÍLIŠ ŽLUŤOUČKÝ KŮŇ ÚPĚL ĎÁBELSKÉ KÓDY."
I prepare sample for testing - see attachment.

I checked again the encoding of the document and it was not in UTF-8.
The program GPSBabel has no problem (except whitespace) with this file
after this missed conversion.

ad Preserving attribute)
I just use it for easier comparison between input and output files.

ad Preserving comments)
I understand you but losing any contents of source file is not good
result. If I can choose and I have space on my disk I prefer lossless
conversion...

Honza


Dne 14.6.2014 23:16, Robert Lipe napsal(a):

> Thanx for the good test case, Honza.  You're correct that we don't
> handle the case of [data not in a cdata][cdata][datanotinacdata] very well.
>
> We do handle correctly encoded non-ASCII data fine in GPX.  If you see
> otherwise, I'd welcome a test case.  Preserving comments and atrribute
> order isn't a goal for us.  We translate formats; we're not a general
> purpose XML editor.
>
> Steve, I think that our cdata reader just needs to handle being called
> multiple times and concatenate all it gets until it sees and end.  If
> you don't hate the attached patch, please feel free to commit it.  (I'm
> going back on the road...)  It passes a testo.
>
>
>
>
> On Sat, Jun 14, 2014 at 11:13 AM, Honza <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Steve,
>
>     Yes, I checked it again XSD and the output is valid.
>     I even found that you remove this attribute from gpsbabel during 2013.
>
>     Thank you for your support and sorry for my English. Maybe my questions
>     was not so clear.
>
>     I wrote short script in perl (package XML::Twig) to solve my doubt about
>     losing tags (options keep_atts_order => 1, comments => 'keep')
>     during today:
>     - it does not lost tags (no problem with whitespace)
>     - it preserve comments
>     - it does not "translate" CDATA (no problem with non ASCII letters /ř,
>     š, č etc./ inside).
>
>     I hoped that I could use existing SW to avoid my own lost labour.
>     Good luck to improve "your" XML parser.
>
>     Honza
>
>     Dne 14.6.2014 16:55, tsteven4 napsal(a):
>      > Honza,
>      >
>      > I think o2.gpx is probably valid.  The output I create from your
>      > reformmated input is valid.  We don't use optional the
>      > xsi:schemaLocation, which means you need to provide the schema
>     location
>      > to your validator if you want to verify schema conformance.  The
>     options
>      > you are using with SAXCount are requesting checks against the schema.
>      > This is why I modified DOMCount, so I can tell it where the
>     schema are.
>      >
>      > If you send me your output I will validate it.
>      >
>      > Steve
>      >
>      > On 6/14/2014 6:58 AM, Honza wrote:
>      >> Steve,
>      >>
>      >> I did the same changes like your in 'i2.gpx'.
>      >> gpsbabel -i gpx -f i2.gpx -o gpx -F o2.gpx
>      >>
>      >> I am using Xerces (http://xerces.apache.org/) too:
>      >> SAXCount.exe -v=always -n -s -f o2.gpx
>      >>
>      >> Program returns many errors due missing 'xsi:schemaLocation' inside
>      >> file 'o2.gpx'.
>      >>
>      >> Is it possible to see a log with ignoring input of gpsbabel (e.g.
>      >> option -D9 do not produce it).
>      >>
>      >> For source i2.gpx:
>      >> - line 2: creator XXX
>      >> - line 2: xsi:schemaLocation XXX
>      >>
>      >> For source input.gpx:
>      >> - same like prevoius
>      >> - line X: comment XXX
>      >> - line X: name XXX
>      >> - line X: name XXX
>      >>
>      >> The base of my question is that I want to merge some GPX files and I
>      >> do not want lost the content.
>      >>
>      >> Honza
>      >>
>      >>>>>>
>      >>>>>>
>      >>>>>>
>     ------------------------------------------------------------------------------
>      >>>>>>
>      >>>>>>
>      >>>>>> HPCC Systems Open Source Big Data Platform from LexisNexis Risk
>      >>>>>> Solutions
>      >>>>>> Find What Matters Most in Your Big Data with HPCC Systems
>      >>>>>> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>      >>>>>> Leverages Graph Analysis for Fast Processing & Easy Data
>     Exploration
>      >>>>>> http://p.sf.net/sfu/hpccsystems
>      >>>>>>
>      >>>>>>
>      >>>>>> _______________________________________________
>      >>>>>> Gpsbabel-misc mailing listhttp://www.gpsbabel.org
>     <http://www.gpsbabel.org>
>      >>>>>> [hidden email]
>     <mailto:[hidden email]>
>      >>>>>> To unsubscribe, change list options, or see archives, visit:
>      >>>>>> https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
>      >>>>>
>      >>>
>      >
>
>     ------------------------------------------------------------------------------
>     HPCC Systems Open Source Big Data Platform from LexisNexis Risk
>     Solutions
>     Find What Matters Most in Your Big Data with HPCC Systems
>     Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>     Leverages Graph Analysis for Fast Processing & Easy Data Exploration
>     http://p.sf.net/sfu/hpccsystems
>     _______________________________________________
>     Gpsbabel-misc mailing list http://www.gpsbabel.org
>     [hidden email]
>     <mailto:[hidden email]>
>     To unsubscribe, change list options, or see archives, visit:
>     https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
>
>

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc

i3.gpx (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GPX 2 GPX - lost content

Robert Lipe-4



On Sat, Jun 14, 2014 at 5:46 PM, Honza <[hidden email]> wrote:
Robert,

It was my pleasure.

ad non-ASCII)
We used strange sentence for testing encoding:
"Příliš žluťoučký kůň úpěl ďábelské kódy."
"PŘÍLIŠ ŽLUŤOUČKÝ KŮŇ ÚPĚL ĎÁBELSKÉ KÓDY."
I prepare sample for testing - see attachment.

Which, modulo the issue we have a fix pending for you regarding your program's pointless use of CDATA after whitespace, we read and write just fine.

$ ./gpsbabel -i gpx -f ~/Downloads/i3.gpx  -o gpx -F - | head
<?xml version="1.0" encoding="UTF-8"?>
  <metadata>
    <time>2014-06-14T22:49:54.599Z</time>
    <bounds minlat="50.110742109" minlon="14.268908486" maxlat="50.110744183" maxlon="14.268932530"/>
  </metadata>
  <trk>
    <name>Příliš žluťoučký kůň úpěl ďábelské kódy.</name>
    <trkseg>
      <trkpt lat="50.110744183" lon="14.268932530">

As an aside, writing the Byte Order Mark in GPX, like you or your program seems to be doing, is somewhere between bad and wrong for UTF-8.  It definitely reduces the number of apps that can read GPX.   I know that Viking, Basecamp, and several GPSes won't read such files.  So if you have any influence on that writer, encourage omitting the BOM.
 
ad Preserving comments)
I understand you but losing any contents of source file is not good result. If I can choose and I have space on my disk I prefer lossless conversion...

Our goals are misaligned.

GPSBabel can convert between literally hundreds of formats.  We can't preserve every nuance of any arbitrary source file in any arbitrary destination.  If you convert GPX to CSV and then back to GPX, it's not like you're going to have comments. So while <name>my <!-- comment super cool --> place</name> might be a useful thing in your source, we simply don't have an internal representation that holds that.  It becomes "my place" pretty quickly.

Well, because of the bug you pointed out, I think it actually becomes "my " instead, but I hope you get the point.  We just can't preserve whitespace and comments and such.  If that's something you need, GPSBabel is the wrong tool for you.
 

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|

Re: GPX 2 GPX - lost content

tsteven4-2
In reply to this post by Robert Lipe-4
Robert,

This appears to be essentially equivalent to what I had, concatenate + trim.  I am not convinced it adheres to the letter of the law about ignorable whitespace, but I think it is clearly better than  what we do now.  I will commit something along these lines.  It would be nice if QXmlStreamReader handled the distinction between ignorable and non-ignorable whitespace.

Steve

On 6/14/2014 3:16 PM, Robert Lipe wrote:
Thanx for the good test case, Honza.  You're correct that we don't handle the case of [data not in a cdata][cdata][datanotinacdata] very well.

We do handle correctly encoded non-ASCII data fine in GPX.  If you see otherwise, I'd welcome a test case.  Preserving comments and atrribute order isn't a goal for us.  We translate formats; we're not a general purpose XML editor.

Steve, I think that our cdata reader just needs to handle being called multiple times and concatenate all it gets until it sees and end.  If you don't hate the attached patch, please feel free to commit it.  (I'm going back on the road...)  It passes a testo.




On Sat, Jun 14, 2014 at 11:13 AM, Honza <[hidden email]> wrote:
Steve,

Yes, I checked it again XSD and the output is valid.
I even found that you remove this attribute from gpsbabel during 2013.

Thank you for your support and sorry for my English. Maybe my questions
was not so clear.

I wrote short script in perl (package XML::Twig) to solve my doubt about
losing tags (options keep_atts_order => 1, comments => 'keep') during today:
- it does not lost tags (no problem with whitespace)
- it preserve comments
- it does not "translate" CDATA (no problem with non ASCII letters /ř,
š, č etc./ inside).

I hoped that I could use existing SW to avoid my own lost labour.
Good luck to improve "your" XML parser.

Honza

Dne 14.6.2014 16:55, tsteven4 napsal(a):
> Honza,
>
> I think o2.gpx is probably valid.  The output I create from your
> reformmated input is valid.  We don't use optional the
> xsi:schemaLocation, which means you need to provide the schema location
> to your validator if you want to verify schema conformance.  The options
> you are using with SAXCount are requesting checks against the schema.
> This is why I modified DOMCount, so I can tell it where the schema are.
>
> If you send me your output I will validate it.
>
> Steve
>
> On 6/14/2014 6:58 AM, Honza wrote:
>> Steve,
>>
>> I did the same changes like your in 'i2.gpx'.
>> gpsbabel -i gpx -f i2.gpx -o gpx -F o2.gpx
>>
>> I am using Xerces (http://xerces.apache.org/) too:
>> SAXCount.exe -v=always -n -s -f o2.gpx
>>
>> Program returns many errors due missing 'xsi:schemaLocation' inside
>> file 'o2.gpx'.
>>
>> Is it possible to see a log with ignoring input of gpsbabel (e.g.
>> option -D9 do not produce it).
>>
>> For source i2.gpx:
>> - line 2: creator XXX
>> - line 2: xsi:schemaLocation XXX
>>
>> For source input.gpx:
>> - same like prevoius
>> - line X: comment XXX
>> - line X: name XXX
>> - line X: name XXX
>>
>> The base of my question is that I want to merge some GPX files and I
>> do not want lost the content.
>>
>> Honza
>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>>
>>>>>>
>>>>>> HPCC Systems Open Source Big Data Platform from LexisNexis Risk
>>>>>> Solutions
>>>>>> Find What Matters Most in Your Big Data with HPCC Systems
>>>>>> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>>>>>> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
>>>>>> http://p.sf.net/sfu/hpccsystems
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Gpsbabel-misc mailing listhttp://www.gpsbabel.org
>>>>>> [hidden email]
>>>>>> To unsubscribe, change list options, or see archives, visit:
>>>>>> https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
>>>>>
>>>
>

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc



------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|

Re: GPX 2 GPX - lost content

Honza
In reply to this post by Robert Lipe-4
Robert,

the answers in your text below:

Dne 15.6.2014 1:05, Robert Lipe napsal(a):

> On Sat, Jun 14, 2014 at 5:46 PM, Honza <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Robert,
>
>     It was my pleasure.
>
>     ad non-ASCII)
>     We used strange sentence for testing encoding:
>     "Příliš žluťoučký kůň úpěl ďábelské kódy."
>     "PŘÍLIŠ ŽLUŤOUČKÝ KŮŇ ÚPĚL ĎÁBELSKÉ KÓDY."
>     I prepare sample for testing - see attachment.
>
>
> Which, modulo the issue we have a fix pending for you regarding your
> program's pointless use of CDATA after whitespace, we read and write
> just fine.

I wrote that the program GPSBabel has no problem after changing encoding
from "ANSI" to UTF-8. It was my mistake.

> $ ./gpsbabel -i gpx -f ~/Downloads/i3.gpx  -o gpx -F - | head
> <?xml version="1.0" encoding="UTF-8"?>
> <gpx version="1.1" creator="GPSBabel - http://www.gpsbabel.org"
> xmlns="http://www.topografix.com/GPX/1/1"
> xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
> xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
>    <metadata>
>      <time>2014-06-14T22:49:54.599Z</time>
>      <bounds minlat="50.110742109" minlon="14.268908486"
> maxlat="50.110744183" maxlon="14.268932530"/>
>    </metadata>
>    <trk>
>      <name>Příliš žluťoučký kůň úpěl ďábelské kódy.</name>
>      <trkseg>
>        <trkpt lat="50.110744183" lon="14.268932530">
>
> As an aside, writing the Byte Order Mark in GPX, like you or your
> program seems to be doing, is somewhere between bad and wrong for UTF-8.
>   It definitely reduces the number of apps that can read GPX.   I know
> that Viking, Basecamp, and several GPSes won't read such files.  So if
> you have any influence on that writer, encourage omitting the BOM.

I just convert the document in text editor. BOM is not a problem.

>     ad Preserving comments)
>     I understand you but losing any contents of source file is not good
>     result. If I can choose and I have space on my disk I prefer
>     lossless conversion...
>
>
> Our goals are misaligned.
>
> GPSBabel can convert between literally hundreds of formats.  We can't
> preserve every nuance of any arbitrary source file in any arbitrary
> destination.  If you convert GPX to CSV and then back to GPX, it's not
> like you're going to have comments. So while <name>my <!-- comment super
> cool --> place</name> might be a useful thing in your source, we simply
> don't have an internal representation that holds that.  It becomes "my
> place" pretty quickly.

I told you that I understand your point of view. If you convert among
many formats you always lost contents because all of them can not be
equivalent.

> Well, because of the bug you pointed out, I think it actually becomes
> "my " instead, but I hope you get the point.  We just can't preserve
> whitespace and comments and such.  If that's something you need,
> GPSBabel is the wrong tool for you.

I just ask if is it possible to log throw away input lines to see that
the program do not use them anymore.

I solved my task with my short perl script and I feel that we can finish
to discuss this "bug/feature".

Honza

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
Reply | Threaded
Open this post in threaded view
|

Re: GPX 2 GPX - lost content

tsteven4-2
In reply to this post by Honza
This has been fixed in
https://code.google.com/p/gpsbabel/source/detail?r=4873

On 6/14/2014 10:13 AM, Honza wrote:

> Steve,
>
> Yes, I checked it again XSD and the output is valid.
> I even found that you remove this attribute from gpsbabel during 2013.
>
> Thank you for your support and sorry for my English. Maybe my
> questions was not so clear.
>
> I wrote short script in perl (package XML::Twig) to solve my doubt
> about losing tags (options keep_atts_order => 1, comments => 'keep')
> during today:
> - it does not lost tags (no problem with whitespace)
> - it preserve comments
> - it does not "translate" CDATA (no problem with non ASCII letters /ř,
> š, č etc./ inside).
>
> I hoped that I could use existing SW to avoid my own lost labour.
> Good luck to improve "your" XML parser.
>
> Honza
>
> Dne 14.6.2014 16:55, tsteven4 napsal(a):
>> Honza,
>>
>> I think o2.gpx is probably valid.  The output I create from your
>> reformmated input is valid.  We don't use optional the
>> xsi:schemaLocation, which means you need to provide the schema location
>> to your validator if you want to verify schema conformance.  The options
>> you are using with SAXCount are requesting checks against the schema.
>> This is why I modified DOMCount, so I can tell it where the schema are.
>>
>> If you send me your output I will validate it.
>>
>> Steve
>>
>> On 6/14/2014 6:58 AM, Honza wrote:
>>> Steve,
>>>
>>> I did the same changes like your in 'i2.gpx'.
>>> gpsbabel -i gpx -f i2.gpx -o gpx -F o2.gpx
>>>
>>> I am using Xerces (http://xerces.apache.org/) too:
>>> SAXCount.exe -v=always -n -s -f o2.gpx
>>>
>>> Program returns many errors due missing 'xsi:schemaLocation' inside
>>> file 'o2.gpx'.
>>>
>>> Is it possible to see a log with ignoring input of gpsbabel (e.g.
>>> option -D9 do not produce it).
>>>
>>> For source i2.gpx:
>>> - line 2: creator XXX
>>> - line 2: xsi:schemaLocation XXX
>>>
>>> For source input.gpx:
>>> - same like prevoius
>>> - line X: comment XXX
>>> - line X: name XXX
>>> - line X: name XXX
>>>
>>> The base of my question is that I want to merge some GPX files and I
>>> do not want lost the content.
>>>
>>> Honza
>>>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------------------------------------------------------
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> HPCC Systems Open Source Big Data Platform from LexisNexis Risk
>>>>>>> Solutions
>>>>>>> Find What Matters Most in Your Big Data with HPCC Systems
>>>>>>> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>>>>>>> Leverages Graph Analysis for Fast Processing & Easy Data
>>>>>>> Exploration
>>>>>>> http://p.sf.net/sfu/hpccsystems
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Gpsbabel-misc mailing listhttp://www.gpsbabel.org
>>>>>>> [hidden email]
>>>>>>> To unsubscribe, change list options, or see archives, visit:
>>>>>>> https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc
>>>>>>
>>>>
>>


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gpsbabel-misc mailing list http://www.gpsbabel.org
[hidden email]
To unsubscribe, change list options, or see archives, visit:
https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc