>From the XPathContext that should already be passed in, you can retrieve the current Configuration object, which has a buildDocument method you can use for this.

An example in-situ is on the last line of this file:
(in Scala, sorry, but that line would be the same in either language)


On Sat, Oct 23, 2010 at 9:35 AM, Max Toro <maxtoroq@gmail.com> wrote:
Hello Michael,
I have a suggestion. Right now there's no easy way to return new nodes
from an integrated extension function. To create nodes you need a
DocumentBuilder. What I'm currently doing is passing a DocumentBuilder
to the ExtensionFunctionDefinition constructor (when calling
Processor.RegisterExtensionFunction), which then passes it to the
ExtensionFunctionCall constructor and saves it in a field to use when
the function is called. But this seems like too much trouble to me,
and also means that all my applications that use that extension
function must be aware of this pattern. What do you think? Maybe you
could provide to the ExtensionFunctionCall class an instance of
Max Toro

Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
saxon-help mailing list archived at http://saxon.markmail.org/