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

Re: Fill line ends with dots

Subject: Re: Fill line ends with dots
From: "Linda van den Brink" <linda@xxxxxxxxxx>
Date: Fri, 15 Aug 2008 13:15:07 +0200
Re:  Fill line ends with dots
The problem is that the text is wrapped by the processor in the
content area of a block, so how do I know where the line ends will be?

On Fri, Aug 15, 2008 at 1:05 PM, Andrew Welch <andrew.j.welch@xxxxxxxxx>
wrote:
>> I'm looking for a way to fill the end of all lines in a (left-aligned)
>> block not with spaces, but with a character like a dot or a dash. I
>> don't think a leader is the answer here, because not only the end of
>> each block must be filled, but the end of each line within a block
>> given a certain area width, something like this (I hope the email
>> program doesn't mangle this):
>
> It did for me...  :)
>
>> Heden/Vandaag, 'datum ', heb ik, ' adellijke titel, titel, voornamen,
>> ------------
>> voorvoegsels, achternaam (kandidaat)notaris', hierna te noemen: notaris,
------
>> als waarnemer van ' adellijke titel, titel, voornamen,
>> voorvoegsels,---------------
>> achternaam notaris ' notaris te 'plaats van vestiging ' deze akte
onmiddellijk--
>> na beperkte voorlezing en na ondertekening door partijen ondertekend
ten------
>> overstaan van de volgende verschenen
>> persoon:-------------------------------------
>>
>> So far I haven't tried anything but have only been thinking about
>> this. All I've been able to come up with is using a background image
>> for the lines and displaying the text over that, so that were there's
>> no text the background image is visible.
>>
>> Is there a more direct/simple/elegant way to do this?
>
> I think the standard way is to define a variable holding the number of
> dashes to fill a line, say 10 for example:
>
> <xsl:variable name="dashes" select=" '----------' "/>
>
> then do:
>
> select="concat($str, substring($dashes, string-length($str))"
>
>
> --
> Andrew Welch
> http://andrewjwelch.com
> Kernow: http://kernowforsaxon.sf.net/

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.