Author: MohReece
Date: 2010-10-21 17:24:47 -0400 (Thu, 21 Oct 2010)
New Revision: 6784
Modified:
projects/migration_tool/trunk/src/main/xslt/migrate.xslt
Log:
Consolidated Marc O's work in the migrate.xslt file (src/main/xslt dir).
Modified: projects/migration_tool/trunk/src/main/xslt/migrate.xslt
===================================================================
--- projects/migration_tool/trunk/src/main/xslt/migrate.xslt 2010-10-21 21:17:59 UTC (rev
6783)
+++ projects/migration_tool/trunk/src/main/xslt/migrate.xslt 2010-10-21 21:24:47 UTC (rev
6784)
@@ -23,6 +23,80 @@
</definitions>
</xsl:template>
+<xsl:template match="jpdl:process">
+ <process>
+ <xsl:attribute name="id"><xsl:value-of
select="@name"/></xsl:attribute>
+ <xsl:attribute name="name"><xsl:value-of
select="@name"/></xsl:attribute>
+ <xsl:apply-templates/>
+ </process>
+</xsl:template>
+<xsl:template match="jpdl:start">
+ <xsl:variable name="id"><xsl:value-of
select="@name"/></xsl:variable>
+ <startEvent>
+ <xsl:attribute name="id"><xsl:value-of
select="$id"/></xsl:attribute>
+ <xsl:attribute name="name"><xsl:value-of
select="$id"/></xsl:attribute>
+ <xsl:if test="@g">
+ <xsl:attribute name="g:x"><xsl:value-of
select="substring-before(@g,',')"/></xsl:attribute>
+ <xsl:variable name="g2"><xsl:value-of
select="substring-after(@g,',')"/></xsl:variable>
+ <xsl:attribute name="g:y"><xsl:value-of
select="substring-before($g2,',')"/></xsl:attribute>
+ <xsl:variable name="g3"><xsl:value-of
select="substring-after($g2,',')"/></xsl:variable>
+ <xsl:attribute name="g:width"><xsl:value-of
select="substring-before($g3,',')"/></xsl:attribute>
+ <xsl:attribute name="g:height"><xsl:value-of
select="substring-after($g3,',')"/></xsl:attribute>
+ </xsl:if>
+ </startEvent>
+ <xsl:for-each select="jpdl:transition">
+ <sequenceFlow>
+ <xsl:attribute name="sourceRef"><xsl:value-of
select="$id"/></xsl:attribute>
+ <xsl:attribute name="targetRef"><xsl:value-of
select="@to"/></xsl:attribute>
+ </sequenceFlow>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="jpdl:end">
+ <xsl:variable name="id"><xsl:value-of
select="@name"/></xsl:variable>
+ <endEvent>
+ <xsl:attribute name="id"><xsl:value-of
select="$id"/></xsl:attribute>
+ <xsl:attribute name="name"><xsl:value-of
select="$id"/></xsl:attribute>
+ <xsl:if test="@g">
+ <xsl:attribute name="g:x"><xsl:value-of
select="substring-before(@g,',')"/></xsl:attribute>
+ <xsl:variable name="g2"><xsl:value-of
select="substring-after(@g,',')"/></xsl:variable>
+ <xsl:attribute name="g:y"><xsl:value-of
select="substring-before($g2,',')"/></xsl:attribute>
+ <xsl:variable name="g3"><xsl:value-of
select="substring-after($g2,',')"/></xsl:variable>
+ <xsl:attribute name="g:width"><xsl:value-of
select="substring-before($g3,',')"/></xsl:attribute>
+ <xsl:attribute name="g:height"><xsl:value-of
select="substring-after($g3,',')"/></xsl:attribute>
+ </xsl:if>
+ <terminateEventDefinition/>
+ </endEvent>
+</xsl:template>
+
+<xsl:template match="jpdl:task">
+ <xsl:variable name="id"><xsl:value-of
select="@name"/></xsl:variable>
+ <userTask>
+ <xsl:attribute name="id"><xsl:value-of
select="$id"/></xsl:attribute>
+ <xsl:attribute name="name"><xsl:value-of
select="$id"/></xsl:attribute>
+ <xsl:if test="@g">
+ <xsl:attribute name="g:x"><xsl:value-of
select="substring-before(@g,',')"/></xsl:attribute>
+ <xsl:variable name="g2"><xsl:value-of
select="substring-after(@g,',')"/></xsl:variable>
+ <xsl:attribute name="g:y"><xsl:value-of
select="substring-before($g2,',')"/></xsl:attribute>
+ <xsl:variable name="g3"><xsl:value-of
select="substring-after($g2,',')"/></xsl:variable>
+ <xsl:attribute name="g:width"><xsl:value-of
select="substring-before($g3,',')"/></xsl:attribute>
+ <xsl:attribute name="g:height"><xsl:value-of
select="substring-after($g3,',')"/></xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@assignee">
+ <potentialOwner>
+ <resourceAssignmentExpression>
+ <formalExpression><xsl:value-of
select="@assignee"/></formalExpression>
+ </resourceAssignmentExpression>
+ </potentialOwner>
+ </xsl:if>
+ </userTask>
+ <xsl:for-each select="jpdl:transition">
+ <sequenceFlow>
+ <xsl:attribute name="sourceRef"><xsl:value-of
select="$id"/></xsl:attribute>
+ <xsl:attribute name="targetRef"><xsl:value-of
select="@to"/></xsl:attribute>
+ </sequenceFlow>
+ </xsl:for-each>
+</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
Show replies by date