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:34:11 UTC
svn commit: r954051 - in
/commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt: hello-super.xsl
hello.xsl
Author: jbeard
Date: Sat Jun 12 19:34:11 2010
New Revision: 954051
URL: http://svn.apache.org/viewvc?rev=954051&view=rev
Log:
Tried out import. Found that we don't need to use xsl text element; regular text nodes will be echoed out, which yields much cleaner templates.
Added:
commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello-super.xsl (with props)
Modified:
commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello.xsl
Added: commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello-super.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello-super.xsl?rev=954051&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello-super.xsl (added)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello-super.xsl Sat Jun 12 19:34:11 2010
@@ -0,0 +1,21 @@
+<?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 name="genAbstractState">
+ <param name="events"/>
+
+ var AbstractState = new function(){
+ //triggers are methods
+
+ <for-each select="$events">
+ this.<value-of select="."/> = function(){};
+ </for-each>
+
+ this.$default = function(){};
+ }
+ </template>
+</stylesheet>
+
Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/test/xslt/hello-super.xsl
------------------------------------------------------------------------------
svn:eol-style = native
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=954051&r1=954050&r2=954051&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:34:11 2010
@@ -2,34 +2,28 @@
<stylesheet xmlns="http://www.w3.org/1999/XSL/Transform"
xmlns:s="http://www.w3.org/2005/07/scxml"
version="1.0">
+
+ <import href="hello-super.xsl"/>
+
<output method="text"/>
+
<template match="/s:scxml">
+ <!--
<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>