plcopen/pou_block_instances.xslt
changeset 1936 b85b13b1c2ec
parent 1382 675a6229fc60
child 1957 2d1cc4f5e4ef
equal deleted inserted replaced
1935:f2b0d849ea77 1936:b85b13b1c2ec
     1 <?xml version="1.0"?>
     1 <?xml version="1.0"?>
     2 <xsl:stylesheet xmlns:func="http://exslt.org/functions" xmlns:dyn="http://exslt.org/dynamic" xmlns:str="http://exslt.org/strings" xmlns:math="http://exslt.org/math" xmlns:exsl="http://exslt.org/common" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:yml="http://fdik.org/yml" xmlns:set="http://exslt.org/sets" xmlns:ppx="http://www.plcopen.org/xml/tc6_0201" xmlns:ns="pou_block_instances_ns" xmlns:regexp="http://exslt.org/regular-expressions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes="ns" version="1.0" exclude-result-prefixes="ns">
     2 <xsl:stylesheet xmlns:exsl="http://exslt.org/common" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ppx="http://www.plcopen.org/xml/tc6_0201" xmlns:ns="pou_block_instances_ns" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes="ns" version="1.0" exclude-result-prefixes="ns">
     3   <xsl:output method="xml"/>
     3   <xsl:output method="xml"/>
     4   <xsl:variable name="space" select="'                                                                                                                                                                                                        '"/>
     4   <xsl:template match="text()"/>
     5   <xsl:param name="autoindent" select="4"/>
       
     6   <xsl:template match="text()">
       
     7     <xsl:param name="_indent" select="0"/>
       
     8   </xsl:template>
       
     9   <xsl:template match="ppx:pou[ppx:body]|ppx:transition[ppx:body]|ppx:action[ppx:body]">
     5   <xsl:template match="ppx:pou[ppx:body]|ppx:transition[ppx:body]|ppx:action[ppx:body]">
    10     <xsl:param name="_indent" select="0"/>
     6     <xsl:apply-templates select="ppx:body/*[self::ppx:FBD or self::ppx:LD or self::ppx:SFC]/*"/>
    11     <xsl:apply-templates select="ppx:body/*[self::ppx:FBD or self::ppx:LD or self::ppx:SFC]/*">
       
    12       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
    13     </xsl:apply-templates>
       
    14   </xsl:template>
     7   </xsl:template>
    15   <xsl:template name="add_instance">
     8   <xsl:template name="add_instance">
    16     <xsl:param name="_indent" select="0"/>
       
    17     <xsl:param name="type"/>
     9     <xsl:param name="type"/>
    18     <xsl:value-of select="ns:AddBlockInstance($type, @localId, ppx:position/@x, ppx:position/@y, @width, @height)"/>
    10     <xsl:value-of select="ns:AddBlockInstance($type, @localId, ppx:position/@x, ppx:position/@y, @width, @height)"/>
    19   </xsl:template>
    11   </xsl:template>
    20   <xsl:template name="execution_order">
    12   <xsl:template name="execution_order">
    21     <xsl:param name="_indent" select="0"/>
       
    22     <xsl:choose>
    13     <xsl:choose>
    23       <xsl:when test="@executionOrderId">
    14       <xsl:when test="@executionOrderId">
    24         <xsl:value-of select="@executionOrderId"/>
    15         <xsl:value-of select="@executionOrderId"/>
    25       </xsl:when>
    16       </xsl:when>
    26       <xsl:otherwise>
    17       <xsl:otherwise>
    27         <xsl:text>0</xsl:text>
    18         <xsl:text>0</xsl:text>
    28       </xsl:otherwise>
    19       </xsl:otherwise>
    29     </xsl:choose>
    20     </xsl:choose>
    30   </xsl:template>
    21   </xsl:template>
    31   <xsl:template name="ConnectionInfos">
    22   <xsl:template name="ConnectionInfos">
    32     <xsl:param name="_indent" select="0"/>
       
    33     <xsl:param name="type"/>
    23     <xsl:param name="type"/>
    34     <xsl:param name="negated"/>
    24     <xsl:param name="negated"/>
    35     <xsl:param name="edge"/>
    25     <xsl:param name="edge"/>
    36     <xsl:param name="formalParameter"/>
    26     <xsl:param name="formalParameter"/>
    37     <xsl:value-of select="ns:AddInstanceConnection($type, $formalParameter, $negated, $edge, ppx:relPosition/@x, ppx:relPosition/@y)"/>
    27     <xsl:value-of select="ns:AddInstanceConnection($type, $formalParameter, $negated, $edge, ppx:relPosition/@x, ppx:relPosition/@y)"/>
    38   </xsl:template>
    28   </xsl:template>
    39   <xsl:template match="ppx:position">
    29   <xsl:template match="ppx:position">
    40     <xsl:param name="_indent" select="0"/>
       
    41     <xsl:value-of select="ns:AddLinkPoint(@x, @y)"/>
    30     <xsl:value-of select="ns:AddLinkPoint(@x, @y)"/>
    42   </xsl:template>
    31   </xsl:template>
    43   <xsl:template match="ppx:connection">
    32   <xsl:template match="ppx:connection">
    44     <xsl:param name="_indent" select="0"/>
       
    45     <xsl:value-of select="ns:AddConnectionLink(@refLocalId, @formalParameter)"/>
    33     <xsl:value-of select="ns:AddConnectionLink(@refLocalId, @formalParameter)"/>
    46     <xsl:apply-templates select="ppx:position">
    34     <xsl:apply-templates select="ppx:position"/>
    47       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
    48     </xsl:apply-templates>
       
    49   </xsl:template>
    35   </xsl:template>
    50   <xsl:template match="ppx:connectionPointIn">
    36   <xsl:template match="ppx:connectionPointIn">
    51     <xsl:param name="_indent" select="0"/>
       
    52     <xsl:param name="negated"/>
    37     <xsl:param name="negated"/>
    53     <xsl:param name="edge"/>
    38     <xsl:param name="edge"/>
    54     <xsl:param name="formalParameter"/>
    39     <xsl:param name="formalParameter"/>
    55     <xsl:call-template name="ConnectionInfos">
    40     <xsl:call-template name="ConnectionInfos">
    56       <xsl:with-param name="type">
    41       <xsl:with-param name="type">
    64       </xsl:with-param>
    49       </xsl:with-param>
    65       <xsl:with-param name="formalParameter">
    50       <xsl:with-param name="formalParameter">
    66         <xsl:value-of select="$formalParameter"/>
    51         <xsl:value-of select="$formalParameter"/>
    67       </xsl:with-param>
    52       </xsl:with-param>
    68     </xsl:call-template>
    53     </xsl:call-template>
    69     <xsl:apply-templates select="ppx:connection">
    54     <xsl:apply-templates select="ppx:connection"/>
    70       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
    71     </xsl:apply-templates>
       
    72   </xsl:template>
    55   </xsl:template>
    73   <xsl:template match="ppx:connectionPointOut">
    56   <xsl:template match="ppx:connectionPointOut">
    74     <xsl:param name="_indent" select="0"/>
       
    75     <xsl:param name="negated"/>
    57     <xsl:param name="negated"/>
    76     <xsl:param name="edge"/>
    58     <xsl:param name="edge"/>
    77     <xsl:param name="formalParameter"/>
    59     <xsl:param name="formalParameter"/>
    78     <xsl:call-template name="ConnectionInfos">
    60     <xsl:call-template name="ConnectionInfos">
    79       <xsl:with-param name="type">
    61       <xsl:with-param name="type">
    89         <xsl:value-of select="$formalParameter"/>
    71         <xsl:value-of select="$formalParameter"/>
    90       </xsl:with-param>
    72       </xsl:with-param>
    91     </xsl:call-template>
    73     </xsl:call-template>
    92   </xsl:template>
    74   </xsl:template>
    93   <xsl:template match="ppx:connectionPointOutAction">
    75   <xsl:template match="ppx:connectionPointOutAction">
    94     <xsl:param name="_indent" select="0"/>
       
    95     <xsl:call-template name="ConnectionInfos">
    76     <xsl:call-template name="ConnectionInfos">
    96       <xsl:with-param name="type">
    77       <xsl:with-param name="type">
    97         <xsl:text>output</xsl:text>
    78         <xsl:text>output</xsl:text>
    98       </xsl:with-param>
    79       </xsl:with-param>
    99     </xsl:call-template>
    80     </xsl:call-template>
   100   </xsl:template>
    81   </xsl:template>
   101   <xsl:template match="ppx:comment">
    82   <xsl:template match="ppx:comment">
   102     <xsl:param name="_indent" select="0"/>
       
   103     <xsl:value-of select="ns:SetSpecificValues(ppx:content/xhtml:p/text())"/>
    83     <xsl:value-of select="ns:SetSpecificValues(ppx:content/xhtml:p/text())"/>
   104     <xsl:call-template name="add_instance">
    84     <xsl:call-template name="add_instance">
   105       <xsl:with-param name="type">
    85       <xsl:with-param name="type">
   106         <xsl:value-of select="local-name()"/>
    86         <xsl:value-of select="local-name()"/>
   107       </xsl:with-param>
    87       </xsl:with-param>
   108     </xsl:call-template>
    88     </xsl:call-template>
   109   </xsl:template>
    89   </xsl:template>
   110   <xsl:template match="ppx:block">
    90   <xsl:template match="ppx:block">
   111     <xsl:param name="_indent" select="0"/>
       
   112     <xsl:variable name="execution_order">
    91     <xsl:variable name="execution_order">
   113       <xsl:call-template name="execution_order"/>
    92       <xsl:call-template name="execution_order"/>
   114     </xsl:variable>
    93     </xsl:variable>
   115     <xsl:value-of select="ns:SetSpecificValues(@instanceName, $execution_order)"/>
    94     <xsl:value-of select="ns:SetSpecificValues(@instanceName, $execution_order)"/>
   116     <xsl:call-template name="add_instance">
    95     <xsl:call-template name="add_instance">
   118         <xsl:value-of select="@typeName"/>
    97         <xsl:value-of select="@typeName"/>
   119       </xsl:with-param>
    98       </xsl:with-param>
   120     </xsl:call-template>
    99     </xsl:call-template>
   121     <xsl:for-each select="ppx:inputVariables/ppx:variable">
   100     <xsl:for-each select="ppx:inputVariables/ppx:variable">
   122       <xsl:apply-templates select="ppx:connectionPointIn">
   101       <xsl:apply-templates select="ppx:connectionPointIn">
   123         <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   124         <xsl:with-param name="negated" select="@negated"/>
   102         <xsl:with-param name="negated" select="@negated"/>
   125         <xsl:with-param name="edge" select="@edge"/>
   103         <xsl:with-param name="edge" select="@edge"/>
   126         <xsl:with-param name="formalParameter" select="@formalParameter"/>
   104         <xsl:with-param name="formalParameter" select="@formalParameter"/>
   127       </xsl:apply-templates>
   105       </xsl:apply-templates>
   128     </xsl:for-each>
   106     </xsl:for-each>
   129     <xsl:for-each select="ppx:outputVariables/ppx:variable">
   107     <xsl:for-each select="ppx:outputVariables/ppx:variable">
   130       <xsl:apply-templates select="ppx:connectionPointOut">
   108       <xsl:apply-templates select="ppx:connectionPointOut">
   131         <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   132         <xsl:with-param name="negated" select="@negated"/>
   109         <xsl:with-param name="negated" select="@negated"/>
   133         <xsl:with-param name="edge" select="@edge"/>
   110         <xsl:with-param name="edge" select="@edge"/>
   134         <xsl:with-param name="formalParameter" select="@formalParameter"/>
   111         <xsl:with-param name="formalParameter" select="@formalParameter"/>
   135       </xsl:apply-templates>
   112       </xsl:apply-templates>
   136     </xsl:for-each>
   113     </xsl:for-each>
   137   </xsl:template>
   114   </xsl:template>
   138   <xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived">
   115   <xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived">
   139     <xsl:param name="_indent" select="0"/>
       
   140     <xsl:value-of select="@name"/>
   116     <xsl:value-of select="@name"/>
   141   </xsl:template>
   117   </xsl:template>
   142   <xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:string">
   118   <xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:string">
   143     <xsl:param name="_indent" select="0"/>
       
   144     <xsl:text>STRING</xsl:text>
   119     <xsl:text>STRING</xsl:text>
   145   </xsl:template>
   120   </xsl:template>
   146   <xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:wstring">
   121   <xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:wstring">
   147     <xsl:param name="_indent" select="0"/>
       
   148     <xsl:text>WSTRING</xsl:text>
   122     <xsl:text>WSTRING</xsl:text>
   149   </xsl:template>
   123   </xsl:template>
   150   <xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*">
   124   <xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*">
   151     <xsl:param name="_indent" select="0"/>
       
   152     <xsl:value-of select="local-name()"/>
   125     <xsl:value-of select="local-name()"/>
   153   </xsl:template>
   126   </xsl:template>
   154   <xsl:template name="VariableBlockInfos">
   127   <xsl:template name="VariableBlockInfos">
   155     <xsl:param name="_indent" select="0"/>
       
   156     <xsl:param name="type"/>
   128     <xsl:param name="type"/>
   157     <xsl:variable name="expression">
   129     <xsl:variable name="expression">
   158       <xsl:value-of select="ppx:expression/text()"/>
   130       <xsl:value-of select="ppx:expression/text()"/>
   159     </xsl:variable>
   131     </xsl:variable>
   160     <xsl:variable name="value_type">
   132     <xsl:variable name="value_type">
   161       <xsl:choose>
   133       <xsl:choose>
   162         <xsl:when test="ancestor::ppx:transition[@name=$expression]">
   134         <xsl:when test="ancestor::ppx:transition[@name=$expression]">
   163           <xsl:text>BOOL</xsl:text>
   135           <xsl:text>BOOL</xsl:text>
   164         </xsl:when>
   136         </xsl:when>
   165         <xsl:when test="ancestor::ppx:pou[@name=$expression]">
   137         <xsl:when test="ancestor::ppx:pou[@name=$expression]">
   166           <xsl:apply-templates select="ancestor::ppx:pou/child::ppx:interface/ppx:returnType">
   138           <xsl:apply-templates select="ancestor::ppx:pou/child::ppx:interface/ppx:returnType"/>
   167             <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
   139         </xsl:when>
   168           </xsl:apply-templates>
   140         <xsl:otherwise>
   169         </xsl:when>
   141           <xsl:apply-templates select="ancestor::ppx:pou/child::ppx:interface/*/ppx:variable[@name=$expression]/ppx:type"/>
   170         <xsl:otherwise>
       
   171           <xsl:apply-templates select="ancestor::ppx:pou/child::ppx:interface/*/ppx:variable[@name=$expression]/ppx:type">
       
   172             <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   173           </xsl:apply-templates>
       
   174         </xsl:otherwise>
   142         </xsl:otherwise>
   175       </xsl:choose>
   143       </xsl:choose>
   176     </xsl:variable>
   144     </xsl:variable>
   177     <xsl:variable name="execution_order">
   145     <xsl:variable name="execution_order">
   178       <xsl:call-template name="execution_order"/>
   146       <xsl:call-template name="execution_order"/>
   182       <xsl:with-param name="type">
   150       <xsl:with-param name="type">
   183         <xsl:value-of select="$type"/>
   151         <xsl:value-of select="$type"/>
   184       </xsl:with-param>
   152       </xsl:with-param>
   185     </xsl:call-template>
   153     </xsl:call-template>
   186     <xsl:apply-templates select="ppx:connectionPointIn">
   154     <xsl:apply-templates select="ppx:connectionPointIn">
   187       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   188       <xsl:with-param name="negated" select="@negatedIn"/>
   155       <xsl:with-param name="negated" select="@negatedIn"/>
   189       <xsl:with-param name="edge" select="@edgeIn"/>
   156       <xsl:with-param name="edge" select="@edgeIn"/>
   190     </xsl:apply-templates>
   157     </xsl:apply-templates>
   191     <xsl:apply-templates select="ppx:connectionPointOut">
   158     <xsl:apply-templates select="ppx:connectionPointOut">
   192       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   193       <xsl:with-param name="negated" select="@negatedOut"/>
   159       <xsl:with-param name="negated" select="@negatedOut"/>
   194       <xsl:with-param name="edge" select="@edgeOut"/>
   160       <xsl:with-param name="edge" select="@edgeOut"/>
   195     </xsl:apply-templates>
   161     </xsl:apply-templates>
   196   </xsl:template>
   162   </xsl:template>
   197   <xsl:template match="ppx:inVariable">
   163   <xsl:template match="ppx:inVariable">
   198     <xsl:param name="_indent" select="0"/>
       
   199     <xsl:call-template name="VariableBlockInfos">
   164     <xsl:call-template name="VariableBlockInfos">
   200       <xsl:with-param name="type" select="'input'"/>
   165       <xsl:with-param name="type" select="'input'"/>
   201     </xsl:call-template>
   166     </xsl:call-template>
   202   </xsl:template>
   167   </xsl:template>
   203   <xsl:template match="ppx:outVariable">
   168   <xsl:template match="ppx:outVariable">
   204     <xsl:param name="_indent" select="0"/>
       
   205     <xsl:call-template name="VariableBlockInfos">
   169     <xsl:call-template name="VariableBlockInfos">
   206       <xsl:with-param name="type" select="'output'"/>
   170       <xsl:with-param name="type" select="'output'"/>
   207     </xsl:call-template>
   171     </xsl:call-template>
   208   </xsl:template>
   172   </xsl:template>
   209   <xsl:template match="ppx:inOutVariable">
   173   <xsl:template match="ppx:inOutVariable">
   210     <xsl:param name="_indent" select="0"/>
       
   211     <xsl:call-template name="VariableBlockInfos">
   174     <xsl:call-template name="VariableBlockInfos">
   212       <xsl:with-param name="type" select="'inout'"/>
   175       <xsl:with-param name="type" select="'inout'"/>
   213     </xsl:call-template>
   176     </xsl:call-template>
   214   </xsl:template>
   177   </xsl:template>
   215   <xsl:template match="ppx:connector|ppx:continuation">
   178   <xsl:template match="ppx:connector|ppx:continuation">
   216     <xsl:param name="_indent" select="0"/>
       
   217     <xsl:value-of select="ns:SetSpecificValues(@name)"/>
   179     <xsl:value-of select="ns:SetSpecificValues(@name)"/>
   218     <xsl:call-template name="add_instance">
   180     <xsl:call-template name="add_instance">
   219       <xsl:with-param name="type">
   181       <xsl:with-param name="type">
   220         <xsl:value-of select="local-name()"/>
   182         <xsl:value-of select="local-name()"/>
   221       </xsl:with-param>
   183       </xsl:with-param>
   222     </xsl:call-template>
   184     </xsl:call-template>
   223     <xsl:apply-templates select="ppx:connectionPointIn">
   185     <xsl:apply-templates select="ppx:connectionPointIn"/>
   224       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
   186     <xsl:apply-templates select="ppx:connectionPointOut"/>
   225     </xsl:apply-templates>
       
   226     <xsl:apply-templates select="ppx:connectionPointOut">
       
   227       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   228     </xsl:apply-templates>
       
   229   </xsl:template>
   187   </xsl:template>
   230   <xsl:template match="ppx:leftPowerRail|ppx:rightPowerRail">
   188   <xsl:template match="ppx:leftPowerRail|ppx:rightPowerRail">
   231     <xsl:param name="_indent" select="0"/>
       
   232     <xsl:variable name="type" select="local-name()"/>
   189     <xsl:variable name="type" select="local-name()"/>
   233     <xsl:variable name="connectors">
   190     <xsl:variable name="connectors">
   234       <xsl:choose>
   191       <xsl:choose>
   235         <xsl:when test="$type='leftPowerRail'">
   192         <xsl:when test="$type='leftPowerRail'">
   236           <xsl:value-of select="count(ppx:connectionPointOut)"/>
   193           <xsl:value-of select="count(ppx:connectionPointOut)"/>
   246         <xsl:value-of select="$type"/>
   203         <xsl:value-of select="$type"/>
   247       </xsl:with-param>
   204       </xsl:with-param>
   248     </xsl:call-template>
   205     </xsl:call-template>
   249     <xsl:choose>
   206     <xsl:choose>
   250       <xsl:when test="$type='leftPowerRail'">
   207       <xsl:when test="$type='leftPowerRail'">
   251         <xsl:apply-templates select="ppx:connectionPointOut">
   208         <xsl:apply-templates select="ppx:connectionPointOut"/>
   252           <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   253         </xsl:apply-templates>
       
   254       </xsl:when>
   209       </xsl:when>
   255       <xsl:otherwise>
   210       <xsl:otherwise>
   256         <xsl:apply-templates select="ppx:connectionPointIn">
   211         <xsl:apply-templates select="ppx:connectionPointIn"/>
   257           <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   258         </xsl:apply-templates>
       
   259       </xsl:otherwise>
   212       </xsl:otherwise>
   260     </xsl:choose>
   213     </xsl:choose>
   261   </xsl:template>
   214   </xsl:template>
   262   <xsl:template match="ppx:contact|ppx:coil">
   215   <xsl:template match="ppx:contact|ppx:coil">
   263     <xsl:param name="_indent" select="0"/>
       
   264     <xsl:variable name="type" select="local-name()"/>
   216     <xsl:variable name="type" select="local-name()"/>
   265     <xsl:variable name="storage">
   217     <xsl:variable name="storage">
   266       <xsl:choose>
   218       <xsl:choose>
   267         <xsl:when test="$type='coil'">
   219         <xsl:when test="$type='coil'">
   268           <xsl:value-of select="@storage"/>
   220           <xsl:value-of select="@storage"/>
   276     <xsl:call-template name="add_instance">
   228     <xsl:call-template name="add_instance">
   277       <xsl:with-param name="type">
   229       <xsl:with-param name="type">
   278         <xsl:value-of select="$type"/>
   230         <xsl:value-of select="$type"/>
   279       </xsl:with-param>
   231       </xsl:with-param>
   280     </xsl:call-template>
   232     </xsl:call-template>
   281     <xsl:apply-templates select="ppx:connectionPointIn">
   233     <xsl:apply-templates select="ppx:connectionPointIn"/>
   282       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
   234     <xsl:apply-templates select="ppx:connectionPointOut"/>
   283     </xsl:apply-templates>
       
   284     <xsl:apply-templates select="ppx:connectionPointOut">
       
   285       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   286     </xsl:apply-templates>
       
   287   </xsl:template>
   235   </xsl:template>
   288   <xsl:template match="ppx:step">
   236   <xsl:template match="ppx:step">
   289     <xsl:param name="_indent" select="0"/>
       
   290     <xsl:value-of select="ns:SetSpecificValues(@name, @initialStep)"/>
   237     <xsl:value-of select="ns:SetSpecificValues(@name, @initialStep)"/>
   291     <xsl:apply-templates select="ppx:connectionPointOutAction">
   238     <xsl:apply-templates select="ppx:connectionPointOutAction">
   292       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   293       <xsl:with-param name="negated" select="@negated"/>
   239       <xsl:with-param name="negated" select="@negated"/>
   294     </xsl:apply-templates>
   240     </xsl:apply-templates>
   295     <xsl:call-template name="add_instance">
   241     <xsl:call-template name="add_instance">
   296       <xsl:with-param name="type">
   242       <xsl:with-param name="type">
   297         <xsl:value-of select="local-name()"/>
   243         <xsl:value-of select="local-name()"/>
   298       </xsl:with-param>
   244       </xsl:with-param>
   299     </xsl:call-template>
   245     </xsl:call-template>
   300     <xsl:apply-templates select="ppx:connectionPointIn">
   246     <xsl:apply-templates select="ppx:connectionPointIn"/>
   301       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
   247     <xsl:apply-templates select="ppx:connectionPointOut"/>
   302     </xsl:apply-templates>
       
   303     <xsl:apply-templates select="ppx:connectionPointOut">
       
   304       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   305     </xsl:apply-templates>
       
   306   </xsl:template>
   248   </xsl:template>
   307   <xsl:template match="ppx:transition">
   249   <xsl:template match="ppx:transition">
   308     <xsl:param name="_indent" select="0"/>
       
   309     <xsl:variable name="priority">
   250     <xsl:variable name="priority">
   310       <xsl:choose>
   251       <xsl:choose>
   311         <xsl:when test="@priority">
   252         <xsl:when test="@priority">
   312           <xsl:value-of select="@priority"/>
   253           <xsl:value-of select="@priority"/>
   313         </xsl:when>
   254         </xsl:when>
   339         </xsl:when>
   280         </xsl:when>
   340       </xsl:choose>
   281       </xsl:choose>
   341     </xsl:variable>
   282     </xsl:variable>
   342     <xsl:value-of select="ns:SetSpecificValues($priority, $condition_type, $condition)"/>
   283     <xsl:value-of select="ns:SetSpecificValues($priority, $condition_type, $condition)"/>
   343     <xsl:apply-templates select="ppx:condition/ppx:connectionPointIn">
   284     <xsl:apply-templates select="ppx:condition/ppx:connectionPointIn">
   344       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   345       <xsl:with-param name="negated" select="ppx:condition/@negated"/>
   285       <xsl:with-param name="negated" select="ppx:condition/@negated"/>
   346     </xsl:apply-templates>
   286     </xsl:apply-templates>
   347     <xsl:call-template name="add_instance">
   287     <xsl:call-template name="add_instance">
   348       <xsl:with-param name="type">
   288       <xsl:with-param name="type">
   349         <xsl:value-of select="local-name()"/>
   289         <xsl:value-of select="local-name()"/>
   350       </xsl:with-param>
   290       </xsl:with-param>
   351     </xsl:call-template>
   291     </xsl:call-template>
   352     <xsl:apply-templates select="ppx:connectionPointIn">
   292     <xsl:apply-templates select="ppx:connectionPointIn"/>
   353       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
   293     <xsl:apply-templates select="ppx:connectionPointOut"/>
   354     </xsl:apply-templates>
       
   355     <xsl:apply-templates select="ppx:connectionPointOut">
       
   356       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   357     </xsl:apply-templates>
       
   358   </xsl:template>
   294   </xsl:template>
   359   <xsl:template match="ppx:selectionDivergence|ppx:selectionConvergence|ppx:simultaneousDivergence|ppx:simultaneousConvergence">
   295   <xsl:template match="ppx:selectionDivergence|ppx:selectionConvergence|ppx:simultaneousDivergence|ppx:simultaneousConvergence">
   360     <xsl:param name="_indent" select="0"/>
       
   361     <xsl:variable name="type">
   296     <xsl:variable name="type">
   362       <xsl:value-of select="local-name()"/>
   297       <xsl:value-of select="local-name()"/>
   363     </xsl:variable>
   298     </xsl:variable>
   364     <xsl:variable name="connectors">
   299     <xsl:variable name="connectors">
   365       <xsl:choose>
   300       <xsl:choose>
   375     <xsl:call-template name="add_instance">
   310     <xsl:call-template name="add_instance">
   376       <xsl:with-param name="type">
   311       <xsl:with-param name="type">
   377         <xsl:value-of select="$type"/>
   312         <xsl:value-of select="$type"/>
   378       </xsl:with-param>
   313       </xsl:with-param>
   379     </xsl:call-template>
   314     </xsl:call-template>
   380     <xsl:apply-templates select="ppx:connectionPointIn">
   315     <xsl:apply-templates select="ppx:connectionPointIn"/>
   381       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
   316     <xsl:apply-templates select="ppx:connectionPointOut"/>
   382     </xsl:apply-templates>
       
   383     <xsl:apply-templates select="ppx:connectionPointOut">
       
   384       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   385     </xsl:apply-templates>
       
   386   </xsl:template>
   317   </xsl:template>
   387   <xsl:template match="ppx:jumpStep">
   318   <xsl:template match="ppx:jumpStep">
   388     <xsl:param name="_indent" select="0"/>
       
   389     <xsl:variable name="type">
   319     <xsl:variable name="type">
   390       <xsl:text>jump</xsl:text>
   320       <xsl:text>jump</xsl:text>
   391     </xsl:variable>
   321     </xsl:variable>
   392     <xsl:value-of select="ns:SetSpecificValues(@targetName)"/>
   322     <xsl:value-of select="ns:SetSpecificValues(@targetName)"/>
   393     <xsl:call-template name="add_instance">
   323     <xsl:call-template name="add_instance">
   394       <xsl:with-param name="type">
   324       <xsl:with-param name="type">
   395         <xsl:value-of select="$type"/>
   325         <xsl:value-of select="$type"/>
   396       </xsl:with-param>
   326       </xsl:with-param>
   397     </xsl:call-template>
   327     </xsl:call-template>
   398     <xsl:apply-templates select="ppx:connectionPointIn">
   328     <xsl:apply-templates select="ppx:connectionPointIn"/>
   399       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   400     </xsl:apply-templates>
       
   401   </xsl:template>
   329   </xsl:template>
   402   <xsl:template match="ppx:action">
   330   <xsl:template match="ppx:action">
   403     <xsl:param name="_indent" select="0"/>
       
   404     <xsl:variable name="type">
   331     <xsl:variable name="type">
   405       <xsl:choose>
   332       <xsl:choose>
   406         <xsl:when test="ppx:reference">
   333         <xsl:when test="ppx:reference">
   407           <xsl:text>reference</xsl:text>
   334           <xsl:text>reference</xsl:text>
   408         </xsl:when>
   335         </xsl:when>
   432       </xsl:choose>
   359       </xsl:choose>
   433     </xsl:variable>
   360     </xsl:variable>
   434     <xsl:value-of select="ns:AddAction($qualifier, $type, $value, @duration, @indicator)"/>
   361     <xsl:value-of select="ns:AddAction($qualifier, $type, $value, @duration, @indicator)"/>
   435   </xsl:template>
   362   </xsl:template>
   436   <xsl:template match="ppx:actionBlock">
   363   <xsl:template match="ppx:actionBlock">
   437     <xsl:param name="_indent" select="0"/>
       
   438     <xsl:value-of select="ns:SetSpecificValues()"/>
   364     <xsl:value-of select="ns:SetSpecificValues()"/>
   439     <xsl:apply-templates select="ppx:action">
   365     <xsl:apply-templates select="ppx:action"/>
   440       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   441     </xsl:apply-templates>
       
   442     <xsl:call-template name="add_instance">
   366     <xsl:call-template name="add_instance">
   443       <xsl:with-param name="type">
   367       <xsl:with-param name="type">
   444         <xsl:value-of select="local-name()"/>
   368         <xsl:value-of select="local-name()"/>
   445       </xsl:with-param>
   369       </xsl:with-param>
   446     </xsl:call-template>
   370     </xsl:call-template>
   447     <xsl:apply-templates select="ppx:connectionPointIn">
   371     <xsl:apply-templates select="ppx:connectionPointIn">
   448       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   449       <xsl:with-param name="negated" select="@negated"/>
   372       <xsl:with-param name="negated" select="@negated"/>
   450     </xsl:apply-templates>
   373     </xsl:apply-templates>
   451   </xsl:template>
   374   </xsl:template>
   452 </xsl:stylesheet>
   375 </xsl:stylesheet>