Hi,
> I have a stylesheet that converts xml to wml but I'm not
> sure how to split
> the wml up into cards. The output needs to be displayed on a
> simulator and
> so I dont want the user to have to scroll through hundreds of
> lines of text
> on the one screen, it would be more usable to split it up into cards,
> perhaps displaying about 10 lines of text on each card.
>
> Is it possible to do this using a stylesheet?
Go through the text word by word, counting how many words will fit into one line (you know the maximum number of characters per line) and create a new card when ever you've output 10 lines. Recursive template to tokenize the text and count the lines, and some string manipulation functions, shouldn't be too difficult.
Cheers,
Jarno - God Module: Lunacy
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|