Re: Adapt Saxon-CE event model to XSL-FO?

Very thoughtful / thought provoking.
Also much closer to my imagined 'response' to feedback.
  Just taking your example.

On 17 April 2013 13:54, Tony Graham <tgraham@mentea.net> wrote:
> (I first wrote this as a blog post for my personal blog just so it can
> show signs of life.)

> Applying the Saxon-CE approach to XSL-FO, the following illustrative FO
> event handler would handle a figure overflowing its available space by
> reducing its size to 80% of the current.
>
> <xsl:template match="BlockArea[key('fig', @id, $src-doc)]"
>               mode="ppl:overflow">
>   <xsl:result-document href="#{@id}/area:external-graphic"
>                        method="replace-content">
>     <xsl:copy>
>       <xsl:apply-templates select="@*"/>
>       <xsl:attribute name="width"
>                      select="ppl:scale(area:external-graphic/@width,
>                                        0.8)"/>
>       <xsl:apply-templates/>
>     </xsl:copy>
>   </xsl:result-document>
> </xsl:template>

1. It seems a solid, aligned way of managing feedback.
2. I like using xslt syntax.
3. How to generalise it? E.g. an area overflow could be one of many?
    over a column, table cell, page ....

Thinks. Is it possible to categorise 'events' and provide options?
 E.g. an overflow event, could I be 'pushed' into using a choose
with only a number of options?
    Blow up | report error
    Reduce the item to fit (somehow)
   wrap onto the next block/line?
   truncate / trim the fo?

so that the formatter is still in control of formatting, the user is selecting
from sensible options?

For me this is much more like an xsl-fo solution.

regards



-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk

Received on Wednesday, 17 April 2013 13:53:26 UTC