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/12 21:33:56 UTC

svn commit: r954049 - /commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello.xsl

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>