- From: MW <onlymails@gmx.net>
- Date: Thu, 06 Mar 2003 17:07:44 +0100
- To: public-qt-comments@w3.org
Hi! I have another shorter and correct TREE-Q1: define function toc($book as element) as element* { for $section in $book/section return <section> { $section/@* , $section/title , toc($section) } </section> } <toc> { toc(document("book.xml")/book) } </toc> ----------------------------------------------------- Furthermore you can express TREE-Q6 similarly as: define function toc($book as element) as element* { for $section in $book/section return <section> { $section/@* , $section/title } <figcount> { count($section/figure) } </figcount> { toc($section) } </section> } <toc> { toc(document("book.xml")/book) } </toc> Michael
Received on Thursday, 6 March 2003 11:07:52 UTC