- From: <bugzilla@wiggum.w3.org>
- Date: Tue, 16 Feb 2010 15:23:28 +0000
- To: public-qt-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=9026 Jonathan Robie <jonathan.robie@redhat.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #1 from Jonathan Robie <jonathan.robie@redhat.com> 2010-02-16 15:23:28 --- I have also run into cases that are significantly harder to solve without the ability to return values and updates together. I recently converted a large number of Wiki pages to DocBook. Originally, I attempted to solve this by starting with an index page and creating a tree, keeping track of modes that have been visited. This seemed like the most straightforward approach - but the following query is not allowed because it hits the restriction against returning updates and values together: declare variable $prefix := "/home/jrobie/project/qpid/doc/confluence/confluence-html-export/qpid-pruned/"; declare variable $visited := <visited/>; declare function local:filetree($s as xs:string, $depth) { if ($depth < 5) then <level depth="{$depth}"> <file>{ $s }</file> { let $relname := concat($prefix, $s) let $doc := doc($relname) for $href in $doc//@href where contains($href,"htm") and not(contains($href,"http")) and (every $url in $visited/url satisfies $url != $href) return ( insert node <url>{ $href }</url> into $visited, <newcall>{ local:filetree($href, $depth+1) }</newcall> ) } </level> else () }; local:filetree("Documentation.html", 1) -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Received on Tuesday, 16 February 2010 15:23:29 UTC