Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid XML in <trkpt>, empty <link > #98

Closed
nawagers opened this issue Oct 31, 2017 · 1 comment
Closed

Invalid XML in <trkpt>, empty <link > #98

nawagers opened this issue Oct 31, 2017 · 1 comment

Comments

@nawagers
Copy link
Contributor

nawagers commented Oct 31, 2017

Using the function .to_xml() generates XML with empty tags inside the elements (and possibly others). The gpx schema defines the link as XML LinkType, the definition requires the 'refs' attribute:

<xs:complexType mixed="true" name="LinkType">
<xs:complexContent>
<xs:extension base="baseElementType">
<xs:attribute name="refs" type="xs:IDREFS" use="required"/>
<xs:attribute name="role" type="xs:string"/>
<xs:attribute name="title" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>

The output trackpoints look like this:

<trkpt lat="41.3342050742358" lon="-72.67007832415402">
<ele>43.88</ele>
<time>2017-09-04T14:59:23Z</time>
<link ></link></trkpt>

The input trackpoints do not have any link tags from a valid GPX modified in Garmin Basecamp. The file does have extensions, but I don't think that matters, haven't investigated fully yet.

Python 3.6.0

GPX In and Out.zip

@nawagers
Copy link
Contributor Author

Sorry, just realized this is probably a duplicate of #81

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants