Matthew --
This is confusing and I agree that the instructions are not clear (or
even available). You need to go to the BSF website at
http://www-124.ibm.com/developerworks/project/showfiles.php?group_id=16&
release_id=59 and download the latest binary release which should be
bsf-bin-2.2.zip. Extract the bsf.jar file there and replace the one
that came with the XalanJ download just be to be safe.
Then, you need to extract bsfactivescriptengine.dll from that same .zip.
Save this .dll file somewhere. It needs to be either on your PATH (not
CLASSPATH) or in your working directory. This is loaded with
System.loadLibrary("bsfactivescriptingengine.dll")
If it still blows up, try examing the system property java.library.path.
It should, however, be set correctly from your PATH environment
variable.
Also, you'll need to have MSVCP60.DLL installed in your working
directory or a directory on your path.
I've had a few questions about this but no one has ever reported to me
that they got it to work. Can you please follow these steps and let me
know your results? If we can get things to work, I'd really appreciate
any suggested documentation changes to the "Extensions" page on the
XalanJ web site that will provide the information that people need to
get started with this quickly and effectively.
Thanks,
Gary
> -----Original Message-----
> From: Matthew L. Avizinis [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 31, 2001 11:43 AM
> To: [EMAIL PROTECTED]
> Subject: embedded script using VBScript
>
>
> Hello,
> Examples abound showing how to embed extension functions
> in XSLT files using Java and Javascript. However, there is a
> dearth of information for embedding scripts using VBScript.
> The examples/instructions on the Xalan website are also not
> so clear on the matter. Can anyone show me a clearcut
> example how to use a VBScript in an extension function and
> what MS scripting engine files are needed (and where to put
> them) to make it work with Xalan, similar to the example below?
>
> <xalan:component prefix="user" functions="message">
> <xalan:script lang="javascript">
> function message (days) {
> var d = new Date();
> d.setDate(d.getDate() + parseInt(days));
> return d.toLocaleString();
> }
> </xalan:script>
> </xalan:component>
>
> The message that Xalan currently spits out when I attempt to
> use XSLT files which include extension functions using VBScript is:
>
> java.lang.reflect.InvocationTargetException:
> com.ibm.bsf.BSFException: UnsatisfiedLinkError loading
> library:bsfactivescriptengine no bsfactivescriptengine in
> java.library.path
> at
> com.ibm.bsf.engines.activescript.ActiveScriptEngine.<clinit>(A
> ctiveScriptEng
> ine.java:638)
> at java.lang.Class.newInstance0(Native Method)
> at java.lang.Class.newInstance(Class.java:237)
> at
> com.ibm.bsf.BSFManager.loadScriptingEngine(BSFManager.java:316)
> at java.lang.reflect.Method.invoke(Native Method)
> at
> org.apache.xalan.extensions.ExtensionHandlerGeneral.<init>(Ext
> ensionHandlerG
> eneral.java:289)
> at
> org.apache.xalan.templates.ElemExtensionDecl.runtimeInit(ElemE
> xtensionDecl.j
> ava:330)
> at
> org.apache.xalan.transformer.TransformerImpl.transformNode(Tra
> nsformerImpl.j
> ava:1159)
> at
> org.apache.xalan.transformer.TransformerImpl.transform(Transfo
> rmerImpl.java:
> 638)
> at
> org.apache.xalan.transformer.TransformerImpl.transform(Transfo
> rmerImpl.java:
> 1088)
> at
> org.apache.xalan.transformer.TransformerImpl.transform(Transfo
> rmerImpl.java:
> 1066)
> at org.apache.xalan.xslt.Process.main(Process.java:865)
>
> (Location of error unknown)XSLT Error
> (javax.xml.transform.TransformerException): Could not compile
> extension
>
> thanks much,
>
> Matthew L. Avizinis <mailto:[EMAIL PROTECTED]>