[EMAIL PROTECTED] wrote:
Hi, I'm using Xalan version 1.9 and Xerces version 2.6 in C++ on windows. I'm having a problem using XalanTransformer. I am building up a DOM by hand. I have defined my own classes that derive from XalanNode and XalanDocument and so on. I've tried this approach to using XPathEvaluator.evaluate and it worked fine. Now I am trying the same thing with XalanTransformer.transform I assumed that because there is a constructor for XSLTInputSource that takes a XalanNode* then I could use that. In effect I have code like this XalanNode *node; // Stuff to set up the input DOM in node XSLTInputSource input(node); transformer.transform(input, stylesheet, output); (Where I've glossed over the setting up the XSLTInputSource for the stylesheet the XSLTResultTarget for the output and the XalanTransformer itself.) When I try this I get an error:SAXParseException: An exception occurred! Type:RuntimeException, Message:Theprimary document entity could not be opened. Id={null} (, line 0, column 0) The fact that this is a SAX parse exception makes me think that the transformer is going off and try to parse my DOM object! Also when I try to follow the flow through the debugger it seems to be going off to do a parse. This all suggests that I am doing something rather fundamentally wrong. What approach should I be taking to transform a DOM I've built by hand?
Well, it's a code path that certainly hasn't been well-tested for quite a while. Can you create Jira issue, and attach the source code for a trivial program that reproduces the problem?
Thanks, Dave
