plcopen/variables_infos.xslt
changeset 1936 b85b13b1c2ec
parent 1368 e567e4bee11f
child 1951 bbd1e1744c91
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="var_infos_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="var_infos_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="'                                                                                                                                                                                                        '"/>
       
     5   <xsl:param name="autoindent" select="4"/>
       
     6   <xsl:param name="tree"/>
     4   <xsl:param name="tree"/>
     7   <xsl:template match="text()">
     5   <xsl:template match="text()"/>
     8     <xsl:param name="_indent" select="0"/>
       
     9   </xsl:template>
       
    10   <xsl:variable name="project">
     6   <xsl:variable name="project">
    11     <xsl:copy-of select="document('project')/project/*"/>
     7     <xsl:copy-of select="document('project')/project/*"/>
    12   </xsl:variable>
     8   </xsl:variable>
    13   <xsl:variable name="stdlib">
     9   <xsl:variable name="stdlib">
    14     <xsl:copy-of select="document('stdlib')/stdlib/*"/>
    10     <xsl:copy-of select="document('stdlib')/stdlib/*"/>
    15   </xsl:variable>
    11   </xsl:variable>
    16   <xsl:variable name="extensions">
    12   <xsl:variable name="extensions">
    17     <xsl:copy-of select="document('extensions')/extensions/*"/>
    13     <xsl:copy-of select="document('extensions')/extensions/*"/>
    18   </xsl:variable>
    14   </xsl:variable>
    19   <xsl:template match="ppx:configuration">
    15   <xsl:template match="ppx:configuration">
    20     <xsl:param name="_indent" select="0"/>
    16     <xsl:apply-templates select="ppx:globalVars"/>
    21     <xsl:apply-templates select="ppx:globalVars">
       
    22       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
    23     </xsl:apply-templates>
       
    24   </xsl:template>
    17   </xsl:template>
    25   <xsl:template match="ppx:resource">
    18   <xsl:template match="ppx:resource">
    26     <xsl:param name="_indent" select="0"/>
    19     <xsl:apply-templates select="ppx:globalVars"/>
    27     <xsl:apply-templates select="ppx:globalVars">
       
    28       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
    29     </xsl:apply-templates>
       
    30   </xsl:template>
    20   </xsl:template>
    31   <xsl:template match="ppx:pou">
    21   <xsl:template match="ppx:pou">
    32     <xsl:param name="_indent" select="0"/>
    22     <xsl:apply-templates select="ppx:interface/*"/>
    33     <xsl:apply-templates select="ppx:interface/*">
       
    34       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
    35     </xsl:apply-templates>
       
    36   </xsl:template>
    23   </xsl:template>
    37   <xsl:template match="ppx:returnType">
    24   <xsl:template match="ppx:returnType">
    38     <xsl:param name="_indent" select="0"/>
       
    39     <xsl:value-of select="ns:AddTree()"/>
    25     <xsl:value-of select="ns:AddTree()"/>
    40     <xsl:apply-templates mode="var_type" select=".">
    26     <xsl:apply-templates mode="var_type" select="."/>
    41       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
    42     </xsl:apply-templates>
       
    43   </xsl:template>
    27   </xsl:template>
    44   <xsl:template name="variables_infos">
    28   <xsl:template name="variables_infos">
    45     <xsl:param name="_indent" select="0"/>
       
    46     <xsl:param name="var_class"/>
    29     <xsl:param name="var_class"/>
    47     <xsl:variable name="var_option">
    30     <xsl:variable name="var_option">
    48       <xsl:choose>
    31       <xsl:choose>
    49         <xsl:when test="@constant='true' or @constant='1'">
    32         <xsl:when test="@constant='true' or @constant='1'">
    50           <xsl:text>Constant</xsl:text>
    33           <xsl:text>Constant</xsl:text>
    57         </xsl:when>
    40         </xsl:when>
    58       </xsl:choose>
    41       </xsl:choose>
    59     </xsl:variable>
    42     </xsl:variable>
    60     <xsl:for-each select="ppx:variable">
    43     <xsl:for-each select="ppx:variable">
    61       <xsl:variable name="initial_value">
    44       <xsl:variable name="initial_value">
    62         <xsl:apply-templates select="ppx:initialValue">
    45         <xsl:apply-templates select="ppx:initialValue"/>
    63           <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
    64         </xsl:apply-templates>
       
    65       </xsl:variable>
    46       </xsl:variable>
    66       <xsl:variable name="edit">
    47       <xsl:variable name="edit">
    67         <xsl:choose>
    48         <xsl:choose>
    68           <xsl:when test="$var_class='Global' or $var_class='External'">
    49           <xsl:when test="$var_class='Global' or $var_class='External'">
    69             <xsl:text>true</xsl:text>
    50             <xsl:text>true</xsl:text>
    70           </xsl:when>
    51           </xsl:when>
    71           <xsl:otherwise>
    52           <xsl:otherwise>
    72             <xsl:apply-templates mode="var_edit" select="ppx:type">
    53             <xsl:apply-templates mode="var_edit" select="ppx:type"/>
    73               <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
    74             </xsl:apply-templates>
       
    75           </xsl:otherwise>
    54           </xsl:otherwise>
    76         </xsl:choose>
    55         </xsl:choose>
    77       </xsl:variable>
    56       </xsl:variable>
    78       <xsl:value-of select="ns:AddTree()"/>
    57       <xsl:value-of select="ns:AddTree()"/>
    79       <xsl:apply-templates mode="var_type" select="ppx:type">
    58       <xsl:apply-templates mode="var_type" select="ppx:type"/>
    80         <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
    81       </xsl:apply-templates>
       
    82       <xsl:value-of select="ns:AddVariable(@name, $var_class, $var_option, @address, $initial_value, $edit, ppx:documentation/xhtml:p/text())"/>
    59       <xsl:value-of select="ns:AddVariable(@name, $var_class, $var_option, @address, $initial_value, $edit, ppx:documentation/xhtml:p/text())"/>
    83     </xsl:for-each>
    60     </xsl:for-each>
    84   </xsl:template>
    61   </xsl:template>
    85   <xsl:template match="ppx:localVars">
    62   <xsl:template match="ppx:localVars">
    86     <xsl:param name="_indent" select="0"/>
       
    87     <xsl:call-template name="variables_infos">
    63     <xsl:call-template name="variables_infos">
    88       <xsl:with-param name="var_class">
    64       <xsl:with-param name="var_class">
    89         <xsl:text>Local</xsl:text>
    65         <xsl:text>Local</xsl:text>
    90       </xsl:with-param>
    66       </xsl:with-param>
    91     </xsl:call-template>
    67     </xsl:call-template>
    92   </xsl:template>
    68   </xsl:template>
    93   <xsl:template match="ppx:globalVars">
    69   <xsl:template match="ppx:globalVars">
    94     <xsl:param name="_indent" select="0"/>
       
    95     <xsl:call-template name="variables_infos">
    70     <xsl:call-template name="variables_infos">
    96       <xsl:with-param name="var_class">
    71       <xsl:with-param name="var_class">
    97         <xsl:text>Global</xsl:text>
    72         <xsl:text>Global</xsl:text>
    98       </xsl:with-param>
    73       </xsl:with-param>
    99     </xsl:call-template>
    74     </xsl:call-template>
   100   </xsl:template>
    75   </xsl:template>
   101   <xsl:template match="ppx:externalVars">
    76   <xsl:template match="ppx:externalVars">
   102     <xsl:param name="_indent" select="0"/>
       
   103     <xsl:call-template name="variables_infos">
    77     <xsl:call-template name="variables_infos">
   104       <xsl:with-param name="var_class">
    78       <xsl:with-param name="var_class">
   105         <xsl:text>External</xsl:text>
    79         <xsl:text>External</xsl:text>
   106       </xsl:with-param>
    80       </xsl:with-param>
   107     </xsl:call-template>
    81     </xsl:call-template>
   108   </xsl:template>
    82   </xsl:template>
   109   <xsl:template match="ppx:tempVars">
    83   <xsl:template match="ppx:tempVars">
   110     <xsl:param name="_indent" select="0"/>
       
   111     <xsl:call-template name="variables_infos">
    84     <xsl:call-template name="variables_infos">
   112       <xsl:with-param name="var_class">
    85       <xsl:with-param name="var_class">
   113         <xsl:text>Temp</xsl:text>
    86         <xsl:text>Temp</xsl:text>
   114       </xsl:with-param>
    87       </xsl:with-param>
   115     </xsl:call-template>
    88     </xsl:call-template>
   116   </xsl:template>
    89   </xsl:template>
   117   <xsl:template match="ppx:inputVars">
    90   <xsl:template match="ppx:inputVars">
   118     <xsl:param name="_indent" select="0"/>
       
   119     <xsl:call-template name="variables_infos">
    91     <xsl:call-template name="variables_infos">
   120       <xsl:with-param name="var_class">
    92       <xsl:with-param name="var_class">
   121         <xsl:text>Input</xsl:text>
    93         <xsl:text>Input</xsl:text>
   122       </xsl:with-param>
    94       </xsl:with-param>
   123     </xsl:call-template>
    95     </xsl:call-template>
   124   </xsl:template>
    96   </xsl:template>
   125   <xsl:template match="ppx:outputVars">
    97   <xsl:template match="ppx:outputVars">
   126     <xsl:param name="_indent" select="0"/>
       
   127     <xsl:call-template name="variables_infos">
    98     <xsl:call-template name="variables_infos">
   128       <xsl:with-param name="var_class">
    99       <xsl:with-param name="var_class">
   129         <xsl:text>Output</xsl:text>
   100         <xsl:text>Output</xsl:text>
   130       </xsl:with-param>
   101       </xsl:with-param>
   131     </xsl:call-template>
   102     </xsl:call-template>
   132   </xsl:template>
   103   </xsl:template>
   133   <xsl:template match="ppx:inOutVars">
   104   <xsl:template match="ppx:inOutVars">
   134     <xsl:param name="_indent" select="0"/>
       
   135     <xsl:call-template name="variables_infos">
   105     <xsl:call-template name="variables_infos">
   136       <xsl:with-param name="var_class">
   106       <xsl:with-param name="var_class">
   137         <xsl:text>InOut</xsl:text>
   107         <xsl:text>InOut</xsl:text>
   138       </xsl:with-param>
   108       </xsl:with-param>
   139     </xsl:call-template>
   109     </xsl:call-template>
   140   </xsl:template>
   110   </xsl:template>
   141   <xsl:template mode="var_type" match="ppx:pou">
   111   <xsl:template mode="var_type" match="ppx:pou">
   142     <xsl:param name="_indent" select="0"/>
   112     <xsl:apply-templates mode="var_type" select="ppx:interface/*[self::ppx:inputVars or self::ppx:inOutVars or self::ppx:outputVars]/ppx:variable"/>
   143     <xsl:apply-templates mode="var_type" select="ppx:interface/*[self::ppx:inputVars or self::ppx:inOutVars or self::ppx:outputVars]/ppx:variable">
       
   144       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   145     </xsl:apply-templates>
       
   146   </xsl:template>
   113   </xsl:template>
   147   <xsl:template mode="var_type" match="ppx:variable">
   114   <xsl:template mode="var_type" match="ppx:variable">
   148     <xsl:param name="_indent" select="0"/>
       
   149     <xsl:variable name="name">
   115     <xsl:variable name="name">
   150       <xsl:value-of select="@name"/>
   116       <xsl:value-of select="@name"/>
   151     </xsl:variable>
   117     </xsl:variable>
   152     <xsl:value-of select="ns:AddTree()"/>
   118     <xsl:value-of select="ns:AddTree()"/>
   153     <xsl:apply-templates mode="var_type" select="ppx:type">
   119     <xsl:apply-templates mode="var_type" select="ppx:type"/>
   154       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   155     </xsl:apply-templates>
       
   156     <xsl:value-of select="ns:AddVarToTree($name)"/>
   120     <xsl:value-of select="ns:AddVarToTree($name)"/>
   157   </xsl:template>
   121   </xsl:template>
   158   <xsl:template mode="var_type" match="ppx:dataType">
   122   <xsl:template mode="var_type" match="ppx:dataType">
   159     <xsl:param name="_indent" select="0"/>
   123     <xsl:apply-templates mode="var_type" select="ppx:baseType"/>
   160     <xsl:apply-templates mode="var_type" select="ppx:baseType">
       
   161       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   162     </xsl:apply-templates>
       
   163   </xsl:template>
   124   </xsl:template>
   164   <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:struct">
   125   <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:struct">
   165     <xsl:param name="_indent" select="0"/>
   126     <xsl:apply-templates mode="var_type" select="ppx:variable"/>
   166     <xsl:apply-templates mode="var_type" select="ppx:variable">
       
   167       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   168     </xsl:apply-templates>
       
   169   </xsl:template>
   127   </xsl:template>
   170   <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived">
   128   <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived">
   171     <xsl:param name="_indent" select="0"/>
       
   172     <xsl:variable name="type_name">
   129     <xsl:variable name="type_name">
   173       <xsl:value-of select="@name"/>
   130       <xsl:value-of select="@name"/>
   174     </xsl:variable>
   131     </xsl:variable>
   175     <xsl:choose>
   132     <xsl:choose>
   176       <xsl:when test="$tree='True'">
   133       <xsl:when test="$tree='True'">
   177         <xsl:apply-templates mode="var_type" select="exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |&#10;                         exsl:node-set($project)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] |&#10;                         exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |&#10;                         exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] |&#10;                         exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |&#10;                         exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]">
   134         <xsl:apply-templates mode="var_type" select="exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |&#10;                         exsl:node-set($project)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] |&#10;                         exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |&#10;                         exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] |&#10;                         exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |&#10;                         exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]"/>
   178           <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   179         </xsl:apply-templates>
       
   180       </xsl:when>
   135       </xsl:when>
   181     </xsl:choose>
   136     </xsl:choose>
   182     <xsl:value-of select="ns:SetType($type_name)"/>
   137     <xsl:value-of select="ns:SetType($type_name)"/>
   183   </xsl:template>
   138   </xsl:template>
   184   <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:array">
   139   <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:array">
   185     <xsl:param name="_indent" select="0"/>
   140     <xsl:apply-templates mode="var_type" select="ppx:baseType"/>
   186     <xsl:apply-templates mode="var_type" select="ppx:baseType">
       
   187       <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   188     </xsl:apply-templates>
       
   189     <xsl:for-each select="ppx:dimension">
   141     <xsl:for-each select="ppx:dimension">
   190       <xsl:variable name="lower">
   142       <xsl:variable name="lower">
   191         <xsl:value-of select="@lower"/>
   143         <xsl:value-of select="@lower"/>
   192       </xsl:variable>
   144       </xsl:variable>
   193       <xsl:variable name="upper">
   145       <xsl:variable name="upper">
   195       </xsl:variable>
   147       </xsl:variable>
   196       <xsl:value-of select="ns:AddDimension($lower, $upper)"/>
   148       <xsl:value-of select="ns:AddDimension($lower, $upper)"/>
   197     </xsl:for-each>
   149     </xsl:for-each>
   198   </xsl:template>
   150   </xsl:template>
   199   <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:string">
   151   <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:string">
   200     <xsl:param name="_indent" select="0"/>
       
   201     <xsl:variable name="name">
   152     <xsl:variable name="name">
   202       <xsl:text>STRING</xsl:text>
   153       <xsl:text>STRING</xsl:text>
   203     </xsl:variable>
   154     </xsl:variable>
   204     <xsl:value-of select="ns:SetType($name)"/>
   155     <xsl:value-of select="ns:SetType($name)"/>
   205   </xsl:template>
   156   </xsl:template>
   206   <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:wstring">
   157   <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:wstring">
   207     <xsl:param name="_indent" select="0"/>
       
   208     <xsl:variable name="name">
   158     <xsl:variable name="name">
   209       <xsl:text>WSTRING</xsl:text>
   159       <xsl:text>WSTRING</xsl:text>
   210     </xsl:variable>
   160     </xsl:variable>
   211     <xsl:value-of select="ns:SetType($name)"/>
   161     <xsl:value-of select="ns:SetType($name)"/>
   212   </xsl:template>
   162   </xsl:template>
   213   <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*">
   163   <xsl:template mode="var_type" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*">
   214     <xsl:param name="_indent" select="0"/>
       
   215     <xsl:variable name="name">
   164     <xsl:variable name="name">
   216       <xsl:value-of select="local-name()"/>
   165       <xsl:value-of select="local-name()"/>
   217     </xsl:variable>
   166     </xsl:variable>
   218     <xsl:value-of select="ns:SetType($name)"/>
   167     <xsl:value-of select="ns:SetType($name)"/>
   219   </xsl:template>
   168   </xsl:template>
   220   <xsl:template mode="var_edit" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived">
   169   <xsl:template mode="var_edit" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived">
   221     <xsl:param name="_indent" select="0"/>
       
   222     <xsl:variable name="type_name">
   170     <xsl:variable name="type_name">
   223       <xsl:value-of select="@name"/>
   171       <xsl:value-of select="@name"/>
   224     </xsl:variable>
   172     </xsl:variable>
   225     <xsl:variable name="pou_infos">
   173     <xsl:variable name="pou_infos">
   226       <xsl:copy-of select="exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |&#10;                    exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |&#10;                    exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name]"/>
   174       <xsl:copy-of select="exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |&#10;                    exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |&#10;                    exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name]"/>
   233         <xsl:text>true</xsl:text>
   181         <xsl:text>true</xsl:text>
   234       </xsl:otherwise>
   182       </xsl:otherwise>
   235     </xsl:choose>
   183     </xsl:choose>
   236   </xsl:template>
   184   </xsl:template>
   237   <xsl:template mode="var_edit" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*">
   185   <xsl:template mode="var_edit" match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*">
   238     <xsl:param name="_indent" select="0"/>
       
   239     <xsl:text>true</xsl:text>
   186     <xsl:text>true</xsl:text>
   240   </xsl:template>
   187   </xsl:template>
   241   <xsl:template match="ppx:value">
   188   <xsl:template match="ppx:value">
   242     <xsl:param name="_indent" select="0"/>
       
   243     <xsl:choose>
   189     <xsl:choose>
   244       <xsl:when test="@repetitionValue">
   190       <xsl:when test="@repetitionValue">
   245         <xsl:value-of select="@repetitionValue"/>
   191         <xsl:value-of select="@repetitionValue"/>
   246         <xsl:text>(</xsl:text>
   192         <xsl:text>(</xsl:text>
   247         <xsl:apply-templates>
   193         <xsl:apply-templates/>
   248           <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   249         </xsl:apply-templates>
       
   250         <xsl:text>)</xsl:text>
   194         <xsl:text>)</xsl:text>
   251       </xsl:when>
   195       </xsl:when>
   252       <xsl:when test="@member">
   196       <xsl:when test="@member">
   253         <xsl:value-of select="@member"/>
   197         <xsl:value-of select="@member"/>
   254         <xsl:text> := </xsl:text>
   198         <xsl:text> := </xsl:text>
   255         <xsl:apply-templates>
   199         <xsl:apply-templates/>
   256           <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   257         </xsl:apply-templates>
       
   258       </xsl:when>
   200       </xsl:when>
   259       <xsl:otherwise>
   201       <xsl:otherwise>
   260         <xsl:apply-templates>
   202         <xsl:apply-templates/>
   261           <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   262         </xsl:apply-templates>
       
   263       </xsl:otherwise>
   203       </xsl:otherwise>
   264     </xsl:choose>
   204     </xsl:choose>
   265   </xsl:template>
   205   </xsl:template>
   266   <xsl:template match="ppx:simpleValue">
   206   <xsl:template match="ppx:simpleValue">
   267     <xsl:param name="_indent" select="0"/>
       
   268     <xsl:value-of select="@value"/>
   207     <xsl:value-of select="@value"/>
   269   </xsl:template>
   208   </xsl:template>
   270   <xsl:template name="complex_type_value">
   209   <xsl:template name="complex_type_value">
   271     <xsl:param name="_indent" select="0"/>
       
   272     <xsl:param name="start_bracket"/>
   210     <xsl:param name="start_bracket"/>
   273     <xsl:param name="end_bracket"/>
   211     <xsl:param name="end_bracket"/>
   274     <xsl:value-of select="$start_bracket"/>
   212     <xsl:value-of select="$start_bracket"/>
   275     <xsl:for-each select="ppx:value">
   213     <xsl:for-each select="ppx:value">
   276       <xsl:apply-templates select=".">
   214       <xsl:apply-templates select="."/>
   277         <xsl:with-param name="_indent" select="$_indent + (1) * $autoindent"/>
       
   278       </xsl:apply-templates>
       
   279       <xsl:choose>
   215       <xsl:choose>
   280         <xsl:when test="position()!=last()">
   216         <xsl:when test="position()!=last()">
   281           <xsl:text>, </xsl:text>
   217           <xsl:text>, </xsl:text>
   282         </xsl:when>
   218         </xsl:when>
   283       </xsl:choose>
   219       </xsl:choose>
   284     </xsl:for-each>
   220     </xsl:for-each>
   285     <xsl:value-of select="$end_bracket"/>
   221     <xsl:value-of select="$end_bracket"/>
   286   </xsl:template>
   222   </xsl:template>
   287   <xsl:template match="ppx:arrayValue">
   223   <xsl:template match="ppx:arrayValue">
   288     <xsl:param name="_indent" select="0"/>
       
   289     <xsl:call-template name="complex_type_value">
   224     <xsl:call-template name="complex_type_value">
   290       <xsl:with-param name="start_bracket">
   225       <xsl:with-param name="start_bracket">
   291         <xsl:text>[</xsl:text>
   226         <xsl:text>[</xsl:text>
   292       </xsl:with-param>
   227       </xsl:with-param>
   293       <xsl:with-param name="end_bracket">
   228       <xsl:with-param name="end_bracket">
   294         <xsl:text>]</xsl:text>
   229         <xsl:text>]</xsl:text>
   295       </xsl:with-param>
   230       </xsl:with-param>
   296     </xsl:call-template>
   231     </xsl:call-template>
   297   </xsl:template>
   232   </xsl:template>
   298   <xsl:template match="ppx:structValue">
   233   <xsl:template match="ppx:structValue">
   299     <xsl:param name="_indent" select="0"/>
       
   300     <xsl:call-template name="complex_type_value">
   234     <xsl:call-template name="complex_type_value">
   301       <xsl:with-param name="start_bracket">
   235       <xsl:with-param name="start_bracket">
   302         <xsl:text>(</xsl:text>
   236         <xsl:text>(</xsl:text>
   303       </xsl:with-param>
   237       </xsl:with-param>
   304       <xsl:with-param name="end_bracket">
   238       <xsl:with-param name="end_bracket">