Deepak,
Maybe you aren't getting an answer because it isn't clear how your post
relates to XSLT.
Unless in some strange framework operating on a planet far far away,
Javascript is not executed during an XSLT transformation. It sometimes
comes into the picture because XSLT is used to write out (or even generate)
Javascript code that is subsequently executed, for example in a web
browser: but no Javascript is executed at runtime by the XSLT engine.
(Actually I exaggerate: even mainstream XSLT engines might provide the
capability to call functions that happen to be written in Javascript
somewhere. But this should happen strictly by means of proprietary
extensions. That different processors might compete by offering different
features in this respect is part of the idea of XSLT as an external spec, a
"standard": processors should be allowed to differentiate themselves. But
it explicitly won't be "XSLT" in the narrow sense.)
Accordingly it is not clear what the significance is of your saying your
XSL file has Javascript "embedded", or whether you are doing this properly
(in accordance with some feature provided by your processor, Xalan, which
has no Javascript support TMK) or in a way which is bound not to work given
the way XSLT is designed to run. You might have better luck presenting the
problem if you showed the code where the Javascript is embedded, and then
someone could explain to you why this won't work. (But it won't be me: I am
about to board a flight across an ocean. :-)
It is also possible that your problem has nothing to do with Javascript at
all. Someone who knows Xalan's error messages has to see what you are
trying to do and why it isn't going. In the meantime you should certainly
consider what role Javascript is playing. Whatever it is supposed to be
doing, you could start by ripping it out and getting your XSLT to run
without it, and only then researching how to go about solving whatever
problem you have that you think you need the Javascript to deal with.
Sorry this isn't so much help. What do you mean by "embedded"?
Cheers,
Wendell
At 09:31 AM 6/5/2004, you wrote:
Hi,
i have posted the same question a couple of times, but
could not get any reply, hope I am more clear with my
question this time.
I have a XSL file which has javascript embedded. I am
using xalan parser. I have
xalan.jar
xercesImpl.jar
bsf.jar
xml-apis.jar
js.jar
files in clsspath,(all latest version), java version
is 1.4.
I also have the following 2 files in the path
bsfactivescriptengine.dll
msvcp60.dll
I use the command
java org.apache.xalan.xslt.Process -in
C:\may27\xalan2.xml -xsl C:\may27\xalan2.xslt -out
C:\may27\xalan2.html
The xmla and xsl files that I use are the ones present
in the
http://xml.apache.org/xalan-j/ site.
But I get the error
java.lang.reflect.InvocationTargetException:
com.ibm.bsf.BSFException: JavaScript Error: Internal
Error: java.
lang.IllegalArgumentException: Line number can not be
negative:-1
Can any one help me in identifying the problem.
bye,
with regards,
Deepak.
___&&__&_&___&_&__&&&__&_&__&__&&____&&_&___&__&_&&_____&__&__&&_____&_&&_
"Thus I make my own use of the telegraph, without consulting
the directors, like the sparrows, which I perceive use it
extensively for a perch." -- Thoreau