qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qexo-general] Question on XQuery scripts compiled into java classes


From: Stefano Santoro
Subject: Re: [Qexo-general] Question on XQuery scripts compiled into java classes
Date: Thu, 25 Mar 2004 21:01:01 -0500 (EST)

Hi, 

after a bit of looking I came out with the following

import gnu.mapping.CallContext;
import gnu.xml.Printer

/* ... */

void xqSubjectFunctionCall() {

  XMLPrinter  xout = new XMLPrinter( System.out);

  samplet     smpl = samplet();
  CallContext ctx  = CallContext.getInstance();
  NotifReq    nr   = new NotifReq("address@hidden","address@hidden","hello", 
123);

  ctx.consumer = xout;
  ctx.setArgs( nr);

  smpl.apply( smpl.subject, ctx);

  xout.println();
  xout.flush();
}

This seem to work. Is there something else I should worry about? Like
proper cleanup, exception catching ...

Thnx
Stefano 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]