Subject: Re: [xsl] The longest node in a node set From: Antonio Fiol Bonnín <fiol@xxxxxxxxxx> Date: Fri, 19 Jul 2002 12:53:34 +0200 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Dave, I was actually thinking of getting the length, not the node. So both Jeni's and Mike's approaches could work.
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:
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).
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-----
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] The longest node in a nod, DPawson | Thread | Re: [xsl] The longest node in a nod, Antonio Fiol Bonnín |
[xsl] Good XPath book name., Mukul . Mudgal | Date | Re: [xsl] The longest node in a nod, Antonio Fiol Bonnín |
Month |