txml_to_sccd.xsl 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?xml version="1.0"?>
  2. <xsl:stylesheet
  3. version="1.0"
  4. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  5. xmlns:scxml="http://www.w3.org/2005/07/scxml"
  6. xmlns:conf="http://www.w3.org/2005/scxml-conformance"
  7. xmlns="msdl.uantwerpen.be/sccd">
  8. <xsl:output method="xml" indent="yes"/>
  9. <xsl:template match="/">
  10. <diagram>
  11. <description>
  12. <xsl:value-of select="/comment()"/>
  13. </description>
  14. <class name="Class1" default="true">
  15. <xsl:apply-templates select="scxml:scxml"/>
  16. </class>
  17. </diagram>
  18. </xsl:template>
  19. <xsl:template match="/scxml:scxml">
  20. <scxml initial="{@initial}">
  21. <xsl:for-each select="scxml:state">
  22. <state id="{@id}">
  23. </state>
  24. </xsl:for-each>
  25. <xsl:for-each select="scxml:onentry">
  26. <onentry>
  27. </onentry>
  28. </xsl:for-each>
  29. </scxml>
  30. </xsl:template>
  31. <xsl:template match="scxml:state|scxml:scxml">
  32. </xsl:template>
  33. <!-- <xsl:template match="onentry|onexit">
  34. </xsl:template>
  35. --></xsl:stylesheet>