xsl-list
[Top] [All Lists]

Re: attribute length

2004-09-16 14:38:31
You may want to look here:

http://sources.redhat.com/ml/xsl-list/2001-12/msg00651.html

The "str-split-to-words" template from FXSL can be used to achieve this.

Cheers,

Dimitre Novatchev


On Thu, 16 Sep 2004 17:28:46 -0400, Russ Little
<russ(_dot_)little(_at_)datamaxx(_dot_)com> wrote:
I am attempting to use logic to determine the length of an attribute, but I'm 
unable to find anything useful enough to work.

If I have the following:

<CAT NAM="This attribute is meant to be so extremely long that I must force 
it into multiple cells on a web page"/>

What I want to do is take the NAM attribute, and put the first 35 characters 
into a cell.  Directly below it, I want to generate another cell with two 
spaces followed by the next 33 characters.  I want to generate a new cell 
directly below the previous one, every 33 characters after the initial 35, 
and each should have two spaces in front.  This basic logic would produce the 
following:

This attribute is meant to be so ex
 tremely long that I must force it
 into multiple cells on a web page

The tricky part is, once I count to 35 characters (or 33 depending on if it 
is the first cell or not), I need to verify the data is being separated at a 
space.  In the previous example, the word "extremely" is not separated 
smoothly.  The final result should actually be:

This attribute is meant to be so
 extremely long that I must force
 it into multiple cells on a web
 page

How can I use logic to not only determine the length of the attribute, but 
depending upon that length, separate the data out into multiple cells on a 
web page?

Russ Little
Field Engineer

--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--




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