include yslt_noindent.yml2
istylesheet xmlns:ppx="http://www.plcopen.org/xml/tc6_0201"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
extension-element-prefixes="ns"
exclude-result-prefixes="ns" {
template "text()", mode="var_class";
template "text()", mode="var_type";
template "text()", mode="var_edit";
template "text()", mode="var_debug";
variable "project", "ns:GetProject()";
variable "stdlib", "ns:GetStdLibs()";
variable "extensions", "ns:GetExtensions()";
variable "all_types", "($project | $stdlib | $extensions)/ppx:types";
value "ns:SetRoot($class, $type, $edit, $debug)";
with "class" > «@pouType»
apply "ppx:actions/ppx:action | ppx:transitions/ppx:transition", mode="variable_list";
apply "ancestor::ppx:pou/child::ppx:interface";
template "ppx:transition" {
with "class" > transition
apply "ancestor::ppx:pou/child::ppx:interface";
template "ppx:configuration" {
with "class" > configuration
apply "ppx:resource", mode="variable_list";
template "ppx:resource" {
apply "ppx:pouInstance | ppx:task/ppx:pouInstance", mode="variable_list";
function "variables_infos" {
apply "ppx:type", mode="var_class" {
with "default_class" > «$var_class»
apply"ppx:type", mode="var_type";
apply "ppx:type", mode="var_edit";
apply "ppx:type", mode="var_debug";
value "ns:AddVariable(@name, $class, $type, $edit, $debug)";
template "ppx:localVars" {
template "ppx:globalVars" {
with "var_class" > Global
template "ppx:externalVars" {
with "var_class" > External
template "ppx:tempVars" {
template "ppx:inputVars" {
template "ppx:outputVars" {
with "var_class" > Output
template "ppx:inOutVars" {
function "add_variable" {
value "ns:AddVariable($name, $class, $type, $edit, $debug)";
template "ppx:action", mode="variable_list" {
template "ppx:transition", mode="variable_list" {
with "class" > transition
template "ppx:resource", mode="variable_list" {
template "ppx:pouInstance", mode="variable_list" {
with "type" > «@typeName»
template "*[self::ppx:type or self::ppx:baseType]/*", mode="var_class" {
template "*[self::ppx:type or self::ppx:baseType]/ppx:derived", mode="var_class" {
variable "type_name", "@name";
variable "pou_infos", "$all_types/ppx:pous/ppx:pou[@name=$type_name]";
apply "$pou_infos", mode="var_class";
template "ppx:pou", mode="var_class" {
template "*[self::ppx:type or self::ppx:baseType]/*", mode="var_type" {
template "*[self::ppx:type or self::ppx:baseType]/ppx:derived", mode="var_type" {
template "*[self::ppx:type or self::ppx:baseType]/ppx:array", mode="var_type" {
foreach "ppx:dimension" {
apply "ppx:baseType", mode="var_type";
template "*[self::ppx:type or self::ppx:baseType]/ppx:string", mode="var_type" {
template "*[self::ppx:type or self::ppx:baseType]/ppx:wstring", mode="var_type" {
template "*[self::ppx:type or self::ppx:baseType]/*", mode="var_edit" {
template "*[self::ppx:type or self::ppx:baseType]/ppx:derived", mode="var_edit" {
variable "type_name", "@name";
variable "pou_infos", "$project/ppx:types/ppx:pous/ppx:pou[@name=$type_name]";
template "*[self::ppx:type or self::ppx:baseType]/ppx:array", mode="var_edit" {
apply "ppx:baseType", mode="var_edit";
template "*[self::ppx:type or self::ppx:baseType]/*", mode="var_debug" {
template "*[self::ppx:type or self::ppx:baseType]/ppx:derived", mode="var_debug" {
variable "type_name", "@name";
variable "datatype_infos", """ \
$project/ppx:types/ppx:pous/ppx:pou[@name=$type_name] | \
$all_types/ppx:dataTypes/ppx:dataType[@name=$type_name] \
apply "$datatype_infos", mode="var_debug";
template "ppx:pou", mode="var_debug" {
template "*[self::ppx:type or self::ppx:baseType]/ppx:array", mode="var_debug" {
template "*[self::ppx:type or self::ppx:baseType]/ppx:struct", mode="var_debug" {