[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Missing 'width' attribute, CALS limitation?
At 2002-11-12 22:10 +0100, Gustaf Liljegren wrote:
At 13:00 2002-11-12 -0500, you wrote: Thanks Ken and thanks Eliot, The formatter does all that for you. You just use arbitrary numbers and the formatter sums them and prorates the proportions accordingly. Adding absolute values is easy, but how do you know how much is left for the proportional columns when you subtract the absolute widths from the total? The formatter worries about it, not the stylesheet writer. If you know you have three columns and the first is twice as wide as each of the other two, then use the values "2, 1, 1" ... the formatter does the prorating. You can allow the numbers to sum to any value ... it doesn't matter. In fact, some people when using CALS like to use p-c-w() function with the units summing to 100, thereby getting percentages even though CALS doesn't support percentages. Not all tables need the full width of fo:region-body, and some tables may perhaps need more than the full width. You cannot adjust the page geometry based on content. However, I demonstrate in our freely downloadable XSL-FO resource titled "PSMI (Page Sequence Master Interleave) that it is possible to selectively incorporate page geometries when you know at stylesheet time you need something different. I even use the desire to have a landscaped table in the middle of a portrait page sequence as the example. There's no way to know the total unless you specify it by hand. The value must be carried by the XML document, then used by the stylesheet. There is table-layout="auto", but as Eliot said, you cannot have this and also use the p-c-w() function. To use p-c-w() you must use table-layout="fixed". Here's my reading of proportional-column-width function (5.10.4): Yes. "The difference between the table-width and the sum of the column widths is the available proportional width." You are correct, to use p-c-w() you do have to specify this in your stylesheet. If you can assume it, great, but if you cannot assume it, then you will need some indication in your XML. "One unit of proportional measure is the available proportional width divided by the sum of the proportional factors." [...] Correct. Here's my assumption again: "to calculate mixed column widths (proportional and absolute), you need the total width of a table?" Am I wrong this time too? :-) You are not wrong ... but I'm not sure where your problem is. You are writing a layout specification for an XML instance. As the stylesheet writer, you are in charge of the layout of the table. XSL-FO 1.0 requires you to specify the table width in order to use p-c-w(), or if you can accept the formatter automatically laying out the table (as is what happens with HTML browsers), then you don't use p-c-w(). If you are only worried about the page dimensions, then you can use a percentage of the ancestral reference area by saying something along the lnies of <table width="80%">. I'm not sure where you feel you are being let down by the XSL-FO 1.0 design. How could the formatter know how wide a table is from XML since XML doesn't infer any presentational semantics whatsoever? I think the closest is table-layout="auto" as in HTML, which happens to be the XSL-FO table layout default. I hope this helps. .................. Ken
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) ISBN 0-13-065196-6 Definitive XSLT and XPath ISBN 0-13-140374-5 Definitive XSL-FO ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath ISBN 1-894049-10-1 Practical Formatting Using XSL-FO Next conference training: 2002-12-08,03-03,06 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
|