When the db library is /dbLib/ { set db [__db] Wish the web server handles route "/statements" with handler { set l [list] # You need to use the Simple form so it doesn't auto-claimize it. set results [QuerySimple! false /...terms/] foreach result $results { dict with result { set childMatchRefs [$dbLib childMatches $db $__ref] set childMatchInfo [join [lmap childMatchRef $childMatchRefs { set childStatementRefs [$dbLib childStatements $db $childMatchRef] subst { \[ $childMatchRef ($childStatementRefs) \] } }] " "] lappend l [subst {
  • $__ref ([$dbLib statementParentCount $db $__ref]): [htmlEscape [string range $terms 0 100]] ($childMatchInfo)
    [htmlEscape $terms]
  • }] } } html [subst { Statements

    Statements

    }] } }