commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbe...@apache.org
Subject svn commit: r954049 - /commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello.xsl
Date Sat, 12 Jun 2010 19:33:56 GMT
Author: jbeard
Date: Sat Jun 12 19:33:56 2010
New Revision: 954049

URL: http://svn.apache.org/viewvc?rev=954049&view=rev
Log:
Got example of call-template with node-list param working.

Modified:
    commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello.xsl

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello.xsl?rev=954049&r1=954048&r2=954049&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello.xsl (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello.xsl Sat Jun 12 19:33:56 2010
@@ -8,9 +8,28 @@
 		<text>Statechart Profile:</text>
 		<value-of select="@profile"/>
 		<apply-templates select="s:state | s:initial | s:parallel"/>
+		<call-template name="genAbstractState">
+			<with-param name="events" select=".//s:transition/@event"/>
+		</call-template>
 	</template>
 	
 	<template match="s:state | s:initial | s:parallel">
 		<value-of select="@id"/>
 	</template>
+
+
+	<template name="genAbstractState">
+		<param name="events"/>
+		<text>
+			var AbstractState = new function(){
+				//triggers are methods
+		</text>
+		<for-each select="$events">
+			<text>this.</text><value-of select="."/><text> = function(){};</text>
+		</for-each>
+		<text>
+				this.$default = function(){};
+			}
+		</text>
+	</template>
 </stylesheet>



Mime
View raw message