/* Prepare a (nested) table of contents for Book1, listing all the sections and their titles. Preserve the original attributes of each
element, if any. */ ( LET $s := document("book.xml") FILTER ( self::section OR self::title[parent::section] OR self::text()[ parent::title/parent::section ] ) RETURN $s )