[EMAIL PROTECTED] wrote:

Hi,

Thank you for your reply.

I am having difficulty "creating a Jira" issue.
I assume that to do this I need to be able to access "http://nagoya.apache.org/jira";
and I have not been able to do this all day.

Jira is really very unstable, so I'm not surprised.


I have, as suggested, created a trivial program that illustrates the problem.
It is based on the XalanTransfrom example with minimal changes.
It is attached.

Hopefully it shows where I am going wrong.
Maybe the problem is with my approach rather than any bug in Xalan.

OK, the bad news is this is really something we haven't supported in a very long time. In fact, I'm not sure if XalanTransformer ever supported using a pre-built tree in this way. We should probably remove the XalanNode constructor from XSLTInputSource.

The good news is the way you can do this is fairly straightforward. You need to create your own derivative of XalanParsedSource, and wrap your document instance in that. You really need to do a bit more work to get your own XalanDocument implementation to work anyway.

To get your own custom implementation of XalanDOM to work you need to provide a derivative of the DOMSupport class that understands your implementation. You can probably just use DOMSupportDefault, but you should create your own if you can optimize node-ordering for your implementation. For example, XalanSourceTree (the default implementation) uses indexing to support fast node ordering. I would highly recommend you do something like that, if you want to see reasonable performance.

Once you've done that, you can create a XalanParsedSource derivative that wraps your XalanDocument instance. That's trivial, and you can look at the existing code in the XalanTransformer directory for ideas.

Of course, you can always use XercesDOMWrapperParsedSource with an instance of the Xerces-C DOM that you've built by hand, and forget about creating your own XalanDOM. In addition, if you can build your DOM instance in document order, you can use Xalan's default XalanDOM implementation, and just build it using hand-made SAX events. Take a look at the DocumentBuilder sample for more information.

Feel free to post again if this isn't clear, or you have more questions.

Dave

Reply via email to