Hello,
I'm trying to write a Xalan extension function in Java that should return a DocumentFragment.
So far however I've been unable to figure out how to construct a DocumentFragment.
The only way I've found is Document.createDocumentFragment(), but how do I get a document?
This is the best shot so far:
[snip]
public Object toSVG( ExpressionContext context)
{
Object retval;try
{
Node node = context.getContextNode();
Document doc = node.getOwnerDocument();
DocumentFragment fragment = doc.createDocumentFragment();
}
catch( DOMException e)
{
String error = Integer.toString( e.code);
Debug.Msg( 10, "error: " + error);
retval = error;
}
return( retval); }
The result of this is that the createDocumentFragment throws a DOMException where e.code == 9.
I gather this means "Unimplemented".
_________________________________________________________________ MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl
