xml-xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <si...@ecnetwork.co.nz>
Subject extensions: creating nodes for return from custom extension elements
Date Tue, 08 Oct 2002 02:44:39 GMT
Hi All,

I need to write an extension element which returns a node with various
children, attributes, etc.

Does anyone know how I create nodes in my extension code? None of the
examples or standard Xalan extensions appear to do this, ie I can't find
any code to steal.

Normally, nodes are created via factory methods on the Document object
to which they are later going to be attached. However I can't see any
way to get at the Document object associated with the Result object to
which the results of the transformation are being written. 

Looking at the XSLProcessorContext.outputToResultTree method, it looks
like the nodes that are returned from the extension are actually
expected to reside in the source document (ie are cloned when output to
the result), but I can't see any way to create new nodes in the source
document either.

The ElemExtensionCall object passed to the extension method inherits
from UnImplNode, which has a Node interface, but whose methods (like
getOwnerDocument) are not very useful :-).

I'm probably missing something very obvious....

Thanks,

Simon




Mime
View raw message