[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

fun with fo tab formatting

Subject: fun with fo tab formatting
From: "Kyle Partridge" <kpartridge@xxxxxxxxxxxx>
Date: Wed, 10 Dec 2003 18:13:55 -0500
fo tab
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.