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

Re: The longest node in a node set

Subject: Re: The longest node in a node set
From: Antonio Fiol Bonnín <fiol@xxxxxxxxxx>
Date: Fri, 19 Jul 2002 12:53:34 +0200
worlds longest equation word
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thank you Dave, Mike and Jeni!

Dave, I was actually thinking of getting the length, not the node. So
both Jeni's and Mike's approaches could work.

However, I have just discovered that I need something far more complex. :-(

The idea was obtaining the max length for all the "column" elements that
may go in a table cell, and then use that number as the argument to
proportional-column-width in XSL-FO. That way I would get a table with
proportional space depending on the max size of the content. Nice idea,
but...

I did not take into account the fact that longer contents are splitted
into two rows at spaces. That changes the formula: I would have to find
"the length of the longest word contained in an element". That would not
change a lot Jeni's recursive approach, except that it would have to be
douoble-recursive to find the length of the words. But never mind. This
is certainly not the best solution, as I have a very irregular
distribution of maximum "word" lengths. So the final result would not be
appealing.

I think I would better go for a hypenation approach. Not that I want
real English words hyphenated, but the idea is as follows:

I have long things like:

0123456-987654-784112-AS-666

This could probably be split as:

0123456-987654-784112-
AS-666

Is there a way to tell the FO renderer that it can cut a word at a
specific place? Some sort of zero length space that must be interpreted
by the FO renderer as exactly that, a space (in the sense of something
that is between words), but 0 length (i.e. Do not draw it if the word is
not splitted).

Or does anyone see a better approach?


Thank you very very much!!



Antonio -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) Comment: Using GnuPG with Debian - http://enigmail.mozdev.org

iD8DBQE9N++uCEvxyR+MqTQRAs0RAJ9545ziA+hqvD+BBtG0kMuXFwuUgQCeJzMb
6rSvvUogco90vD/A9ThMKy4=
=l5sa
-----END PGP SIGNATURE-----



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


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.