As step 0 of SHALE-263 [1], here [2] is an initial cut of the stylesheet for producing the needed SCXML documents from Shale dialog configuration files. That directory [2] also contains the result of styling the dialog-config.xml that comes with the Shale usecases application (log on / edit profile).
Probably easiest to try via the command line: %java org.apache.xalan.xslt.Process -IN dialog-config.xml -XSL dialogconfig2scxml.xsl -OUT scxml-config.xml Caveats: * To produce multiple output documents, we either need processor specific XSLT extensions (if on XSLT 1.0, which pretty much all of us are) or we need a XSLT 2.0 processor. I'm currently using a xalan-specific extension (xalan:write), so the above will only work on JDK 1.4 (or 1.5 with xalan on classpath -- only if Sun 1.5). Will explore better solutions, wanted to get the initial cut of the stylesheet out there. * Quick sketch, may not be bullet proof yet (if you can try it out on your dialog-configs that'd be great). Notes about style results: * The event name "faces.outcome" and the variable name "outcome" are arbitrarily chosen (its the job of the SCXML NavigationHandler to trigger the event, we can choose whatever names we like) * The SCXML <invoke> element in view states can go away. It has to do with the state-activity separation in state charts. There are multiple ways to achieve this (some do not involve adding to the XML vocabulary -- similar to the ViewResolvers used in Spring MVC -- thats more of a C/C approach). I'm not proposing that new applications use <invoke>. -Rahul [1] https://issues.apache.org/struts/browse/SHALE-263 [2] http://people.apache.org/~rahul/shale/style-dialogs/