I hope that this is possible, but I don't know how to do it.
I am developing a wireless website that has a lot of pages. Some of these pages might be a bit too big -- most people who visit the site will most likely request the pages, but read only the first few paragraphs (but they may read the whole page every now and then). What I want to do is split any page, every page -- as long as it has more than X characters -- into subpages. I could then have a "Read more..." or "Keep Reading..." link on any page that's too long.
For example, say I have a block of text that's normally displayed on 1 page, but has 3X characters, so I want to display it on 3 pages.
page 1:
[1/3rd of the text]
[Link: Keep reading.... Takes user to page 2]
page 2:
[Next 1/3rd of the text]
[Link: Keep reading.... Takes user to page 3]
page 3:
[The last 1/3rd of the text]
Is this possible? How do I do it? I'm using XHTML (powered by Java, if that matters). It's ok if what's needed is server-side. I have control over the server. :-)
Firstly it sucks reading long docs. It sucks even more IMO when they are paginted.
However as UAs have a limited WAP stack size unfortunately, (I pray they get rid of the limit and make scrolling much better than it is now), I would break on a reasonable limit found in:
kaihendry: I looked at the BBC site, but HOW does it do it? I'm really interested in a suitable algorithm...or pseudocode...or something that might help me implement it. :-)
Of course I have come up with a few algorithms, but I don't think they are terribly efficient.
I think this is something you should have planned right from the start. I did this once before but the architecture on the server used XML for page contents and xsl for rendering and then the chunking logic was put in the xsl layer.