It's not a bug in Xalan, it's a bug in your application and your understanding of XSLT.
You are not allowed to modify the source tree in any way, including
creating new nodes. The function you're calling is throwing an exception
which you're not catching. See the class XalanDOMException and the source
code for XalanSourceTreeDocument for more information on what's being
thrown.
Currently, there's no way in Xalan-C to create new nodes in an extension
function. We can certainly make something like that available, but it
wouldn't be through DOM APIs. Insteand, it would be through getting a SAX
handler and sending events. If this functionality is important to you,
then we should discuss the best way to implement this.
Dave
Edwin Pratomo
<[EMAIL PROTECTED] To:
[email protected]
.org> cc:
Sent by: Subject: createElement() inside
external function segfaults
[EMAIL PROTECTED]
m
12/11/2001 09:56
AM
Hi,
I tried to create new elements inside an external function, but
createElement() segfaults:
virtual XObjectPtr
execute(
XPathExecutionContext& executionContext,
XalanNode* context,
int /* opPos */,
const XObjectArgVectorType& args)
{
XalanDocument *doc = context->getOwnerDocument();
XalanElement *new_node = doc->createElement(XalanDOMString("foo"));
...
Is this a bug? any workaround?
rgds,
Edwin.
--
CPAN home: http://search.cpan.org/search?author=edpratomo
