- From: Dave Pawson <dave.pawson@gmail.com>
- Date: Sun, 28 Apr 2013 08:11:26 +0100
- To: public-ppl@w3.org
On 27 April 2013 23:33, Tony Graham <tgraham@mentea.net> wrote: > See > http://www.w3.org/community/ppl/wiki/FOPRunXSLTExt#Example_3_-_Rotate_wide_block > > ------------------------------------------ > > Rotates a fixed-size box if it is too wide for the page. > > The <box> element in 'example3.xml' specifies its formatted height and width: > > <box id="box001" width="8in" height="5in"> > -------------------------------------------------------- > > Finally, an example that changes the output based on the area tree that > was generated mid-transform. Having got this far, I'm afraid my reactions > are (a) it shouldn't be this hard, and (b) we should have had this sort of > facility years ago (and (c) we really should use more convenient names for > files in the examples). > > The example itself is highly contrived, since the lengths that are found > in the area tree are already hard-coded in the source XML, but it does > demonstrate decision making based on an area tree. 1. Good example. The XSLT code might be. if (block doesn't fit ) choose when (fits x <-> y) rotate (+90) Another option on the feedback list Tony? I.e. another misfit variant. Issues. What of a one dimension misfit? small height, big width, would fit when rotated. What of a 'won't fit, even when rotated'? E.g. width of block (image/ SVG is easiest to work with), e.g. 12 inch width, 9 inch paper? Fallback option? Another round of try / catch? Should this apply to any block? Possibly limit to SVG, image, tables? What about tables nested in para? Solid use case though and manageable. regards -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk
Received on Sunday, 28 April 2013 07:11:52 UTC