stefano 2003/03/10 18:29:53
Modified: tools/src blocks-build.xsl
Log:
now the exclude property works as expected and is dependent on its value and not
only on its presence
Revision Changes Path
1.3 +14 -7 cocoon-2.1/tools/src/blocks-build.xsl
Index: blocks-build.xsl
===================================================================
RCS file: /home/cvs/cocoon-2.1/tools/src/blocks-build.xsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- blocks-build.xsl 10 Mar 2003 11:09:47 -0000 1.2
+++ blocks-build.xsl 11 Mar 2003 02:29:53 -0000 1.3
@@ -29,7 +29,14 @@
<path location="{string('${build.scratchpad.dest}')}"/>
</path>
- <target name="init"/>
+ <target name="init">
+ <xsl:for-each select="module/project[contains(@name,'cocoon-block-')]">
+ <xsl:variable name="block-name"
select="substring-after(@name,'cocoon-block-')" />
+ <condition property="unless.exclude.block.{$block-name}">
+ <istrue
value="{string('${exclude.block.')}{$block-name}{string('}')}"/>
+ </condition>
+ </xsl:for-each>
+ </target>
<xsl:apply-templates select="module" />
</project>
@@ -58,9 +65,9 @@
<xsl:template match="project">
<xsl:variable name="block-name"
select="substring-after(@name,'cocoon-block-')" />
- <target name="[EMAIL PROTECTED]" unless="exclude.block.{$block-name}"/>
-
- <target name="[EMAIL PROTECTED]" unless="exclude.block.{$block-name}">
+ <target name="[EMAIL PROTECTED]" unless="unless.exclude.block.{$block-name}"/>
+
+ <target name="[EMAIL PROTECTED]" unless="unless.exclude.block.{$block-name}">
<xsl:if test="depend">
<xsl:attribute name="depends"><xsl:value-of
select="@name"/><xsl:for-each select="depend[not(@version or
contains(@project,'cocoon'))]"><xsl:text>,</xsl:text><xsl:value-of
select="@project"/>-compile</xsl:for-each></xsl:attribute>
</xsl:if>
@@ -82,7 +89,7 @@
<antcall target="{$block-name}-compile"/>
</target>
- <target name="[EMAIL PROTECTED]" unless="exclude.block.{$block-name}">
+ <target name="[EMAIL PROTECTED]" unless="unless.exclude.block.{$block-name}">
<xsl:if test="depend">
<xsl:attribute name="depends"><xsl:value-of
select="@name"/><xsl:for-each select="depend[not(@version or
contains(@project,'cocoon'))]"><xsl:text>,</xsl:text><xsl:value-of
select="@project"/>-patch</xsl:for-each></xsl:attribute>
</xsl:if>
@@ -90,7 +97,7 @@
<antcall target="{$block-name}-patches"/>
</target>
- <target name="[EMAIL PROTECTED]" unless="exclude.block.{$block-name}">
+ <target name="[EMAIL PROTECTED]" unless="unless.exclude.block.{$block-name}">
<xsl:if test="depend">
<xsl:attribute name="depends"><xsl:value-of
select="@name"/><xsl:for-each select="depend[not(@version or
contains(@project,'cocoon'))]"><xsl:text>,</xsl:text><xsl:value-of
select="@project"/>-samples</xsl:for-each></xsl:attribute>
</xsl:if>
@@ -101,7 +108,7 @@
<antcall target="{$block-name}-samples"/>
</target>
- <target name="[EMAIL PROTECTED]" unless="exclude.block.{$block-name}">
+ <target name="[EMAIL PROTECTED]" unless="unless.exclude.block.{$block-name}">
<xsl:if test="depend">
<xsl:attribute name="depends"><xsl:value-of
select="@name"/><xsl:for-each select="depend[not(@version or
contains(@project,'cocoon'))]"><xsl:text>,</xsl:text><xsl:value-of
select="@project"/>-lib</xsl:for-each></xsl:attribute>
</xsl:if>