Re: [Use cases] More issues

some more issues:

- use case TREE:Q6 has been erroneously modified wrt the previous version
   this results in an infinite recursion

new version:
declare function local:section-summary($book-or-section as element())
   as element()*
{
   for $section in $book-or-section
   return
     <section>
        { $section/@* }
        { $section/title }
        <figcount>
          { count($section/figure) }
        </figcount>
        { local:section-summary($section) }
     </section>
};

<toc>
   {
     for $s in doc("book.xml")/book/section
     return local:section-summary($s)
   }
</toc>


Since $book-or-section is a single element, the 'for $section in' is
actually not a loop, thus calling local:section-summary($section)
is a recursive loop.

The former version was correct.

-- 
Xavier FRANC

Received on Saturday, 11 October 2003 11:57:20 UTC