You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by ru...@apache.org on 2010/09/24 11:44:31 UTC
svn commit: r1000777 -
/synapse/branches/2.0/modules/migrator/src/main/resources/synapse-configuration-migrator.xslt
Author: ruwan
Date: Fri Sep 24 09:44:30 2010
New Revision: 1000777
URL: http://svn.apache.org/viewvc?rev=1000777&view=rev
Log:
migrate filter mediator to support then
Modified:
synapse/branches/2.0/modules/migrator/src/main/resources/synapse-configuration-migrator.xslt
Modified: synapse/branches/2.0/modules/migrator/src/main/resources/synapse-configuration-migrator.xslt
URL: http://svn.apache.org/viewvc/synapse/branches/2.0/modules/migrator/src/main/resources/synapse-configuration-migrator.xslt?rev=1000777&r1=1000776&r2=1000777&view=diff
==============================================================================
--- synapse/branches/2.0/modules/migrator/src/main/resources/synapse-configuration-migrator.xslt (original)
+++ synapse/branches/2.0/modules/migrator/src/main/resources/synapse-configuration-migrator.xslt Fri Sep 24 09:44:30 2010
@@ -34,6 +34,31 @@ version to the 2.x compatible version
<xsl:call-template name="convertNS"/>
</xsl:template>
+ <xsl:template match="syn:filter | synNew:filter" priority="0">
+ <xsl:element name="{local-name()}" namespace="http://synapse.apache.org/ns/2010/04/configuration">
+ <xsl:copy-of select="@*"/>
+ <xsl:choose>
+ <xsl:when test="local-name(child::*[position()=1])='then' or local-name(child::*[position()=1])='else'">
+ <xsl:if test="count(child::syn:then)>0 or count(child::synNew:then)>0">
+ <xsl:element name="then" namespace="http://synapse.apache.org/ns/2010/04/configuration">
+ <xsl:apply-templates select="child::syn:then/* | child::synNew:then/*"/>
+ </xsl:element>
+ </xsl:if>
+ <xsl:if test="count(child::syn:else)>0 or count(child::synNew:else)>0">
+ <xsl:element name="else" namespace="http://synapse.apache.org/ns/2010/04/configuration">
+ <xsl:apply-templates select="child::syn:else/* | child::synNew:else/*"/>
+ </xsl:element>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:element name="then" namespace="http://synapse.apache.org/ns/2010/04/configuration">
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:element>
+ </xsl:template>
+
<xsl:template match="syn:definitions/syn:sequence | syn:definitions/syn:localEntry | syn:definitions/syn:proxy | syn:definitions/syn:task | syn:definitions/syn:endpoint | syn:definitions/syn:eventSource | syn:definitions/syn:registry" priority="2">
<xsl:call-template name="convertNS"/>
</xsl:template>
@@ -68,7 +93,7 @@ version to the 2.x compatible version
</xsl:if>
</xsl:when>
<xsl:otherwise>
- <xsl:call-template name="convertNS"/>
+ <xsl:apply-templates select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:if>