[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] fun with fo tab formatting
Hi, My latest issue has to do with tab formatting. XML looks like this: <p tabs="0.2 1.2 2.2"> <tab/>One<tab/>Blue<tab/>Fish<br/> <tab/>Two<tab/>Red<tab/>Sheep<br/> </p> I'm calling a template that uses substring-before() and substring-after() to break up the values in p/@tabs. When I detect a tab though, it seems like I need to: a/ count the number of preceding-sibling tab elements, and stop if I hit a br element, so that I know which tab-number I'm dealing with? then, b/ subtract the two relevant values (tab setting # that corresponds to the tab-number i'm currently processing - tab setting # prior to that one (or 0, if it's the first one) to obtain the indent-before value? I thought I'd use an empty fo:block to do it...something like: <fo:block indent-before="0.2in"/>One<fo:block indent-before="1in"/>Blue<fo:block indent-before="1in"/>Fish All I want to know is, am I totally barking up the wrong tree? And if so, could you recommend an alternative strategy? I'm willing to do my own leg-work. Thanks, KP XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|