Abstract rendering basically finished
I've now finished a test version of how I think we should handle long documents, with Stow 1598 as a model. This is how it works:
There is an <abstract> element in the header, which should contain a very short (one- or two-sentence) introduction to the text, followed by a modern editorial table-of-contents.
When you go to the Stow document with its "pure" filename, you see the content of the <abstract>. The very brief introduction can/should contain links to a full critical introduction to the text, which would be encoded as a separate file; we don't want to entangle the critical stuff with the primary source stuff, as we've previously discussed.
The table of contents from the abstract appears as a series of links. If you click on a link, you go to a the appropriate section of the document -- so if you click on "Wall about the City", you go to that section, which consists of pp. 6-10 in Stow page-numbers, or 15 to 19 in "real" page numbers (counting from the beginning without errors).
When you're looking at a section like this, you have three navigation buttons: previous section, back to "index" (abstract), and next section.
In addition to navigating from section to section, you can jump direct to a page number (based on an actual page number as it shows in Stow), using the pageNum parameter, and you can jump to a mechanical page number -- Stow's page 10 above is actually the 19th page in the book -- using pbFirst.
In either case, you can page forwards or backwards through the document with the buttons at the top and bottom of the page.
Finally, you can view a page-range by using both pbFirst and pbLast:
pbFirst=19&pbLast=23and you can add a #id to the end of any of these to jump to a particular div if it has an @xml:id attribute (I added one for the purposes of demonstrating this):
?sectionNum=12#stow_1598_orders_and_customs
I think this is pretty comprehensive. It provides an easy starting point for browsing the document, and gives us lots of ways to point to specific locations in the document (from critical intros and other modern ancillary texts), while preserving the integrity of the original text and its page formats. At the same time, it preserves the server from the unwanted load of rendering the whole document in one go.
I've also fixed all the issues highlighted in Janelle's docx file listing the TOC components. Waiting for team approval before porting from dev to live.