定义流程图描述信息文件格式:ProcessModle.xlst
界面画的流程图必需要解析到数据库,所以要有个样式扩展表来分析流程图,定义流程图描述信息文件格式:ProcessModle.xlst如下
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
<xsl:output method="xml" indent="yes"/>
<xsl:template match="mxGraphModel">
</xsl:template>
<xsl:template match="mxGraphModel">
<ProcessModel keyvalue="">
<!--流程基本信息-->
<Processs>
<Attributes>
<ProcessGUID></ProcessGUID>
<ProcessKindGUID></ProcessKindGUID>
<ProcessKindName></ProcessKindName>
<ProcessName></ProcessName>
<IsActive></IsActive>
<WatchMembers></WatchMembers>
<WatchMembersName></WatchMembersName>
<Description></Description>
<BusinessType></BusinessType>
<BusinessURL></BusinessURL>
<ReportURL></ReportURL>
<ProcessQueryDomain></ProcessQueryDomain>
<ProcessGrap></ProcessGrap>
<StationGUID></StationGUID>
</Attributes>
</Processs>
<!--步骤信息-->
<Steps>
<xsl:for-each select="root/Shape|root/Rect|root/Roundrect">
<Step>
<Attributes>
<StepGUID>
</StepGUID>
<NextStepGUID>
</NextStepGUID>
<StepName>
<xsl:value-of select="@label"/>
</StepName>
<StepID>
<xsl:value-of select="@id"/>
</StepID>
<StepType>
<xsl:choose>
<xsl:when test="@label='开始'">0</xsl:when>
<xsl:when test="@label='结束'">3</xsl:when>
<xsl:otherwise>
<xsl:for-each select="mxCell/mxGeometry">
<xsl:value-of select="@StepType"></xsl:value-of>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</StepType>
<IsMulti>
<xsl:for-each select="mxCell/mxGeometry">
<xsl:value-of select="@IsMulti"></xsl:value-of>
</xsl:for-each>
</IsMulti>
<ProcessGUID/>
<IsCanRollBack>
<xsl:for-each select="mxCell/mxGeometry">
<xsl:value-of select="@IsCanRollBack"></xsl:value-of>
</xsl:for-each>
</IsCanRollBack>
<IsCanCancel>
<xsl:for-each select="mxCell/mxGeometry">
<xsl:value-of select="@IsCanCancel"></xsl:value-of>
</xsl:for-each>
</IsCanCancel>
<IsCanAssign>
<xsl:for-each select="mxCell/mxGeometry">
<xsl:value-of select="@IsCanAssign"></xsl:value-of>
</xsl:for-each>
</IsCanAssign>
<IsCanRevolution>
<xsl:for-each select="mxCell/mxGeometry">
<xsl:value-of select="@IsCanRevolution"></xsl:value-of>
</xsl:for-each>
</IsCanRevolution>
<IsCanClose>
<xsl:for-each select="mxCell/mxGeometry">
<xsl:value-of select="@IsCanClose"></xsl:value-of>
</xsl:for-each>
</IsCanClose>
<Description>
<xsl:for-each select="mxCell/mxGeometry">
<xsl:value-of select="@Description"></xsl:value-of>
</xsl:for-each>
</Description>
<DispBusinessDomain>
<xsl:for-each select="mxCell/mxGeometry">
<xsl:value-of select="@DispBusinessDomain"></xsl:value-of>
</xsl:for-each>
</DispBusinessDomain>
<EditBusinessDomain>
<xsl:for-each select="mxCell/mxGeometry">
<xsl:value-of select="@EditBusinessDomain"></xsl:value-of>
</xsl:for-each>
</EditBusinessDomain>
<AuditorNameCC>
<xsl:for-each select="mxCell/mxGeometry">
<xsl:value-of select="@AuditorNameCC"></xsl:value-of>
</xsl:for-each>
</AuditorNameCC>
<AuditorNameCCGUID>
<xsl:for-each select="mxCell/mxGeometry">
<xsl:value-of select="@AuditorNameCCGUID"></xsl:value-of>
</xsl:for-each>
</AuditorNameCCGUID>
</Attributes>
<Brands>
<Band>
<Attributes>
<BandGUID></BandGUID>
<ProcessGUID>
<xsl:for-each select="mxCell/mxGeometry">
<xsl:value-of select="@y"></xsl:value-of>
</xsl:for-each>
</ProcessGUID>
<StepGUID>
<xsl:value-of select="Shape|Rect/mxCell/mxGeometry[@x]"></xsl:value-of>
</StepGUID>
<AuditorName>
<xsl:for-each select="mxCell/mxGeometry">
<xsl:value-of select="@AuditorName"></xsl:value-of>
</xsl:for-each>
</AuditorName>
<AuditorGUID>
<xsl:for-each select="mxCell/mxGeometry">
<xsl:value-of select="@AuditorGUID"></xsl:value-of>
</xsl:for-each>
</AuditorGUID>
<AuditorType>
<xsl:for-each select="mxCell/mxGeometry">
<xsl:value-of select="@AuditorType"></xsl:value-of>
</xsl:for-each>
</AuditorType>
</Attributes>
</Band>
</Brands>
</Step>
</xsl:for-each>
</Steps>
<!--步骤关系信息-->
<Connectors>
<xsl:for-each select="root/Connector">
<Relation>
<Attributes>
<StepGUID>
<xsl:for-each select="mxCell">
<xsl:value-of select="@source"></xsl:value-of>
</xsl:for-each>
</StepGUID>
<NextStepGUID>
<xsl:for-each select="mxCell">
<xsl:value-of select="@target"></xsl:value-of>
</xsl:for-each>
</NextStepGUID>
<Expression/>
<IsActive/>
<ProcessGUID/>
<ExpressionStru/>
<RelationGUID/>
<Position/>
</Attributes>
</Relation>
</xsl:for-each>
</Connectors>
</ProcessModel>
</xsl:template>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>