xsl-list
[Top] [All Lists]

fun with fo tab formatting

2003-12-10 16:13:55
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



<Prev in Thread] Current Thread [Next in Thread>