thinking outside the tank

Inside Epub – sort NCX navMap by playOrder

leave a comment »

The NCX document of an epub publication is held in XML format. The <navMap> element of an NCX document holds navigation information that reading software can use to present a table of contents to the reader. The content documents in an epub publication are described in <navPoint> elements in the <navMap>. The order in which the <navPoint> elements should be displayed is specified by their playOrder attributes.

It’s important to realise that the sequence of <navPoint> nodes in a <navMap> don’t have to be held in playOrder sequence. This creates a need to sort the <navPoint> nodes before using them to display a table of contents.

In this Technical Note: sort an NCX navMap by playOrder, one way to do this, using an XSL transform, is presented by Inside Epub.

Written by netkingcol

February 1, 2010 at 7:55 pm

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: