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 07:49:08 UTC
svn commit: r314791 -
/cocoon/branches/BRANCH_2_1_X/tools/src/blocks-build.xsl
Author: lgawron
Date: Tue Oct 11 22:48:47 2005
New Revision: 314791
URL: http://svn.apache.org/viewcvs?rev=314791&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/branches/BRANCH_2_1_X/tools/src/blocks-build.xsl
Modified: cocoon/branches/BRANCH_2_1_X/tools/src/blocks-build.xsl
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/tools/src/blocks-build.xsl?rev=314791&r1=314790&r2=314791&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/tools/src/blocks-build.xsl (original)
+++ cocoon/branches/BRANCH_2_1_X/tools/src/blocks-build.xsl Tue Oct 11 22:48:47 2005
@@ -77,19 +77,14 @@
<attribute name="name"/>
<sequential>
<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>
@@ -519,6 +514,13 @@
<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"/>
<xsl:for-each select="$cocoon-blocks">
<xsl:variable name="block-name" select="substring-after(@name,'cocoon-block-')"/>
<test-include-block name="{$block-name}"/>