CreateDocument returns null

Pascal Serwe <[email protected]> Wed, 11 Oct 2006 15:00:51 +0200
Newsgroups gmane.comp.mozilla.jrex
Message-ID <OFA1C201E9.0EF3E45F-ONC1257204.0041575D-C1257204.0047871B@adesso.de>
Hallo,

createDocument(String namespaceURI, String qualifiedName, DocumentType 
doctype)

returns null, if namespace, quaifiedName and doctype is null.

I saw that in the jni classes an if clause tests against null this way:

{...}
if (IS_NULL(jnamespaceURI) || IS_NULL(jqualifiedName) || 
IS_NULL(docType)){
        JREX_LOGLN("CreateDocument()--> **** 
jnamespaceURI/jqualifiedName/docType is NULL ****")
        return NULL;
}

So i called the method with not null paramameter like this:
protected Document createDomDocument(org.dom4j.Document document, 
DOMImplementation domImpl) throws DocumentException {
        String namespaceURI = "aaa";
        String qualifiedName = "bbb";
        org.w3c.dom.DocumentType docType = 
domImpl.createDocumentType("jrexDocType", "publicID","SystemID" );
        return domImpl.createDocument(namespaceURI, qualifiedName, 
docType);
}

But now the native method never returns.
Can i create a document in another way ?


Thanks,
Pascal Serwe

_______________________________________________
JRex mailing list
[email protected]
http://mozdev.org/mailman/listinfo/jrex