qexo-general
[Top][All Lists]
Advanced

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

Re: [Qexo-general] qexo as a pipe between two SAX ContentHandlers


From: Per Bothner
Subject: Re: [Qexo-general] qexo as a pipe between two SAX ContentHandlers
Date: Tue, 16 Mar 2004 08:33:27 -0800
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6) Gecko/20040113

Stefano Santoro wrote:

I'd like verify if these calling sequence makes sense when I
want to pipe in SAX Content Handler events into qexo, and have
qexo fire off ContentHandler events to another XML processor.

1. use ConsumeSAXHandler to build a ListTree

If you mean a TreeList, you should build a NodeTree (which extends
TreeList) instead.

That should probably work, though ConsumeSAXHandler hasn't been
tested much, and may be a bit incomplete.

2. pass in the ListTree via the XQuery define method
3. [ hopefully the ListTree is seen as node() type in my XQuery script ]

You should wrap the NodeTree in a KDocument or other KNode,
as in gnu.kawa.xml.Document.parse(Object).

4. Configure a ContentConsumer with the receiving ContentHandler
5. pass in a ContentConsumer in the call to XQuery's eval method

First question: would this work?

I think so.  It's supposed to ...

Second question: is there a better way of doing this?

Depends on what you're actual needs are.  If you have existin SAX
inputs and outputs, this is probably the best way to handle it.
--
        --Per Bothner
address@hidden   http://per.bothner.com/




reply via email to

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