readium/readium-cfi-js — pull request #5 by 67726e (2014-04-03 14:02:50+00:00)
Title: Add Spatial & Temporal Offsets

I noticed that the Readium JS viewer will actually generate CFIs with the spatial offset but is unable to take those CFIs and load them because there is no support for such CFIs. At work we actually forked Readium a while back when it was [Readium-Web-Components](https://github.com/67726e/Readium-Web-Components) - Anyway I had to apply this fix and have been running with it in production for the past 8 months so I am pretty confident it won't cause us to run into any problems.

I know the definition of [`number`](http://www.idpf.org/epub/linking/cfi/epub-cfi.html#epubcfi.ebnf.number) does not match exact EBNF specified in the EPUBCFI spec, but it is currently only used by the spatial and temporal offsets so I figured we could get away with it for the time being. Additionally I arrived at this decision by determining that the definition for an [`offset`](http://www.idpf.org/epub/linking/cfi/epub-cfi.html#epubcfi.ebnf.offset) does not actually match the defined allowable range for a [spatial offset](http://www.idpf.org/epub/linking/cfi/epub-cfi.html#sec-path-terminating-spatial) of `[0-100]`. I suppose technically the spatial definition looks like it only includes integers between 0 and 100 inclusive but I figured that since the EBNF defines it as taking a `number` that we should still allow for it, at the very least to provide some measure of tolerance.

I will need to fork the `readium-js` project and implement actual support for the offsets, which I have also previously done, but from my limited testing it looks like this will not break the current CFI loading.