commons-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=954047&view=rev
Log:
Added two xsl experiments. One is functional, the other is a work in progress. I really need
an xpath evaluator...

Added:
    commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/
    commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/AbstractStatechartGenerator.xsl   (with
props)
    commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello.xsl   (with props)

Added: commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/AbstractStatechartGenerator.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/AbstractStatechartGenerator.xsl?rev=954047&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/AbstractStatechartGenerator.xsl (added)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/AbstractStatechartGenerator.xsl Sat
Jun 12 19:33:41 2010
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" 
+	xmlns:s="http://www.w3.org/2005/07/scxml"
+	version="1.0">
+	<output method="text"/>
+
+	<param name="noIndexOf"/>
+	<param name="noMap"/>
+	<param name="name"/>
+
+	<template match="/s:scxml">
+		<!--
+			{conf.noIndexOf ? self.genNoIndexOfArrayPrototypeExtension() : ""}
+		
+			{conf.noMap ? self.genNoMapArrayPrototypeExtension() : ""}
+		-->
+
+		<text>function </text><value-of select="$name" /><text>StatechartExecutionContext(){
+
+				var self = this;	//used in the rare occasions we call public functions from inside this
class
+
+				//abstract state
+		</text>
+		<apply-templates match=".//s:transition[@event.length() > 0]"/>
+
+		<text>
+				//states
+		</text>
+		<apply-templates match=".//s:state"/>
+
+		
+				//states enum for glass-box unit testing
+				{self.genStatesEnum(conf.basicStates)}
+
+				//trigger methods for synchronous interaction
+				{util.foreach(conf.nonDefaultTransitions,self.genExternalTriggerDispatcher)}
+
+				{self.genContextHooks()}
+
+				//initialization script
+				{conf.scxml.script.toString()}
+
+				//initialization method
+				{self.genInitialization()}
+
+				//internal runtime functions
+				{self.genInternalRuntimeFunctions()}
+
+				//start static boilerplate code
+				{self.genBoilerplateDispatchCode(conf.dispatchInvocation)}
+
+			}
+
+		</text>
+		<value-of select="@profile"/>
+		<apply-templates select="s:state | s:initial | s:parallel"/>
+	</template>
+	
+	<template match="s:state | s:initial | s:parallel">
+		<value-of select="@id"/>
+	</template>
+</stylesheet>
+

Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/AbstractStatechartGenerator.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=954047&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello.xsl (added)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello.xsl Sat Jun 12 19:33:41 2010
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" 
+	xmlns:s="http://www.w3.org/2005/07/scxml"
+	version="1.0">
+	<output method="text"/>
+
+	<template match="/s:scxml">
+		<text>Statechart Profile:</text>
+		<value-of select="@profile"/>
+		<apply-templates select="s:state | s:initial | s:parallel"/>
+	</template>
+	
+	<template match="s:state | s:initial | s:parallel">
+		<value-of select="@id"/>
+	</template>
+</stylesheet>

Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello.xsl
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message