You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by John Gentilin <ge...@eyecatching.com> on 2004/03/17 18:21:07 UTC

Bug in 2.6 fornested Extension Element Handling ??

I was checking the latest version of Xalan with my extension
element code and I ran across this bug, fairly sure it's not
mine but I though I would ask first.

In my extension element, I call executeChildTemplates and
if one of the Child Templates has an Extension Element, the
call fails with an NPE.

I have traced the bug to the following thread

ElemExtensionCall#execute, when it tries to flushPending()
   from the Result Tree Handler.

ToSaxHandler#flushPending, m_needToCallStartDocument
is true, and a call to startDocumentInternal is made.

ToSaxHandler#startDocumentInternal, m_saxHandler is null
so the call to startDocument fails with an NPE.


Below is the code I call after the execution of all my Extension
Elements since I support nested extension elements.

This is working fine with 2.5.2

Regards
John G

// Code derived from Redirect Extension
private void executeChildTemplates(
   XSLProcessorContext context, ElemExtensionCall elem )
     throws TransformerException
{
   TransformerImpl transf = context.getTransformer();
   transf.executeChildTemplates(elem,
	context.getContextNode(),
	context.getMode(), transf.getContentHandler());
}


-- 
--------------------------------------
John Gentilin
Eye Catching Solutions Inc.
18314 Carlwyn Drive
Castro Valley CA 94546

     Contact Info
gentijo@eyecatching.com
Ca Office 1-510-881-4821
NJ Office 1-732-422-4917