plcopen/instance_tagname.ysl2
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Thu, 19 Jan 2017 13:56:09 +0300
changeset 1639 1953c268a194
parent 1351 a546a63ce1bf
child 1936 b85b13b1c2ec
permissions -rw-r--r--
for tests svgui and logging move code from old py_ext.xml to the new pyfile.xml
1351
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
     1
include yslt.yml2
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
     2
estylesheet xmlns:ppx="http://www.plcopen.org/xml/tc6_0201"
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
     3
            xmlns:xhtml="http://www.w3.org/1999/xhtml"
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
     4
            xmlns:ns="instance_tagname_ns" 
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
     5
            extension-element-prefixes="ns" 
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
     6
            exclude-result-prefixes="ns" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
     7
    
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
     8
    param "instance_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
     9
    
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    10
    variable "project" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    11
        copy "document('project')/project/*";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    12
    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    13
    
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    14
    variable "stdlib" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    15
        copy "document('stdlib')/stdlib/*";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    16
    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    17
    variable "extensions" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    18
        copy "document('extensions')/extensions/*";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    19
    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    20
    
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    21
    function "element_name" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    22
        param "path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    23
        choose {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    24
            when "contains($path,'.')" > «substring-before($path,'.')»
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    25
            otherwise > «$path»
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    26
        }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    27
    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    28
    
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    29
    function "next_path" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    30
        param "path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    31
        choose {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    32
            when "contains($path,'.')" > «substring-after($path,'.')»
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    33
        }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    34
    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    35
    
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    36
    template "ppx:project" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    37
        variable "config_name" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    38
            call "element_name" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    39
                with "path", "$instance_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    40
            }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    41
        }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    42
        apply "ppx:instances/ppx:configurations/ppx:configuration[@name=$config_name]" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    43
            with "element_path" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    44
                call "next_path" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    45
                    with "path", "$instance_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    46
                }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    47
            }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    48
        }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    49
    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    50
    
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    51
    template "ppx:configuration" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    52
        param "element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    53
        choose {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    54
            when "$element_path!=''" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    55
                variable "child_name" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    56
                    call "element_name" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    57
                        with "path", "$element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    58
                    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    59
                }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    60
                apply "ppx:resource[@name=$child_name] | ppx:globalVars/ppx:variable[@name=$child_name]/ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    61
                    with "element_path" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    62
                        call "next_path" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    63
                            with "path", "$element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    64
                        }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    65
                    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    66
                }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    67
            }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    68
            otherwise {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    69
                value "ns:ConfigTagName(@name)";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    70
            }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    71
        }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    72
    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    73
    
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    74
    template "ppx:resource" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    75
        param "element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    76
        choose {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    77
            when "$element_path!=''" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    78
                variable "child_name" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    79
                    call "element_name" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    80
                        with "path" > «$element_path»
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    81
                    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    82
                }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    83
                apply "ppx:pouInstance[@name=$child_name] | ppx:task/ppx:pouInstance[@name=$child_name] | ppx:globalVars/ppx:variable[@name=$child_name]/ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    84
                    with "element_path" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    85
                        call "next_path" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    86
                            with "path", "$element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    87
                        }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    88
                    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    89
                }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    90
            }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    91
            otherwise {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    92
                value "ns:ResourceTagName(ancestor::ppx:configuration/@name, @name)";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    93
            }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    94
        }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    95
    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    96
    
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    97
    template "ppx:pouInstance" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    98
        param "element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
    99
        variable "type_name" > «@typeName»
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   100
        apply """exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   101
                 exsl:node-set($project)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] |
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   102
                 exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   103
                 exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] |
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   104
                 exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   105
                 exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]""" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   106
            with "element_path", "$element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   107
        }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   108
    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   109
    
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   110
    template "ppx:pou" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   111
        param "element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   112
        choose {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   113
            when "$element_path!=''" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   114
                variable "child_name" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   115
                    call "element_name" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   116
                        with "path", "$element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   117
                    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   118
                }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   119
                apply "ppx:interface/*/ppx:variable[@name=$child_name]/ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   120
                    with "element_path" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   121
                        call "next_path" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   122
                            with "path", "$element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   123
                        }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   124
                    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   125
                }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   126
                apply "ppx:actions/ppx:action[@name=$child_name] | ppx:transitions/ppx:transition[@name=$child_name]";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   127
            }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   128
            otherwise {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   129
                variable "name" > «@name»
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   130
                value "ns:PouTagName($name)";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   131
            }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   132
        }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   133
    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   134
    
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   135
    template "ppx:action" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   136
        value "ns:ActionTagName(ancestor::ppx:pou/@name, @name)";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   137
    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   138
    
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   139
    template "ppx:transition" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   140
        value "ns:TransitionTagName(ancestor::ppx:pou/@name, @name)";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   141
    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   142
    
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   143
    template "ppx:dataType" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   144
        param "element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   145
        apply "ppx:baseType/*[self::ppx:derived or self::ppx:struct or self::ppx:array]" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   146
            with "element_path", "$element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   147
        }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   148
    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   149
    
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   150
    template "ppx:derived" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   151
        param "element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   152
        variable "type_name" > «@name»
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   153
        apply """exsl:node-set($project)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   154
                 exsl:node-set($project)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] |
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   155
                 exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   156
                 exsl:node-set($stdlib)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name] |
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   157
                 exsl:node-set($extensions)/ppx:project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] |
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   158
                 exsl:node-set($extensions)/ppx:project/ppx:types/ppx:dataTypes/ppx:dataType[@name=$type_name]""" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   159
            with "element_path", "$element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   160
        }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   161
    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   162
    
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   163
    template "ppx:array" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   164
        param "element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   165
        apply "ppx:baseType/*[self::ppx:derived or self::ppx:struct or self::ppx:array]" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   166
            with "element_path", "$element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   167
        }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   168
    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   169
    
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   170
    template "ppx:struct" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   171
        param "element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   172
        variable "child_name" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   173
            call "element_name" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   174
                with "path", "$element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   175
            }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   176
        }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   177
        apply "ppx:variable[@name=$child_name]/ppx:type/*[self::ppx:derived or self::ppx:struct or self::ppx:array]" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   178
            with "element_path" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   179
                call "next_path" {
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   180
                    with "path", "$element_path";
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   181
                }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   182
            }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   183
        }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   184
    }
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   185
    
a546a63ce1bf Fixed pou tagname of instance path computing stylesheet
Laurent Bessard
parents:
diff changeset
   186
}