xslt-fo - how do I indent second line of an index entry?

When I use <xsl:value-of select="$currentTerm"/> and the text string is long, I get some thing like:

asdfasdf sadfasdf asdfasdf asdfasdf
asdf 1-2

What I want is the second line indented like:

asdfasdf sadfasdf asdfasdf asdfasdf
    asdf 1-2

How can I accomplish this?
aeijohnAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

WerrockCommented:
Add <div style="padding-left: 20px; text-indent: -20px;"> and </div> around it.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kmartin7Commented:
Hi aeijohn,

We had to cheat by creating a series of list items, and indenting and outdenting to get the desired effect. Take a look at the attached PNG to see the result. Here is a snippet of how we handle it.

This is for a table of contents, and to get an entire word to break properly, we append a series of periods to make a whole word (notice text "wrap around sometime......"). It is a kluge but works.

The indentation is nothing more than a combination of outdenting and indenting. Notice the following attributesL

text-indent="-.125in" end-indent=".5in" last-line-end-indent="-.5in"

HTH,

kmartin7
<fo:list-item start-indent="0in">
	<fo:list-item-label end-indent="label-end()">
		<fo:block font-family="Arial" font-size="10pt" font-weight="normal" text-align="left">
			<fo:inline>Table A-22</fo:inline>
		</fo:block>
	</fo:list-item-label>
	<fo:list-item-body start-indent="1.125in">
		<fo:block font-family="Arial" font-size="10pt" keep-together.within-page="always" text-align-last="justify" text-indent="-.125in" end-indent=".5in" last-line-end-indent="-.5in">
			<fo:inline>Power Distribution Assembly to Reader Motor Cable Assembly Wire List this is a very very very long title and it must wrap around sometime......</fo:inline>
			<fo:leader leader-pattern="dots" keep-with-previous.within-line="always"/>
			<fo:inline padding-start="1pt" wrap-option="no-wrap" keep-together.within-line="always" keep-with-previous.within-line="always">A-<fo:page-number-citation ref-id="tQ3318565"/></fo:inline>
		</fo:block>
	</fo:list-item-body>
</fo:list-item>

Open in new window

0
kmartin7Commented:
Oops, I forgot to attach the PNG, so here it is...
indented-index.png
0
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

aeijohnAuthor Commented:
Actually I added the padding-left: 20px; text-indent: -20px; to  tag no matter where I placed it.
But your answer got me to where I wanted so I am accepting this as the solution.

Thank you
0
kmartin7Commented:
Wow. Your title is specific to XSL:FO. Does Werrock's solution work for XSL:FO?
0
aeijohnAuthor Commented:
Well, yes and no. The <div> tag was not welcomed and caused errors every where I tried to use it. But Werrock's solution put me on the path of using text-ident with a negitive value and then shifting the left margin over to compensate for it. This worked very well and I was able to get the index output as I wanted.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.