W3C home > Mailing lists > Public > xproc-dev@w3.org > May 2009

Re: XProc questions from my students

From: mozer <xmlizer@gmail.com>
Date: Wed, 20 May 2009 12:01:46 +0200
Message-ID: <21d9ade60905200301j3f0f8b19q9d36dcd169756c61@mail.gmail.com>
To: "Costello, Roger L." <costello@mitre.org>
Cc: "xproc-dev@w3.org" <xproc-dev@w3.org>
Roger,

On Wed, May 20, 2009 at 12:17 AM, Costello, Roger L. <costello@mitre.org> wrote:
>
> 3. Are transactions possible? That is, is it possible to specify "The following steps must complete in entirety. If that's not possible then the state should be as it was before the steps started."


It looks like you have to build it yourself

Probably with a try/catch
p:try {
  p:group {
     ... do your atomic stuff ...
     p:choose {
        p:when ($status = ok) {
          ... that's fine ...
        } p:otherwise {
         ... do rollback ...
        }
     }
  }
  p:catch {
    ... in case of error do rollback ...
  }
}

Xmlizer
Received on Wednesday, 20 May 2009 10:02:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 20 May 2009 10:02:22 GMT