RE: Helper apps from ePub

So far as I remember, data urls are not allowed, at least in hyperlinks. The ocf spec requires that all links resolve to resources in the container and the spine definition also requires hyperlinks go to resources in the spine.

 

You could use the attribute with a filename and set it up as Dave showed with a fallback, but support is still probably going to be all over the place in terms of what actually happens.

 

Matt

 

From: Lars Wallin <lars@colibrio.com> 
Sent: February 26, 2020 05:32
To: Dave Cramer <dauwhe@gmail.com>
Cc: Matt Garrish <matt.garrish@gmail.com>; Michael A. Peters <mpeters@domblogger.net>; W3C EPUB3 Community Group <public-epub3@w3.org>
Subject: Re: Helper apps from ePub

 

Hi guys!

 

You could perhaps, maybe, add the GPX file as a data URL in an A tag with a "download" attribute. 

I would add the inlined GPX file to the manifest as well, just to make sure that the manifest is a complete representation of the package contents.

 

<a download="thegpxfile.gpx" href="data:application/gpx+xml,...">Click to download the GPX file</a> 

 

What say ye Dave and Matt?

 

👋

Lars

 

 

 

On Wed, Feb 26, 2020 at 2:01 AM Dave Cramer <dauwhe@gmail.com <mailto:dauwhe@gmail.com> > wrote:

On Tue, Feb 25, 2020 at 4:47 PM Matt Garrish <matt.garrish@gmail.com <mailto:matt.garrish@gmail.com> > wrote:

> But you can't link to the GPX from a content document.

 

Technically, you can if you specify a manifest fallback for the GPX file. Probably an html doc that explains the reading system can’t handle the media type and directs the user how to manually get the file from the zip container as the chances are low that a reading system would display or launch the file.

 

 

 

Ah, I had to make the GPX file a spine item for that to work. Another use case for linear="no"? :)

 

<manifest>
  <item id="content_001"  href="content_001.xhtml" media-type="application/xhtml+xml"/>
  <item id="nav"  href="nav.xhtml" media-type="application/xhtml+xml" properties="nav"/>
  <item id="gpx"  href="Prospect_Mountain_Skinning.gpx" media-type="application/gpx+xml" fallback="fallback"/>
  <item id="fallback"  href="fallback.xhtml" media-type="application/xhtml+xml"/>  
</manifest>
<spine>
  <itemref idref="content_001" />
  <itemref idref="gpx" linear="no"/>
</spine>

 

Dave

 

 

Received on Wednesday, 26 February 2020 12:27:34 UTC