[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: The longest node in a node set
-----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!!
iD8DBQE9N++uCEvxyR+MqTQRAs0RAJ9545ziA+hqvD+BBtG0kMuXFwuUgQCeJzMb 6rSvvUogco90vD/A9ThMKy4= =l5sa -----END PGP SIGNATURE----- XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|