How to get transformiix working on Thunderbird?

Robert North <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization Zen Internet
Message-ID <[email protected]>
Currently, transformiix is not build in default Thunderbird builds.
I think the most appropriate way for Thunderbird would be to distribute 
transformiix as an extension (Hopefully maintained by the Mozilla team).

To get the ball rolling, I thought I'd attempt to install transformiix 
in Thunderbird myself.

As a first step I have tried using the transformiix.so file from Mozilla 
1.8a. This works to a degree, being able to create transformiix classes, 
with a few idiosyncrasies, but crashes when try to evaluate an XPath.

So this raises the following questions:

1. Should it be possible to simply use transformiix.so from a Mozilla 
version, and have it run on Thunderbird?
If so, what am I doing wrong?

2. If transformiix from Mozilla cannot be used, then how should 
transformiix be built to provide compatible components to Thunderbird?

3. Are there any other components in addition to transformiix.so that 
might allow it to work without crashing?



***** Test code follows *****
// This code was run by hand at the console in the venkman debugger.
// It is presented in script form for readability only.

var xslt = 
Components.classes["@mozilla.org/document-transformer;1?type=xslt"].getService();
var xpathEval = 
Components.classes["@mozilla.org/transformiix-domci-extender;1"].getService();
// The 2 above sometimes generate the following error:
// Component returned failure code: 0x80570016
// (NS_ERROR_XPC_GS_RETURNED_FAILURE)
// They can usually be repeated, and succeed.


// If the above 2 aren't done, then the  creation of XPathEvaluator will
//sometimes fail with a no factory error.
var eval2 = new XPathEvaluator;
var contentDocument = 
document.getElementById("messagepane").contentDocument;

// The following statement crashes Thunderbird.
// The following also crashes when run on document.evaluate() or
//  contentDocument.evaluate()
var result = 
eval2.evaluate("/HTML/BODY",contentDocument,null,XPathResult.ANY_TYPE,null);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.