You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Thorsten Scherler <th...@apache.org> on 2008/02/24 19:30:31 UTC

dispatcher contracts default properties (was Re: RT: Storage of Properties)

...
> >  Meaning each contract would have publish his 
> > own original properties 
> 
> No, contracts do not have default properties. They are coming from the
> structurer.

Actually due to the nature of contracts that is very much possible and
actually will save some processing time if it is practice.

Imaging e.g. the branding-css-links contract, right now we always await
an input but since this is a common contract it could provide his
default properties. 

Instead of:
<xsl:param name="branding-css-links-input"/>
we can do something like:
<xsl:variable name="default">
 <css url="common.css"/>
</xsl:variable>
<xsl:param name="branding-css-links-input" select="$default"/>
and in the default structurer we will have:
<forrest:contract name="branding-css-links"/>
since we do not override nothing we will save some processing (which is
very good).

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Re: dispatcher contracts default properties (was Re: RT: Storage of Properties)

Posted by Ferdinand Soethe <fe...@apache.org>.
I need to learn more about structurer and dispatcher quickly 
to understand what you are saying but I agree to having 
default properties for contracts.

Best regards,
Ferdinand Soethe

Thorsten Scherler wrote:
> ...
>>>  Meaning each contract would have publish his 
>>> own original properties 
>> No, contracts do not have default properties. They are coming from the
>> structurer.
> 
> Actually due to the nature of contracts that is very much possible and
> actually will save some processing time if it is practice.
> 
> Imaging e.g. the branding-css-links contract, right now we always await
> an input but since this is a common contract it could provide his
> default properties. 
> 
> Instead of:
> <xsl:param name="branding-css-links-input"/>
> we can do something like:
> <xsl:variable name="default">
>  <css url="common.css"/>
> </xsl:variable>
> <xsl:param name="branding-css-links-input" select="$default"/>
> and in the default structurer we will have:
> <forrest:contract name="branding-css-links"/>
> since we do not override nothing we will save some processing (which is
> very good).
> 
> salu2