Stylesheet used to list EtherCat dictionnary entries.
Copyright (C) 2011-2014: Laurent BESSARD
Distributed under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
See COPYING file for copyrights details.
estylesheet xmlns:ns="entries_list_ns"
extension-element-prefixes="ns"
exclude-result-prefixes="ns" {
apply "Profile/Dictionary/Objects/Object";
call "pdo_entries" with "direction", "'Receive'";
call "pdo_entries" with "direction", "'Transmit'";
variable "index" > «ns:HexDecValue(Index/text())»
variable "entry_name" > «ns:EntryName(Name)»
when "$index >= $min_index and $index <= $max_index" {
variable "datatype_name" > «Type/text()»
variable "default_value" > «Info/DefaultData/text()»
when "ancestor::Dictionary/child::DataTypes/DataType[Name/text()=$datatype_name][SubItem]" {
apply "ancestor::Dictionary/child::DataTypes/DataType[Name/text()=$datatype_name][SubItem]" {
with "entry_name" > «$entry_name»
with "sub_default_value" > «Info/SubItem/Info/DefaultData/text()»
variable "sub_entry_flag" > 0
> «ns:AddEntry($index, $subindex, $entry_name, $datatype_name, BitSize/text(), Flags/Access/text(), Flags/PdoMapping/text(), $default_value, $sub_entry_flag)»
param "sub_default_value"
variable "subindex" > «ns:HexDecValue(SubIdx/text())»
variable "subentry_name" > «$entry_name» - «ns:EntryName(DisplayName, Name/text())»
variable "sub_entry_flag" > 1
> «ns:AddEntry($index, $subindex, $subentry_name, Type/text(), BitSize/text(), Flags/Access/text(), Flags/PdoMapping/text(), $sub_default_value, $sub_entry_flag)»
variable "pdo_index" > «ns:HexDecValue(Index/text())»
variable "pdo_name" > «ns:EntryName(Name)»
variable "index" > «ns:HexDecValue(Index/text())»
when "$index >= $min_index and $index <= $max_index" {
variable "subindex" > «ns:HexDecValue(SubIndex/text())»
variable "subentry_name" > «ns:EntryName(Name)»
when "$direction='Transmit'" > ro
when "$direction='Transmit'" > T
> «ns:AddEntry($index, $subindex, $subentry_name, DataType/text(), BitLen/text(), $access, $pdo_mapping, $pdo_index, $pdo_name, $direction)»