commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbe...@apache.org
Subject svn commit: r1037481 - in /commons/sandbox/gsoc/2010/scxml-js/trunk: ./ src/javascript/scxml/cgf/backends/js/ src/python/scxml/cgf/ src/python/scxml/cgf/backends/js/ src/xslt/backends/js/ src/xslt/ir-compiler/ src/xslt/layout/ src/xslt/util/
Date Sun, 21 Nov 2010 15:42:23 GMT
Author: jbeard
Date: Sun Nov 21 15:42:22 2010
New Revision: 1037481

URL: http://svn.apache.org/viewvc?rev=1037481&view=rev
Log:
Intermediate (broken) commit. Includes the following changes:

* initial stylesheet that gets passed into topo-sort.xsl is treated specially as source in
the stylesheet, and not included in dependency list
* add stylehseets to build modules for each language frontend (javascript, python, bash) from
xslt list.
* dependency paths in stylesheets are rooted in src/xslt
* stylesheets get generally built, reference transparently in target/ dir (src/xslt/* mapped
to target/xslt/*)

Next steps:

* Add generating module code to build process.
* Refactor existing frontend to use these generated modules.
* Add to build process automated testing of each language frontend to ensure consistency.

Added:
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/xsl   (with props)
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-bash-xsltproc-from-topo-sort-list.xsl
  (with props)
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-python-from-topo-sort-list.xsl
  (with props)
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-require-js-from-topo-sort-list.xsl
  (with props)
Removed:
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/target
Modified:
    commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StatePatternStatechartGenerator.js
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StateTableStatechartGenerator.js
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/SwitchyardStatechartGenerator.js
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StatePatternStatechartGenerator.py
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StateTableStatechartGenerator.py
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/SwitchyardGenerator.py
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StatePatternStatechartGenerator.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StateTableStatechartGenerator.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/SwitchyardStatechartGenerator.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/addBasicDescendantsToTransitions.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/addEventRegularExpressions.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/appendBasicStateInformation.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/appendStateInformation.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/appendTransitionInformation.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/computeLCA.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/copyEnumeratedEventTransitions.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/enumerateEvents.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/expandStarEvent.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/flattenTransitions.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/numberStatesAndTransitions.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/layout/addTransitionTargetIds.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/topo-sort.xsl

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/build-common.xml Sun Nov 21 15:42:22 2010
@@ -28,6 +28,7 @@
 	<property name="lib-build-java" location="${lib}/build-java"/>
 
 	<property name="build" value="target"/>
+	<property name="build-xsl" location="${build}/xsl"/>
 	<property name="build-js" location="${build}/build-js"/>
 	<property name="build-class" location="${build}/classes"/>
 	<property name="build-jar" location="${build}/jar"/>
@@ -72,12 +73,6 @@
 	<property name="path_to_dojo_base" location="${lib-test-js}/dojo-release-1.4.2-src/dojo"/>
 	<property name="path_to_dojo" value="${path_to_dojo_base}/dojo.js"/>
 
-	<fileset id="stylesheets-to-preprocess" dir="${src}/xslt/backends/js">
-		<include name="StatePatternStatechartGenerator.xsl"/>
-		<include name="StateTableStatechartGenerator.xsl"/>
-		<include name="SwitchyardStatechartGenerator.xsl"/>
-	</fileset>
-
 	<path id="scxml_tests_xml">
 		<pathelement location="test/kitchen_sink/KitchenSink.xml"/>
 		<pathelement location="test/kitchen_sink/KitchenSink_dataModule.xml"/>
@@ -546,20 +541,19 @@
 		</sequential>
 	</macrodef>
 
-	<target name="preprocess-stylesheets" depends="init">
+	<target name="preprocess-stylesheets">
 		<xslt 
 			classpathref="maven.plugin.classpath" 
 			style="${src}/xslt/util/preprocess_import.xsl" 
-			destdir="${build}"
+			destdir="${build-xsl}"
 			scanincludeddirectories="false"
 			useImplicitFileset="false"
 			force="true">
 
-			<fileset refid="stylesheets-to-preprocess"/>
+			<fileset dir="src/xslt/" includes="**/*.xsl"/>
 
 			<mapper>
 				<chainedmapper>
-					<flattenmapper/>
 					<globmapper from="*.xsl" to="*_combined.xsl"/>
 				</chainedmapper>
 			</mapper>

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StatePatternStatechartGenerator.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StatePatternStatechartGenerator.js?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StatePatternStatechartGenerator.js
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StatePatternStatechartGenerator.js
Sun Nov 21 15:42:22 2010
@@ -10,7 +10,7 @@ require.def(
 		"text!src/xslt/ir-compiler/addEventRegularExpressions.xsl",
 		"text!src/xslt/ir-compiler/expandStarEvent.xsl",
 		"text!src/xslt/layout/addTransitionTargetIds.xsl", 
-		"text!target/StatePatternStatechartGenerator_combined.xsl" //preprocessed stylesheet
+		"text!target/xsl/StatePatternStatechartGenerator_combined.xsl" //preprocessed stylesheet
 	],
 
 	function(

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StateTableStatechartGenerator.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StateTableStatechartGenerator.js?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StateTableStatechartGenerator.js
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StateTableStatechartGenerator.js
Sun Nov 21 15:42:22 2010
@@ -3,7 +3,7 @@ require.def(
 	"src/javascript/scxml/cgf/backends/js/StateTableStatechartGenerator",
 
 	[ "src/javascript/scxml/cgf/backends/js/AbstractEnumeratedStatechartGenerator", 
-		"text!target/StateTableStatechartGenerator_combined.xsl" //preprocessed stylesheet
+		"text!target/xsl/StateTableStatechartGenerator_combined.xsl" //preprocessed stylesheet
 	],
 
 	function(AbstractEnumeratedStatechartGenerator,StateTableStatechartGenerator){

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/SwitchyardStatechartGenerator.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/SwitchyardStatechartGenerator.js?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/SwitchyardStatechartGenerator.js
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/SwitchyardStatechartGenerator.js
Sun Nov 21 15:42:22 2010
@@ -3,7 +3,7 @@ require.def(
 	"src/javascript/scxml/cgf/backends/js/SwitchyardStatechartGenerator",
 
 	[ "src/javascript/scxml/cgf/backends/js/AbstractEnumeratedStatechartGenerator", 
-		"text!target/SwitchyardStatechartGenerator_combined.xsl" //preprocessed stylesheet
+		"text!target/xsl/SwitchyardStatechartGenerator_combined.xsl" //preprocessed stylesheet
 	],
 
 	function(AbstractEnumeratedStatechartGenerator,SwitchyardStatechartGenerator){

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StatePatternStatechartGenerator.py
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StatePatternStatechartGenerator.py?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StatePatternStatechartGenerator.py
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StatePatternStatechartGenerator.py
Sun Nov 21 15:42:22 2010
@@ -25,5 +25,5 @@ config =  {
 					"xslt/ir-compiler/addEventRegularExpressions.xsl",
 					"xslt/ir-compiler/expandStarEvent.xsl",
 					"xslt/layout/addTransitionTargetIds.xsl" ],
-	"code" : "target/StatePatternStatechartGenerator_combined.xsl"	 #preprocessed stylesheet
instead? 
+	"code" : "xsl/StatePatternStatechartGenerator_combined.xsl"	 #preprocessed stylesheet instead?

 }

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StateTableStatechartGenerator.py
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StateTableStatechartGenerator.py?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StateTableStatechartGenerator.py
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StateTableStatechartGenerator.py
Sun Nov 21 15:42:22 2010
@@ -2,6 +2,6 @@ from scxml.cgf.backends.js.AbstractEnume
 
 config =  {
 	"transformations": AbstractEnumeratedStatechartGeneratorConfig["transformations"], 
-	"code" : "target/StateTableStatechartGenerator_combined.xsl"	 #preprocessed stylesheet instead?

+	"code" : "xsl/StateTableStatechartGenerator_combined.xsl"	 #preprocessed stylesheet instead?

 }
 

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/SwitchyardGenerator.py
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/SwitchyardGenerator.py?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/SwitchyardGenerator.py
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/SwitchyardGenerator.py
Sun Nov 21 15:42:22 2010
@@ -2,5 +2,5 @@ from scxml.cgf.backends.js.AbstractEnume
 
 config =  {
 	"transformations": AbstractEnumeratedStatechartGeneratorConfig["transformations"], 
-	"code" : "target/SwitchyardStatechartGenerator_combined.xsl"	 #preprocessed stylesheet instead?

+	"code" : "xsl/SwitchyardStatechartGenerator_combined.xsl"	 #preprocessed stylesheet instead?

 }

Added: commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/xsl?rev=1037481&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/xsl (added)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/xsl Sun Nov 21 15:42:22
2010
@@ -0,0 +1 @@
+link ../../../../target/xsl/
\ No newline at end of file

Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/xsl
------------------------------------------------------------------------------
    svn:special = *

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StatePatternStatechartGenerator.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StatePatternStatechartGenerator.xsl?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StatePatternStatechartGenerator.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StatePatternStatechartGenerator.xsl
Sun Nov 21 15:42:22 2010
@@ -20,26 +20,27 @@
 	xmlns:c="http://commons.apache.org/scxml-js"
 	version="1.0">
 
+	<import href="AbstractStatechartGenerator.xsl"/>
+
 	<c:dependencies>
-		<c:dependency path="addBasicDescendantsToTransitions.xsl"/>
-		<c:dependency path="addEventRegularExpressions.xsl"/>
-		<c:dependency path="appendBasicStateInformation.xsl"/>
-		<c:dependency path="appendStateInformation.xsl"/>
-		<c:dependency path="appendTransitionInformation.xsl"/>
-		<c:dependency path="changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl"/>
-		<c:dependency path="computeLCA.xsl"/>
-		<c:dependency path="copyEnumeratedEventTransitions.xsl"/>
-		<c:dependency path="enumerateEvents.xsl"/>
-		<c:dependency path="expandStarEvent.xsl"/>
-		<c:dependency path="generateUniqueInitialStateIds.xsl"/>
-		<c:dependency path="generateUniqueStateIds.xsl"/>
-		<c:dependency path="normalizeInitialStates.xsl"/>
-		<c:dependency path="splitTransitionTargets.xsl"/>
-		<c:dependency path="transformIf.xsl"/>
+		<c:dependency path="ir-compiler/addBasicDescendantsToTransitions.xsl"/>
+		<c:dependency path="ir-compiler/addEventRegularExpressions.xsl"/>
+		<c:dependency path="ir-compiler/appendBasicStateInformation.xsl"/>
+		<c:dependency path="ir-compiler/appendStateInformation.xsl"/>
+		<c:dependency path="ir-compiler/appendTransitionInformation.xsl"/>
+		<c:dependency path="ir-compiler/changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl"/>
+		<c:dependency path="ir-compiler/computeLCA.xsl"/>
+		<c:dependency path="ir-compiler/copyEnumeratedEventTransitions.xsl"/>
+		<c:dependency path="ir-compiler/enumerateEvents.xsl"/>
+		<c:dependency path="ir-compiler/expandStarEvent.xsl"/>
+		<c:dependency path="ir-compiler/generateUniqueInitialStateIds.xsl"/>
+		<c:dependency path="ir-compiler/generateUniqueStateIds.xsl"/>
+		<c:dependency path="ir-compiler/normalizeInitialStates.xsl"/>
+		<c:dependency path="ir-compiler/splitTransitionTargets.xsl"/>
+		<c:dependency path="ir-compiler/transformIf.xsl"/>
+		<c:dependency path="layout/addTransitionTargetIds.xsl"/>
 	</c:dependencies>
 
-	<import href="AbstractStatechartGenerator.xsl"/>
-
 	<!-- TODO: refactor name of enumeratedEventDispatchInvocation variable. it is no longer
an invocation -->
 	<variable name="enumeratedEventDispatchInvocation" select="'state[e]();'"/>
 	<variable name="prefixEventDispatchInvocation" select="'state.$dispatchPrefixEvent(e)'"/>

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StateTableStatechartGenerator.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StateTableStatechartGenerator.xsl?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StateTableStatechartGenerator.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StateTableStatechartGenerator.xsl
Sun Nov 21 15:42:22 2010
@@ -21,25 +21,26 @@
 	version="1.0">
 
 	<c:dependencies>
-		<c:dependency path="splitTransitionTargets.xsl"/>
-		<c:dependency path="addBasicDescendantsToTransitions.xsl"/>
-		<c:dependency path="addEventRegularExpressions.xsl"/>
-		<c:dependency path="appendBasicStateInformation.xsl"/>
-		<c:dependency path="appendStateInformation.xsl"/>
-		<c:dependency path="appendTransitionInformation.xsl"/>
-		<c:dependency path="changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl"/>
-		<c:dependency path="computeLCA.xsl"/>
-		<c:dependency path="copyEnumeratedEventTransitions.xsl"/>
-		<c:dependency path="enumerateEvents.xsl"/>
-		<c:dependency path="expandStarEvent.xsl"/>
-		<c:dependency path="flattenTransitions.xsl"/>
-		<c:dependency path="generateUniqueInitialStateIds.xsl"/>
-		<c:dependency path="generateUniqueStateIds.xsl"/>
-		<c:dependency path="nameTransitions.xsl"/>
-		<c:dependency path="normalizeInitialStates.xsl"/>
-		<c:dependency path="numberStatesAndTransitions.xsl"/>
-		<c:dependency path="splitTransitionTargets.xsl"/>
-		<c:dependency path="transformIf.xsl"/>
+		<c:dependency path="ir-compiler/splitTransitionTargets.xsl"/>
+		<c:dependency path="ir-compiler/addBasicDescendantsToTransitions.xsl"/>
+		<c:dependency path="ir-compiler/addEventRegularExpressions.xsl"/>
+		<c:dependency path="ir-compiler/appendBasicStateInformation.xsl"/>
+		<c:dependency path="ir-compiler/appendStateInformation.xsl"/>
+		<c:dependency path="ir-compiler/appendTransitionInformation.xsl"/>
+		<c:dependency path="ir-compiler/changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl"/>
+		<c:dependency path="ir-compiler/computeLCA.xsl"/>
+		<c:dependency path="ir-compiler/copyEnumeratedEventTransitions.xsl"/>
+		<c:dependency path="ir-compiler/enumerateEvents.xsl"/>
+		<c:dependency path="ir-compiler/expandStarEvent.xsl"/>
+		<c:dependency path="ir-compiler/flattenTransitions.xsl"/>
+		<c:dependency path="ir-compiler/generateUniqueInitialStateIds.xsl"/>
+		<c:dependency path="ir-compiler/generateUniqueStateIds.xsl"/>
+		<c:dependency path="ir-compiler/nameTransitions.xsl"/>
+		<c:dependency path="ir-compiler/normalizeInitialStates.xsl"/>
+		<c:dependency path="ir-compiler/numberStatesAndTransitions.xsl"/>
+		<c:dependency path="ir-compiler/splitTransitionTargets.xsl"/>
+		<c:dependency path="ir-compiler/transformIf.xsl"/>
+		<c:dependency path="layout/addTransitionTargetIds.xsl"/>
 	</c:dependencies>
 
 	<import href="AbstractEnumeratedStatechartGenerator.xsl"/>

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/SwitchyardStatechartGenerator.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/SwitchyardStatechartGenerator.xsl?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/SwitchyardStatechartGenerator.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/SwitchyardStatechartGenerator.xsl
Sun Nov 21 15:42:22 2010
@@ -21,25 +21,26 @@
 	version="1.0">
 
 	<c:dependencies>
-		<c:dependency path="splitTransitionTargets.xsl"/>
-		<c:dependency path="addBasicDescendantsToTransitions.xsl"/>
-		<c:dependency path="addEventRegularExpressions.xsl"/>
-		<c:dependency path="appendBasicStateInformation.xsl"/>
-		<c:dependency path="appendStateInformation.xsl"/>
-		<c:dependency path="appendTransitionInformation.xsl"/>
-		<c:dependency path="changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl"/>
-		<c:dependency path="computeLCA.xsl"/>
-		<c:dependency path="copyEnumeratedEventTransitions.xsl"/>
-		<c:dependency path="enumerateEvents.xsl"/>
-		<c:dependency path="expandStarEvent.xsl"/>
-		<c:dependency path="flattenTransitions.xsl"/>
-		<c:dependency path="generateUniqueInitialStateIds.xsl"/>
-		<c:dependency path="generateUniqueStateIds.xsl"/>
-		<c:dependency path="nameTransitions.xsl"/>
-		<c:dependency path="normalizeInitialStates.xsl"/>
-		<c:dependency path="numberStatesAndTransitions.xsl"/>
-		<c:dependency path="splitTransitionTargets.xsl"/>
-		<c:dependency path="transformIf.xsl"/>
+		<c:dependency path="ir-compiler/splitTransitionTargets.xsl"/>
+		<c:dependency path="ir-compiler/addBasicDescendantsToTransitions.xsl"/>
+		<c:dependency path="ir-compiler/addEventRegularExpressions.xsl"/>
+		<c:dependency path="ir-compiler/appendBasicStateInformation.xsl"/>
+		<c:dependency path="ir-compiler/appendStateInformation.xsl"/>
+		<c:dependency path="ir-compiler/appendTransitionInformation.xsl"/>
+		<c:dependency path="ir-compiler/changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl"/>
+		<c:dependency path="ir-compiler/computeLCA.xsl"/>
+		<c:dependency path="ir-compiler/copyEnumeratedEventTransitions.xsl"/>
+		<c:dependency path="ir-compiler/enumerateEvents.xsl"/>
+		<c:dependency path="ir-compiler/expandStarEvent.xsl"/>
+		<c:dependency path="ir-compiler/flattenTransitions.xsl"/>
+		<c:dependency path="ir-compiler/generateUniqueInitialStateIds.xsl"/>
+		<c:dependency path="ir-compiler/generateUniqueStateIds.xsl"/>
+		<c:dependency path="ir-compiler/nameTransitions.xsl"/>
+		<c:dependency path="ir-compiler/normalizeInitialStates.xsl"/>
+		<c:dependency path="ir-compiler/numberStatesAndTransitions.xsl"/>
+		<c:dependency path="ir-compiler/splitTransitionTargets.xsl"/>
+		<c:dependency path="ir-compiler/transformIf.xsl"/>
+		<c:dependency path="layout/addTransitionTargetIds.xsl"/>
 	</c:dependencies>
 
 	<import href="AbstractEnumeratedStatechartGenerator.xsl"/>

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/addBasicDescendantsToTransitions.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/addBasicDescendantsToTransitions.xsl?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/addBasicDescendantsToTransitions.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/addBasicDescendantsToTransitions.xsl
Sun Nov 21 15:42:22 2010
@@ -23,8 +23,8 @@
 	<xsl:output method="xml"/>
 
 	<c:dependencies>
-		<c:dependency path="appendBasicStateInformation.xsl"/>
-		<c:dependency path="computeLCA.xsl"/>
+		<c:dependency path="ir-compiler/appendBasicStateInformation.xsl"/>
+		<c:dependency path="ir-compiler/computeLCA.xsl"/>
 	</c:dependencies>
 
 	<xsl:variable name="states" select="//*[self::s:state or self::s:parallel or self::s:scxml]"/>

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/addEventRegularExpressions.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/addEventRegularExpressions.xsl?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/addEventRegularExpressions.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/addEventRegularExpressions.xsl
Sun Nov 21 15:42:22 2010
@@ -23,7 +23,7 @@
 	<xsl:output method="xml"/>
 
 	<c:dependencies>
-		<c:dependency path="enumerateEvents.xsl"/>
+		<c:dependency path="ir-compiler/enumerateEvents.xsl"/>
 	</c:dependencies>
 
 	<!-- identity transform -->

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/appendBasicStateInformation.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/appendBasicStateInformation.xsl?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/appendBasicStateInformation.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/appendBasicStateInformation.xsl
Sun Nov 21 15:42:22 2010
@@ -27,7 +27,7 @@ isHistory="true" to history states.
 	<xsl:output method="xml"/>
 
 	<c:dependencies>
-		<c:dependency path="normalizeInitialStates.xsl"/>
+		<c:dependency path="ir-compiler/normalizeInitialStates.xsl"/>
 	</c:dependencies>
 
 	<!-- identity transform -->

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/appendStateInformation.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/appendStateInformation.xsl?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/appendStateInformation.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/appendStateInformation.xsl
Sun Nov 21 15:42:22 2010
@@ -27,7 +27,7 @@ descendants of children of <parallel> st
 	<xsl:output method="xml"/>
 
 	<c:dependencies>
-		<c:dependency path="normalizeInitialStates.xsl"/>
+		<c:dependency path="ir-compiler/normalizeInitialStates.xsl"/>
 	</c:dependencies>
 
 	<!-- identity transform -->

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/appendTransitionInformation.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/appendTransitionInformation.xsl?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/appendTransitionInformation.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/appendTransitionInformation.xsl
Sun Nov 21 15:42:22 2010
@@ -31,11 +31,11 @@ region (a child of <parallel>), and the 
 	<xsl:output method="xml"/>
 
 	<c:dependencies>
-		<c:dependency path="splitTransitionTargets.xsl"/>
-		<c:dependency path="normalizeInitialStates.xsl"/>
-		<c:dependency path="changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl"/>
-		<c:dependency path="generateUniqueInitialStateIds.xsl"/>
-		<c:dependency path="generateUniqueStateIds.xsl"/>
+		<c:dependency path="ir-compiler/splitTransitionTargets.xsl"/>
+		<c:dependency path="ir-compiler/normalizeInitialStates.xsl"/>
+		<c:dependency path="ir-compiler/changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl"/>
+		<c:dependency path="ir-compiler/generateUniqueInitialStateIds.xsl"/>
+		<c:dependency path="ir-compiler/generateUniqueStateIds.xsl"/>
 	</c:dependencies>
 
 	<!-- identity transform -->

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl
Sun Nov 21 15:42:22 2010
@@ -30,9 +30,9 @@ elements, so this should still generate 
 	<xsl:output method="xml"/>
 
 	<c:dependencies>
-		<c:dependency path="splitTransitionTargets.xsl"/>
-		<c:dependency path="generateUniqueInitialStateIds.xsl"/>
-		<c:dependency path="generateUniqueStateIds.xsl"/>
+		<c:dependency path="ir-compiler/splitTransitionTargets.xsl"/>
+		<c:dependency path="ir-compiler/generateUniqueInitialStateIds.xsl"/>
+		<c:dependency path="ir-compiler/generateUniqueStateIds.xsl"/>
 	</c:dependencies>
 
 	<!-- identity transform -->

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/computeLCA.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/computeLCA.xsl?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/computeLCA.xsl (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/computeLCA.xsl Sun Nov 21
15:42:22 2010
@@ -31,11 +31,11 @@ to the input document as children in the
 	<xsl:output method="xml"/>
 
 	<c:dependencies>
-		<c:dependency path="splitTransitionTargets.xsl"/>
-		<c:dependency path="normalizeInitialStates.xsl"/>
-		<c:dependency path="changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl"/>
-		<c:dependency path="generateUniqueInitialStateIds.xsl"/>
-		<c:dependency path="generateUniqueStateIds.xsl"/>
+		<c:dependency path="ir-compiler/splitTransitionTargets.xsl"/>
+		<c:dependency path="ir-compiler/normalizeInitialStates.xsl"/>
+		<c:dependency path="ir-compiler/changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl"/>
+		<c:dependency path="ir-compiler/generateUniqueInitialStateIds.xsl"/>
+		<c:dependency path="ir-compiler/generateUniqueStateIds.xsl"/>
 	</c:dependencies>
 
 	<!-- identity transform -->

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/copyEnumeratedEventTransitions.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/copyEnumeratedEventTransitions.xsl?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/copyEnumeratedEventTransitions.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/copyEnumeratedEventTransitions.xsl
Sun Nov 21 15:42:22 2010
@@ -15,6 +15,10 @@
 	version="1.0">
 	<xsl:output method="xml"/>
 
+	<c:dependencies>
+		<c:dependency path="ir-compiler/computeLCA.xsl"/>
+	</c:dependencies>
+
 	<!-- identity transform -->
 	<xsl:template match="@*|node()">
 		<xsl:copy>

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/enumerateEvents.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/enumerateEvents.xsl?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/enumerateEvents.xsl (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/enumerateEvents.xsl Sun
Nov 21 15:42:22 2010
@@ -27,7 +27,7 @@ source document under the namespaced <ev
 	<xsl:output method="xml"/>
 
 	<c:dependencies>
-		<c:dependency path="copyEnumeratedEventTransitions.xsl"/>
+		<c:dependency path="ir-compiler/copyEnumeratedEventTransitions.xsl"/>
 	</c:dependencies>
 
 	<xsl:key name="enumeratedEvents" match="c:enumeratedTransition | c:enumeratedSend" use="@event"/>
<!-- used for generating unique list -->

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/expandStarEvent.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/expandStarEvent.xsl?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/expandStarEvent.xsl (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/expandStarEvent.xsl Sun
Nov 21 15:42:22 2010
@@ -23,7 +23,7 @@
 	<xsl:output method="xml"/>
 
 	<c:dependencies>
-		<c:dependency path="enumerateEvents.xsl"/>
+		<c:dependency path="ir-compiler/enumerateEvents.xsl"/>
 	</c:dependencies>
 
 	<xsl:variable name="enumeratedEventsEnum" select="/s:scxml/c:enumeratedEventsEnum/c:event"/>

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/flattenTransitions.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/flattenTransitions.xsl?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/flattenTransitions.xsl (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/flattenTransitions.xsl Sun
Nov 21 15:42:22 2010
@@ -29,7 +29,7 @@ collision. 
 	<xsl:output method="xml"/>
 
 	<c:dependencies>
-		<c:dependency path="normalizeInitialStates.xsl"/>
+		<c:dependency path="ir-compiler/normalizeInitialStates.xsl"/>
 	</c:dependencies>
 
 	<!-- identity transform -->

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/numberStatesAndTransitions.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/numberStatesAndTransitions.xsl?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/numberStatesAndTransitions.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/ir-compiler/numberStatesAndTransitions.xsl
Sun Nov 21 15:42:22 2010
@@ -7,8 +7,8 @@
 	<xsl:output method="xml"/>
 
 	<c:dependencies>
-		<c:dependency path="appendBasicStateInformation.xsl"/>
-		<c:dependency path="normalizeInitialStates.xsl"/>
+		<c:dependency path="ir-compiler/appendBasicStateInformation.xsl"/>
+		<c:dependency path="ir-compiler/normalizeInitialStates.xsl"/>
 	</c:dependencies>
 
 	<!-- we copy them, so that we can use their positions as identifiers -->

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/layout/addTransitionTargetIds.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/layout/addTransitionTargetIds.xsl?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/layout/addTransitionTargetIds.xsl (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/layout/addTransitionTargetIds.xsl Sun
Nov 21 15:42:22 2010
@@ -6,6 +6,14 @@
 	version="1.0">
 	<xsl:output method="xml"/>
 
+	<c:dependencies>
+		<c:dependency path="ir-compiler/splitTransitionTargets.xsl"/>
+		<c:dependency path="ir-compiler/normalizeInitialStates.xsl"/>
+		<c:dependency path="ir-compiler/changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl"/>
+		<c:dependency path="ir-compiler/generateUniqueInitialStateIds.xsl"/>
+		<c:dependency path="ir-compiler/generateUniqueStateIds.xsl"/>
+	</c:dependencies>
+
 	<!-- we copy them, so that we can use their positions as identifiers -->
 
 	<!-- identity transform -->

Added: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-bash-xsltproc-from-topo-sort-list.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-bash-xsltproc-from-topo-sort-list.xsl?rev=1037481&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-bash-xsltproc-from-topo-sort-list.xsl
(added)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-bash-xsltproc-from-topo-sort-list.xsl
Sun Nov 21 15:42:22 2010
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!-- generate javascript backend in the format of requirejs module -->
+<stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" 
+	xmlns:s="http://www.w3.org/2005/07/scxml"
+	xmlns:c="http://commons.apache.org/scxml-js"
+	version="1.0">
+	<output method="text"/>
+
+	<param name="module-path"/>
+	<param name="xsl-base-dir" select="'src/xslt/'"/>
+
+
+	<template match="/c:topologicallySortedDependencyList">
+	<text>cat $1 | </text>
+	<for-each select="c:stylesheet">
+		<text>xsltproc </text><value-of select="$xsl-base-dir"/><value-of
select="@path"/><text> - | \&#10;</text>
+	</for-each> 
+	<text>xsltproc </text><value-of select="$xsl-base-dir"/><value-of select="@source-path"/><text>
- | \&#10;</text>
+	<text>cat > out.js</text>
+	</template>
+</stylesheet>
+
+
+

Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-bash-xsltproc-from-topo-sort-list.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-python-from-topo-sort-list.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-python-from-topo-sort-list.xsl?rev=1037481&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-python-from-topo-sort-list.xsl
(added)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-python-from-topo-sort-list.xsl
Sun Nov 21 15:42:22 2010
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!-- generate javascript backend in the format of requirejs module -->
+<stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" 
+	xmlns:s="http://www.w3.org/2005/07/scxml"
+	xmlns:c="http://commons.apache.org/scxml-js"
+	version="1.0">
+	<output method="text"/>
+
+	<param name="module-path"/>
+	<param name="xsl-base-dir" select="'xslt/'"/>
+
+
+	<template match="/c:topologicallySortedDependencyList">
+	<text>
+config =  {
+	"transformations": [ 
+	</text>
+		<for-each select="c:stylesheet">
+			<text>"</text><value-of select="$xsl-base-dir"/><value-of select="@path"/><text>"</text><if
test="not(position() = last())"><text>, </text></if>
+		</for-each> 
+	<text>
+	 ],
+	"code" : "</text><value-of select="$xsl-base-dir"/><value-of select="@source-path"/><text>"
+}
+	</text>
+	</template>
+</stylesheet>
+
+

Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-python-from-topo-sort-list.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-require-js-from-topo-sort-list.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-require-js-from-topo-sort-list.xsl?rev=1037481&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-require-js-from-topo-sort-list.xsl
(added)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-require-js-from-topo-sort-list.xsl
Sun Nov 21 15:42:22 2010
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!-- generate javascript backend in the format of requirejs module -->
+<stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" 
+	xmlns:s="http://www.w3.org/2005/07/scxml"
+	xmlns:c="http://commons.apache.org/scxml-js"
+	version="1.0">
+	<output method="text"/>
+
+	<param name="module-path"/>
+	<param name="xsl-base-dir" select="'target/xsl/'"/>
+
+
+	<template match="/c:topologicallySortedDependencyList">
+
+		require.def(
+
+			"<value-of select="$module-path"/>",
+			[
+				<for-each select="c:stylesheet">
+					"text!<value-of select="$xsl-base-dir"/><value-of select="@path"/>",
+				</for-each>
+				"text!<value-of select="$xsl-base-dir"/><value-of select="@source-path"/>"
+			],
+
+			function(
+				<!-- FIXME: these variable names will be unique, but not very meaningful, or easy
to debug :( -->
+				<for-each select="c:stylesheet">
+					<value-of select="concat('js_var_',position())"/>,
+				</for-each>
+				<value-of select="concat('js_var_',count(c:stylesheet)+1)"/>
+			){
+
+				return {
+					"transformations" : [
+						<for-each select="c:stylesheet">
+							<value-of select="concat('js_var_',position())"/><if test="not(position()
= last())">, 
+						</if>
+						</for-each>
+					],
+					"code" : <value-of select="concat('js_var_',count(c:stylesheet)+1)"/>
+ 
+				};
+
+
+			}
+		);
+	</template>
+</stylesheet>
+

Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/generate-require-js-from-topo-sort-list.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/topo-sort.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/topo-sort.xsl?rev=1037481&r1=1037480&r2=1037481&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/topo-sort.xsl (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/util/topo-sort.xsl Sun Nov 21 15:42:22
2010
@@ -29,37 +29,34 @@ in topologically-sorted order. 
 	<xsl:output method="xml"/>
 
 	<!-- this should be overridden by the user -->
-	<xsl:param name="root-path" value="'root'"/>
+	<xsl:param name="source-path" select="'root'"/>
+	<xsl:param name="dependency-base-dir" select="'../'"/>
 
 
 	<xsl:template match="/">
 		<xsl:variable name="dependency-graph-fragment">
 			<xsl:call-template name="load-dependency-graph">
 				<xsl:with-param name="paths-already-visited" select="/.."/>
-				<xsl:with-param name="this-path" select="$root-path"/>
+				<xsl:with-param name="this-path" select="$source-path"/>
 				<xsl:with-param name="current-node" select="."/>
+				<xsl:with-param name="is-first-call" select="true()"/>
 			</xsl:call-template>
 		</xsl:variable>
 
 		<xsl:variable name="dependency-graph-node-set" select="exsl:node-set($dependency-graph-fragment)"/>
 		
-		<!--
-		<xsl:copy-of select="$dependency-graph-node-set"/>
-		-->
-
 		<xsl:variable name="unique-dependency-graph-node-set" 
 			select="$dependency-graph-node-set/c:stylesheet[not(@path = preceding-sibling::c:stylesheet/@path)]"/>
 
-		<!--
-		<xsl:value-of select="count($unique-dependency-graph-node-set)"/>
-		-->
-
 		<xsl:variable name="starting-nodes-without-dependencies" select="$unique-dependency-graph-node-set[not(c:dependency)]"/>
 
 		<!--
 		<xsl:copy-of select="$starting-nodes-without-dependencies"/>
+		<xsl:copy-of select="$dependency-graph-node-set"/>
+		<xsl:value-of select="count($unique-dependency-graph-node-set)"/>
 		-->
-		<c:topologicallySortedDependencyList>
+
+		<c:topologicallySortedDependencyList source-path="{$source-path}">
 			<xsl:call-template name="topo-sort">
 				<xsl:with-param name="nodes-without-dependencies" select="$starting-nodes-without-dependencies"/>
 				<xsl:with-param name="processed-nodes" select="/.."/>	
@@ -153,6 +150,7 @@ in topologically-sorted order. 
 		<xsl:param name="paths-already-visited"/>
 		<xsl:param name="this-path"/>
 		<xsl:param name="current-node"/>
+		<xsl:param name="is-first-call"/>
 
 		<xsl:variable name="dep-paths" select="$current-node/xsl:stylesheet/c:dependencies/c:dependency"/>
 
@@ -164,9 +162,11 @@ in topologically-sorted order. 
 		-->
 
 		<!-- write out his dependencies -->
-		<c:stylesheet path="{$this-path}">
-			<xsl:copy-of select="$dep-paths"/>
-		</c:stylesheet>
+		<xsl:if test="not($is-first-call)">
+			<c:stylesheet path="{$this-path}">
+				<xsl:copy-of select="$dep-paths"/>
+			</c:stylesheet>
+		</xsl:if>
 
 		<!-- visit all other depdencies -->
 		<xsl:for-each select="$dep-paths">
@@ -180,12 +180,13 @@ in topologically-sorted order. 
 			<xsl:if test="not($paths-already-visited[.=$dep-path])">
 
 				<!-- read the doc -->
-				<xsl:variable name="dep-doc" select="document(concat('../ir-compiler/',$dep-path))"/>
+				<xsl:variable name="dep-doc" select="document(concat($dependency-base-dir,$dep-path))"/>
 
 				<xsl:call-template name="load-dependency-graph">
 					<xsl:with-param name="this-path" select="$dep-path"/>
 					<xsl:with-param name="current-node" select="$dep-doc"/>
 					<xsl:with-param name="paths-already-visited" select="$paths-already-visited | $dep-path"/>
+					<xsl:with-param name="is-first-call" select="false()"/>
 				</xsl:call-template>
 			</xsl:if>
 		</xsl:for-each>



Mime
View raw message