名前付き処理モードで生成されたフロー・オブジェクトは with-mode 式で参照することができます。with-mode 式の構文は次の通りです。
(with-mode mode-specification expression)
名前付き処理モードのフロー・オブジェクトを表示する場合、少なくとも起点となる一つのノードを無名処理モードのコンストラクション・ルールから参照しなければならない点に注意してください。
それでは、先程例7.6に示したtoc-mode のchapter を参照する例を挙げてみましょう。
例 7.7
(define (table-of-contents)
(make simple-page-sequence
page-width: 210mm
page-height: 297mm
...
(make paragraph
(literal "目次"))
(make display-group
(with-mode toc-mode
(process-matching-children "chapter")))))
(element book
(make sequence
(process-matching-children "title")
(table-of-contents)
(process-matching-children "chapter")))