cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Blakely <>
Subject Using Jacl for extension elements
Date Thu, 13 Jul 2000 20:00:50 GMT

I'm trying to incorporate TCL code (using Jacl) into my XSL sheets, and
I've had a good amount of success defining extension functions. However,
extension elements seems to elude me. From what I can gather from the
documentation, a TCL (Jacl) procedure designated as an extension element
takes two arguments, with the second argument being a java object that
if I was using straight Java or Javascript, i'd be able to use the class
methods to pluck out my attributes and element value. However, when this
argument gets passed to a Jacl function, it seems to be useless, i.e.,
jacl does not recognize it as an existing java class or object. Here's a
sample of the code:

<lxslt:script lang="jacl">
  package require java

  proc cvs_write {xslProcessorContext elem} {
    return "whatever"


The "package require java" line provides an interface for creating and
manipulating Java objects directly within the jacl script, and I've
tried a number of techniques to try and get at the "elem" object that's
getting passed, but it's just not recognizing elem as anything useful. 

Has anyone actually made this work (using jacl to define extension
elements)? If so, is there some sample code out there that shows how
this might be accomplished? Any advice is appreciated,

I previously posted this question to the Xalan specific list, so my 
apologies if anyone recieves this twice.

Ben Blakely
Systems Admin
I-Silver, Inc.

View raw message