The query to achieve this is given in . The interesting point is the fact that the presentation table is specified declaratively, its cells are populated by sub queries retrieving the desired data from the source document.
Query to retrieve a parameter set as a table
|st.table|(*hook:=this) // create the table
// keep hook in variable
{ |st.title|node{*hook._GID | *hook.GID}, // make Title
|st.cols|node // define columns
{ |st.col, @width:="4cm"|node,
|st.col, @width:="2cm"|node,
|st.col, @width:="1.5cm"|node,
|st.col, @width:="1.5cm"|node,
|st.col, @width:="1.5cm"|node,
|st.col, @width:="1.5cm"|node,
|st.col, @width:="1.5cm"|node,
|st.col, @width:="2cm"|node,
|st.col, @width:="1.5cm"|node },
|st.thead|node // Table head
{ |st.row|node
{|st.entry|node{"Bezeichnung"},
|st.entry|node{"Kürzel"},
|st.entry|node{"Min."},
|st.entry|node{"Typ."},
|st.entry|node{"Max."},
|st.entry|node{"Abs."},
|st.entry|node{"Tol."},
|st.entry|node{"Einheit"},
|st.entry|node{"Hinw."}
}
},
|st.tbody|*hook // Table body, hooked to parameter-table
{ |st.row|child .child[?prm-char] // a table row for each prm-char
{(*curent:=this).null // save actual prm-char in variable
|st.entry, // an entry for title
@hjust:="l"|node{(*current.parent.child[?long-name].contents //use cousin long-name
| // or
*current.parent.gid), // or GID of table element
|q.pb|that.child[?cond] .contents // add cond
{" - ",contents}},
|st.entry|node{*current.left[?short-name].contents}, // an entry for short-name
(|st.entry, // spanned entry for text
@w:="9cm",@hjust:="l", @hspan:=6|child[?text]{contents}
| // or individual entries for
(|st.entry|node{that.child[?min].contents}, // min
|st.entry|node{that.child[?typ].contents}, // typ
|st.entry|node{that.child[?max].contents}, // max
|st.entry|node{that.child[?abs].contents}, // abs
|st.entry|node{that.child[?tol].contents}, // tol
|st.entry|node{that.child[?unit].contents} // unit
)
),
|st.entry|node // entry for remark
{ that.child[?remark] .(count(parent.parent // number counter for remark
.left.child[?prm-char] // count grand cousins
.child[?remark] //
,parent .left[?prm-char] // and cousins
.child[?remark] )+1||"." ) |null // leave cell blank if
// there is no remark
}
}
}
}