[xsl] fun with fo tab formatting

Subject: [xsl] fun with fo tab formatting
From: "Kyle Partridge" <kpartridge@xxxxxxxxxxxx>
Date: Wed, 10 Dec 2003 18:13:55 -0500

My latest issue has to do with tab formatting.

XML looks like this:

<p tabs="0.2 1.2 2.2">

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.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread