Follow

Package Document Type

Overview

Provides a way to package an Atom based edition into one or more ZIP files to improve download performance. This format makes sense when an edition rarely changes once it is first published. It is also crucial when using iOS 5 Newsstand as Newsstand is not performant when downloading multiple assets.

General

  • This format can only be used in Pugpig Live
  • The resource should be served with the mime-type application/pugpigpkg+xml
  • The resource is requested every time a client downloads the edition, so should be cached
  • The resources should be protected if the edition is not freely available

Testing and Validation

  • No standard validator exists for the package XML format.
  • The ZIP files should unzip with standard software

Fields

PropertyOccursTypeDescription
package/@root 1 Tag URI The path to the Atom contents feed (after unzipping all parts)
part 1..n Part node An entry for each ZIP file in the package
part/@name 0..1 String The name of the part. Could be used while displaying download progress
part/@src 1 Tag URI The URL to the ZIP file
part/@size 0..1 Integer The size, in bytes, of the ZIP file. Used to calculate progress
part/@modified 0..1 Date The date the file was created

Example

Request

GET /editions/1/package.xml HTTP/1.1
Host: sample.kaldorgroup.com

Response

HTTP/1.1 200 OK
Content-Type: application/pugpigpkg+xml
Date: Tue, 06 Dec 2011 14:26:15 GMT
Content-Length: 1016

package root="content.xml"
  part name="html" src="html.zip" size="121728" modified="2011-12-05T09:46:38+00:00"
  part name="assets" src="assets.zip" size="8005648" modified="2011-12-05T09:47:28+00:00"
/part>

Notes

  1. The OPDS feed and the cover images are NOT part of the zip files.
  2. It is best to use as few ZIP files as possible
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk