You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by lg...@apache.org on 2005/10/12 01:00:30 UTC
svn commit: r312973 - /cocoon/trunk/tools/src/blocks-build.xsl
Author: lgawron
Date: Tue Oct 11 16:00:10 2005
New Revision: 312973
URL: http://svn.apache.org/viewcvs?rev=312973&view=rev
Log:
support for "compact" blocks.properties:
exclude.all.blocks=true
include.block.template=true
include.block.forms=true
the opposite also works:
include.all.blocks=true
exclude.block.bsf=true
include.block.ajax=false
Modified:
cocoon/trunk/tools/src/blocks-build.xsl
Modified: cocoon/trunk/tools/src/blocks-build.xsl
URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/src/blocks-build.xsl?rev=312973&r1=312972&r2=312973&view=diff
==============================================================================
--- cocoon/trunk/tools/src/blocks-build.xsl (original)
+++ cocoon/trunk/tools/src/blocks-build.xsl Tue Oct 11 16:00:10 2005
@@ -72,20 +72,17 @@
<macrodef name="test-include-block">
<attribute name="name"/>
<sequential>
+ <echo message=" exclude.block.@{{name}}: ${{exclude.block.@{{name}}}}"/>
+ <!-- this happens only if user did not explicitly set the property in blocks.properties -->
<condition property="include.block.@{{name}}">
- <not>
- <istrue value="${{exclude.block.@{{name}}}}"/>
- </not>
- </condition>
- <condition property="internal.exclude.block.@{{name}}">
<and>
- <isfalse value="${{include.all.blocks}}"/>
- <or>
- <istrue value="${{exclude.all.blocks}}"/>
- <isfalse value="${{include.block.@{{name}}}}"/>
- </or>
+ <equals arg1="${{default.block.mode}}" arg2="include"/>
+ <not><istrue value="${{exclude.block.@{{name}}}}"/></not>
</and>
</condition>
+ <condition property="internal.exclude.block.@{{name}}">
+ <not><istrue value="${{include.block.@{{name}}}}"/></not>
+ </condition>
</sequential>
</macrodef>
@@ -456,6 +453,14 @@
<xsl:variable name="cocoon-blocks" select="project[starts-with(@name, 'cocoon-block-')]"/>
<target name="init">
+ <condition property="default.block.mode" value="include">
+ <istrue value="${{include.all.blocks}}"/>
+ </condition>
+ <condition property="default.block.mode" value="exclude">
+ <istrue value="${{exclude.all.blocks}}"/>
+ </condition>
+ <property name="default.block.mode" value="include"/>
+ <echo message="default mode: ${{default.block.mode}}"/>
<xsl:for-each select="$cocoon-blocks">
<xsl:variable name="block-name" select="substring-after(@name,'cocoon-block-')"/>
<test-include-block name="{$block-name}"/>
Re: svn commit: r312973 - /cocoon/trunk/tools/src/blocks-build.xsl
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Leszek Gawron wrote:
> Stefano Mazzocchi wrote:
>
>> lgawron@apache.org wrote:
>>
>>> Author: lgawron
>>> Date: Tue Oct 11 16:00:10 2005
>>> New Revision: 312973
>>>
>>> URL: http://svn.apache.org/viewcvs?rev=312973&view=rev
>>> Log:
>>> support for "compact" blocks.properties:
>>>
>>> exclude.all.blocks=true
>>> include.block.template=true
>>> include.block.forms=true
>>>
>>> the opposite also works:
>>> include.all.blocks=true
>>> exclude.block.bsf=true
>>> include.block.ajax=false
>>
>>
>>
>> You rock.
>>
>> Can we have it in 2.1.8 too, pretty pleezeee :-)
>>
> done already !
>
I just have to regenerate blocks.properties for both branches but for
that I need full svn update - doing right now.
--
Leszek Gawron lgawron@mobilebox.pl
IT Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
Re: svn commit: r312973 - /cocoon/trunk/tools/src/blocks-build.xsl
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Stefano Mazzocchi wrote:
> lgawron@apache.org wrote:
>
>> Author: lgawron
>> Date: Tue Oct 11 16:00:10 2005
>> New Revision: 312973
>>
>> URL: http://svn.apache.org/viewcvs?rev=312973&view=rev
>> Log:
>> support for "compact" blocks.properties:
>>
>> exclude.all.blocks=true
>> include.block.template=true
>> include.block.forms=true
>>
>> the opposite also works:
>> include.all.blocks=true
>> exclude.block.bsf=true
>> include.block.ajax=false
>
>
> You rock.
>
> Can we have it in 2.1.8 too, pretty pleezeee :-)
>
done already !
--
Leszek Gawron lgawron@mobilebox.pl
IT Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
Re: svn commit: r312973 - /cocoon/trunk/tools/src/blocks-build.xsl
Posted by Stefano Mazzocchi <st...@apache.org>.
lgawron@apache.org wrote:
> Author: lgawron
> Date: Tue Oct 11 16:00:10 2005
> New Revision: 312973
>
> URL: http://svn.apache.org/viewcvs?rev=312973&view=rev
> Log:
> support for "compact" blocks.properties:
>
> exclude.all.blocks=true
> include.block.template=true
> include.block.forms=true
>
> the opposite also works:
> include.all.blocks=true
> exclude.block.bsf=true
> include.block.ajax=false
You rock.
Can we have it in 2.1.8 too, pretty pleezeee :-)
--
Stefano.