list4xt : Mailing list for the XT users community.
[list4xt] Re: How do you set the XSLProcessor as a DocumentHand
Subject: [list4xt] Re: How do you set the XSLProcessor as a DocumentHand
From: Eric van der Vlist (vdv@dyomedea.com)
Date: 28/08/2000 - 11:18
Sebastian,
Sebastien Sahuc wrote:
>
> Eric,
>
> Thank for your prompt reply, but I'm still confused in how I can do that
> simply by setting the parser.
>
> Indeed after calling the setParser(), the only XML source you can feed
> the XSL processor with is through the method parse() which take an
> InputSource as argument. Which is not what I want. I would be more
> interested in getting back somehow the DocumentHandler instance on which
> I'll fire 'by hand' the SAX events (docHandler.startElement(...) ,
> etc...) . Does it make sense ?
After you've set the parser (through setParser), the class you'll have
installed will receive a call to its setDocumentHandler method and the
docHandler will be passed as a parameter.
Then it will receive a parse method call which will send the sax events
to the docHandler previously installed...
You have an example of this in the RSS 1.0 tools I have published of
4xt.
See:
/downloads/rss/text-to-10.txt
/downloads/rss/TextDriver.java
/downloads/rss/TextSAXParser.java
/downloads/rss/DefaultSAXParser.java
Hope this helps.
Eric
>
> Thanks,
>
> Sebastien
>
> >>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
>
> On 8/25/00, 6:28:41 PM, Eric van der Vlist <vdv@dyomedea.com> wrote
> regarding [list4xt] Re: How do you set the XSLProcessor as a DocumentHand:
>
> > Sebastien,
>
> > Sebastien Sahuc wrote:
> > >
> > > Hello,
> > >
> > > I wonder how do you set the XSLProcessorImpl as a DocumentHandler.
> > >
> > > Indeed I'm receiving SAX events from a SAX producer (Cocoon2 filter to be
> > > more precise), and I would like these SAX events to feed a XSLPRocessor
> > > instance. Am I asking the right question ? If so is it possible to do it
> > > simply.
>
> > If I understand your question correctly,
>
> > xsl.setParser((Parser)sourceParser, (Parser)sheetParser );
>
> > should do the trick.
>
> > The only thing to note is that Parser is a SAX1 parser and that if you
> > want to plug a SAX2 parser you should either use the compatibility class
> > provided with SAX2 or implement both SAX1 and SAX2 (AElfred2 is a good
> > example of such an implementation).
>
> > > In fact I'm trying to write an Filter for the cocoon2 project, and I know
> > > Eric to be on the cocoon list, would you help me ?
>
> > Of course !
> > (even if I wasn't on the cocoon list :)
>
> > > Thanks in advance,
>
> > Hope this helps.
>
> > Eric
>
> > > Sebastien
> > >
> > > --
> > > Mailing list for the XT users community. (http://greenthumbpaymentsolutions.com)
> > > (mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)
>
> > --
> > ------------------------------------------------------------------------
> > Eric van der Vlist Dyomedea http://superdavesgunshow.com
> > http://entrustmca.com - http://lakesidecityalliance.org http://psbill.com
> > ------------------------------------------------------------------------
>
> > --
> > Mailing list for the XT users community. (http://buildingforamerica.org)
> > (mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)
>
> --
> Mailing list for the XT users community. (http://nimsat.org)
> (mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)
--
------------------------------------------------------------------------
Eric van der Vlist Dyomedea http://ortonvillechamber.com
http://merchantaccountsreview.com - http://merchantservicesnj.com http://pittsburgkschamber.com
------------------------------------------------------------------------
--
Mailing list for the XT users community. (http://merchantaccounts.net)
(mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)
Archive générée par hypermail 2b28 le 06/11/2001 - 11:46 CET
webmaster@4xt.org
|