Example. Forester 4.2 › New query language › Unions and intersections of families of queries › Querying the bibliography of a given tree [00X3]
We can define a macro to compute the bibliography of a given tree, making use of \query/transclusion-coslice from Example [00X4].
\def\query/bibliography[x]{
\open\query
\isect{
\union-fam-rel{\transclusion-coslice{\x}}{\edges}{\outgoing}{\rel/links}
}{
\taxon{Reference}
}
}The above code first accumulates all the outgoing links from the given tree and any of its children, and then restricts (by intersection) to those with taxon reference.