xsl-list
[Top] [All Lists]

attribute length

2004-09-16 14:28:46
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




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