I'm sorry, I have no idea. I would have to do a lot of work to find out.
 
The change log for Saxon 6.3 states:
 
There is still a restriction that extension functions cannot construct a new DOM tree and return nodes from this tree by using DOM methods. They can only return existing nodes that were constructed by Saxon itself.
 
It's still best to exercise caution if you go beyond that, because if repeated calls to an extension function return the same DOM node, or different DOM nodes in the same document, you will end up with multiple distinct documents at the Saxon level, which can cause confiusion when doing operations such as "union" which eliminate duplicates by identity.
 
Michael Kay
http://www.saxonica.com/


From: Fernando Ribeiro [mailto:webmaster@fernandoribeiro.eti.br]
Sent: 14 October 2008 19:26
To: saxon-help@lists.sourceforge.net
Subject: [saxon] DOM Support in Saxon-B Extension Functions

All,
 
When was the support for returning DOM nodes from Java extension functions added to Saxon-B? I was trying to go through the change logs but failed to find that entry.
 
Thanks,
 
Fernando