W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2010

[Bug 9026] Inability to combine expressions creating pending updates & values

From: <bugzilla@wiggum.w3.org>
Date: Tue, 16 Feb 2010 15:23:28 +0000
To: public-qt-comments@w3.org
Message-Id: <E1NhPGq-0000kE-GF@wiggum.w3.org>

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 :=
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> 
 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:29 UTC