[daisy] [JIRA] Commented: (DSY-542) Making the skinning layout.xsl more 'modular'

Marc Portier (JIRA) issues at cocoondev.org
Fri Sep 7 03:52:21 CDT 2007


    [ http://issues.cocoondev.org//browse/DSY-542?page=comments#action_13347 ] 

Marc Portier commented on DSY-542:
----------------------------------

Thinking about this some further I think we should probably also find some common technique/pattern for building these xslt's more ready for 'extension'

Thinking about typical Java super.method() calls we might want to introduce some pattern like this

<xsl:template match="xpath-expr" >
  ... template output with calls to overwriteable stuff
  <xsl:call-template name="insertWhatever" />
</xsl;template>


!-- clear description of what it does, where to be used, which '.' context to be available 
    and of course passed params if appropriate -->
<xsl:template name="insertWhatever" >
  <xsl:call-template name="_insertWhatever" >
</xsl:template>


<!-- some _ prefix convention should indicate that these are not to be overridden, 
       at least not without some shooting in the direction of your feet -->
<xsl:template name="_insertWhatever" >
  actual original base-template that should not be changed, and will adapt itself to future releases
</xsl:template>

-----

this would allow to override AND still reuse by providing your own:

<xsl:import src="daisyskin:/(baseskin)xsl/whatever.xsl" />

<xsl:template name="insertWhatever" >
   ... added my stuff before
  <xsl:call-template name="_insertWhatever" >
  ... added stuff after
</xsl:template>


> Making the skinning layout.xsl more 'modular'
> ---------------------------------------------
>
>          Key: DSY-542
>          URL: http://issues.cocoondev.org//browse/DSY-542
>      Project: Daisy
>         Type: Improvement
>     Reporter: Marc Portier
>     Priority: Minor

>
> The current skinning system is already quite 'modular' when it comes down to be split over multiple separate files.
> However, each of these files is holding a number of templates that each in their own right need to be completely overridden when a new skin is to be made.
> A general effort should be taken to split down the templates in smaller pieces, as well as to provide some clear documentation for each of them.
> This issue acts as a focal point in this effort
> - please list suggestions and or modularity-itches as comments to this issue
> Work on this should result in a new 'default' skin, and can thus even be performed as a completely new replacement skin rather then as patches on the current one.
> (Which should lower the bar for the lesser-svn-skilled and read an as open invitation to anyone around to share their expertise in this area by providing some 'baseskin' to be included...)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



More information about the daisy mailing list