Re: XProc questions from my students

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 UTC