Hi,
I'm writing a custom transformer which extends AbstractSaxTransformer
(which I think is irrelevant to my question).  I think my question is
geared more towards sax or perhaps xerces, but hopefully someone can
help...

    public void endTransformingElement( String uri, 
                                        String name, 
                                        String raw )
            throws ProcessingException, IOException, SAXException {
        if(XQUERY_TAG.equals(name)) {
            String xq = "<hello>ben</hello>";
            try {
                XMLReader parser = XMLReaderFactory.createXMLReader();
                parser.setContentHandler(this.contentHandler);
                parser.parse(new InputSource(new StringReader(xq)));

the problem is that when the parse method is run, the endDocument
method of the contentHandler is called, and I don't think it should
be?  I created another transformer to go after this one just to log
the events being called, which led me to this conclusion.  So, the
contentHandler's endDocument method is getting called twice... once in
the parse method, and once when it should be.  Does anyone know why
this is happening and how I might change it?

Thanks,
Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to