This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes how to underline text ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "how to underline text ?" Watch "how to underline text ?" New topic

how to underline text ?

Engin Okucu
Ranch Hand

Joined: Feb 09, 2002
Posts: 174
I have a word and i want to underline it. I know i can use <fo:inline text-decoration="underline"> but i want to underline for example only the first and second letter and inserts a space between.
Example : 'engin' --> i want to insert space after 'en' in order to underline 'en ' and to write 'gin' but without underlining it.
Balaji Loganathan
author and deputy

Joined: Jul 13, 2001
Posts: 3150
Try using the xsl function substring() and fo:inline together.
Something like..
<fo:inline underline>get first two chars using substring</fo:inline><fo:inline nounderline>& #160; get rest of the string</fo:inline>

Spritle Software Blogs
Engin Okucu
Ranch Hand

Joined: Feb 09, 2002
Posts: 174
Thanks it works fine.
I have another question.
I have a word example : 'engin'.
i use substring() to get the first and second character --> 'en'.
I insert a space after 'en' --> 'en '.
I want to underline the space also.
I tried it but it doesn't work ???I may underline only 'en' and not the space . Why ?
I agree. Here's the link:
subject: how to underline text ?
It's not a secret anymore!