This feature is still EXPERIMENTAL and
may change in the future!
Fold command may be used to
mark elements with a
xsh:fold attribute from the
listing the DOM tree using
ls --fold xpath,
elements marked in this
way are folded to a given depth (default is 0 = fold immediately).
may be used to specify the depth at which
subtrees of given elements are to be folded.
If called without arguments, the command applies to the current element, otherwise the expression is evaluated to the node-list and folding is applied to all elements within this node-list.
fold --depth 1 //chapterxsh>
ls --fold //chapter<chapter id="intro" xsh:fold="1"> <title>...</title> <para>...</para> <para>...</para> </chapter>