On 2/20/2010 1:49 PM, BPederson wrote:

Dave-

I am still struggling with the concept, most likely because I started in
Xalan-J.  From my perspective, it appears the implemetations are
considerably different.  The vendor product I'm using makes the Xalan-C++
library call to do the stylesheet transformation.  I unfortunately have no
control over the application referencing the Xalan-C++ library.  All I have
control over is the XSLT, which I make the function extension call from.  In
Xalan-J, not a problem because the Xalan.jar file knows that Rhino is
available to handle my javascript and do the file read.

So correct me on this thought process for Xalan-C++:

No doubt I can create a C++ function extension to read the file but if I
can't embed it in the application referencing the Xalan-C++ library to do
the stylesheet transformation, then I'm out of luck?  Or is there a way for
me to create this function extension as a stand-alone DLL that gets called
when the Xalan-C++ library, called by the vendor application, comes across
the function call in my XSLT.
Since C++ is a statically compiled language, there's no way to do the kinds of things you can do in Java with scripting extensions.

It would be possible to extend Xalan-C++ with some sort of syntax to describe how to load an extension function, but there's no current facility for that. It's a bit messy, because there is no standard cross-platform mechanism for loading and calling functions in shared libraries.

You can write and compile an extension function into a DLL, but the executable that initializes the Xalan-C++ library and does the transformation would need to be modified to install your extension function.

Dave

Reply via email to