You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Rony G. Flatscher" <Ro...@wu-wien.ac.at> on 2002/09/13 15:55:37 UTC

Re: BSF - *any* knowledge at all in this group ? (Re: BSF (Bean Scripting Framework) and Cocoon's usage of it ?? (Re: Seeking help on BSF calling a non-Java language engine (Rexx) ...

Hi Carsten:

> I don't have any knowledge of BSF - but I now a little bit about Cocoon.
> Sorry, I can't follow you: where is this method call of call() and
> about what source are you talking?

Well, this is a kind of a very special question and has to do with the BSF-utiltity. Basically it
allows for calling non-Java-languages from within Java and allows also for those non-Java-programs
to call back into Java. Various Apache projects are employing BSF (was developed by IBM as
open-source and has been handed over to Apache).

BSF in the context of XSL-transformations allows for defining extensions (i.e. functions written
e.g. in JavaScript, in Perl, ie. extending the class BSFEngineImpl). In theory any implemented
BSF-language can be handled uniformely. In the context of Cocoon it is the first time that the
RexxEngine for BSF does not work. It seems that the way the BSF-RexxEngine is called causes a
problem: the name of the function and the argument(s) are supplied, but not the source code of the
program (in this case the Rexx program).

So I would like to know how I could get a hold of the source code at runtime to be able to invoke
it.

To make it maybe a little bit more interesting, I enclosed the following files:

    - page2html-javascript.xsl - contains a JavaScript function as an extension to XSLT
    - hello-page2html.xml - xml-file to be processed (using a JavaScript function)

(   - XML nach HTML.htm - the resulting HTML-file  )

This JavaScript version works with Cocoon, due to BSF.

The question to the developers in the know: how is it possible to access the source of the program
(in the file "page2html-javascript.xsl it is defined in a CDATA-section)? [The call() method is a
method defined in BSFEngineImpl(), and it seems to me that it is not being used correctly, at least
not the way I read the original BSF documentation.]

*Any* help, *any* hint highly appreciated !

TIA,

---rony



RE: BSF - *any* knowledge at all in this group ? (Re: BSF (Bean Scripting Framework) and Cocoon's usage of it ?? (Re: Seeking help on BSF calling a non-Java language engine (Rexx) ...

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Ah, ok - now I understand what you mean. Sorry, but I can't help you
here.
Perhaps someone who wrote the ScriptAction or ScriptGenerator for
Cocoon does know more about BSF.

Sorry
Carsten


> -----Original Message-----
> From: Rony G. Flatscher [mailto:Rony.Flatscher@wu-wien.ac.at]
> Sent: Friday, September 13, 2002 3:56 PM
> To: cocoon-dev@xml.apache.org
> Subject: Re: BSF - *any* knowledge at all in this group ? (Re: BSF (Bean
> Scripting Framework) and Cocoon's usage of it ?? (Re: Seeking help on
> BSF calling a non-Java language engine (Rexx) ...
>
>
> Hi Carsten:
>
> > I don't have any knowledge of BSF - but I now a little bit about Cocoon.
> > Sorry, I can't follow you: where is this method call of call() and
> > about what source are you talking?
>
> Well, this is a kind of a very special question and has to do
> with the BSF-utiltity. Basically it
> allows for calling non-Java-languages from within Java and allows
> also for those non-Java-programs
> to call back into Java. Various Apache projects are employing BSF
> (was developed by IBM as
> open-source and has been handed over to Apache).
>
> BSF in the context of XSL-transformations allows for defining
> extensions (i.e. functions written
> e.g. in JavaScript, in Perl, ie. extending the class
> BSFEngineImpl). In theory any implemented
> BSF-language can be handled uniformely. In the context of Cocoon
> it is the first time that the
> RexxEngine for BSF does not work. It seems that the way the
> BSF-RexxEngine is called causes a
> problem: the name of the function and the argument(s) are
> supplied, but not the source code of the
> program (in this case the Rexx program).
>
> So I would like to know how I could get a hold of the source code
> at runtime to be able to invoke
> it.
>
> To make it maybe a little bit more interesting, I enclosed the
> following files:
>
>     - page2html-javascript.xsl - contains a JavaScript function
> as an extension to XSLT
>     - hello-page2html.xml - xml-file to be processed (using a
> JavaScript function)
>
> (   - XML nach HTML.htm - the resulting HTML-file  )
>
> This JavaScript version works with Cocoon, due to BSF.
>
> The question to the developers in the know: how is it possible to
> access the source of the program
> (in the file "page2html-javascript.xsl it is defined in a
> CDATA-section)? [The call() method is a
> method defined in BSFEngineImpl(), and it seems to me that it is
> not being used correctly, at least
> not the way I read the original BSF documentation.]
>
> *Any* help, *any* hint highly appreciated !
>
> TIA,
>
> ---rony
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org