You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by jb...@apache.org on 2010/06/16 05:19:55 UTC

svn commit: r955119 - /commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/src/xslt/util/preprocess_import.xsl

Author: jbeard
Date: Wed Jun 16 03:19:53 2010
New Revision: 955119

URL: http://svn.apache.org/viewvc?rev=955119&view=rev
Log:
Fixed bug with preprocess_import.xml in which templates were not being correctly filtered. Also, fixed bug in which top-level variables were not being included.

Modified:
    commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/src/xslt/util/preprocess_import.xsl

Modified: commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/src/xslt/util/preprocess_import.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/src/xslt/util/preprocess_import.xsl?rev=955119&r1=955118&r2=955119&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/src/xslt/util/preprocess_import.xsl (original)
+++ commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/src/xslt/util/preprocess_import.xsl Wed Jun 16 03:19:53 2010
@@ -44,8 +44,8 @@ elements that are already defined). 
 		<!-- filter templates -->
 		<xsl:variable name="filteredNewTemplates" 
 			select="$newTopLevelElements[self::xsl:template]
-						[not( @name = $elementsAlreadyDefined/@name ) 
-							or not (@match = $elementsAlreadyDefined[self::xsl:template]/@match)]" />
+							[not(@name = $elementsAlreadyDefined[self::xsl:template]/@name)]
+							[not(@match = $elementsAlreadyDefined[self::xsl:template]/@match)]" />
 
 
 		<!-- params -->
@@ -59,9 +59,13 @@ elements that are already defined). 
 			select="$newTopLevelElements[self::xsl:output]
 						[not( $elementsAlreadyDefined[self::xsl:output] )]"/>
 
+		<!-- variable -->
+		<xsl:variable name="filteredNewVariables" 
+			select="$newTopLevelElements[self::xsl:variable]
+						[not( @name = $elementsAlreadyDefined[self::xsl:variable]/@name )]"/>
 
 		<!-- filteredNewTopLevelElements -->
-		<xsl:variable name="filteredNewTopLevelElements" select="$filteredNewTemplates | $filteredNewParams | $filteredNewOutput"/>
+		<xsl:variable name="filteredNewTopLevelElements" select="$filteredNewTemplates | $filteredNewParams | $filteredNewOutput | $filteredNewVariables"/>
 
 		<!-- combine old and new top-level elements -->
 		<xsl:variable name="combinedElementsAlreadyDefined" select="$filteredNewTopLevelElements | $elementsAlreadyDefined"/>