forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject Re: PDF Plugin: Customization approach
Date Tue, 09 Sep 2008 13:23:25 GMT
Sjur Moshagen wrote:
> Den 9. sep. 2008 kl. 13.51 skrev Jeremias Maerki:
> 
>> Just a thought: I've noticed how customization of the FO stylesheets
>> have been approached but I'm not sure it's the best way to do it. How
>> about doing it more the XSLT way using xsl:attribute-set and
>> xsl:use-attribute-sets? A default document-to-fo-styles.xsl would
>> contain the attribute sets with the default behaviour. The user could
>> then override that default styles file with his own customizations which
>> would then not be restricted to the few points that are predefined, but
>> could change font sizes, spacing, color etc.
> 
> It sounds like an excellent idea!

I'm not so sure (but I have a proposal).

At present we have two config systems forrest.properties (unnofficially 
deprecated) and forrest.properties.xml (unnofficially the future).

This proposal introduces a third way of configuring things. I don't like 
that, it leads to confusion.

As an alternative why not have the properties defeined in 
forrest.properties.xml and use a sitemap matche to generate the required 
document-to-foStyles.xsl (note the name change is important to maintain 
consistency with our naming convention).

>> I haven't prototyped it,
>> yet. I guess the tricky part is to do the override right (probably just
>> a simple xsl:import with a Cocoon-handled URI). 

If we do it the way I sugges there is no need to handle overriding as it 
is already handled in the xml properties system.

If we do go with the original suggestion then overriding is handled by 
the locationmap by default. Simply add a new location to the locationmap 
(or rely on the user to manually ovveride in the site locatinmap),

>> The nice side-effect is
>> that it will simplify the FO stylesheets, too, and improve splitting
>> structure and style.
> 
> :)

+1 - we get this benefit with my alternative approach too.

>> I'm not sure if I have time soon to do a prototype. No problem if
>> someone beats me to it. ;-)
> 
> This is beyond me, so I'm happy to wait until you get the time.

I'm not likely to do the work, but I'm happy to provide pointers if 
someone gets stuck.

Note, the work done for the first proposal will (off the top of my head) 
need to be done for the second proposal. So, implementing the initial 
proposal first and then moving to the second proposal would be 
acceptable (IMHO) as long as we either:

a) agree the initial proposal is OK for a release

or

b) do not do a release of the dev plugin until we reach my proposal (or 
a modification of it)

Ross

Mime
View raw message