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

attribute length

Subject: attribute length
From: "Russ Little" <russ.little@xxxxxxxxxxxx>
Date: Thu, 16 Sep 2004 17:28:46 -0400
xml attribute length
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

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.