can i create a xalan java extension function where the function name has dashes (-) in it ?

Discussion in 'Java' started by Chris Bedford, Aug 17, 2003.

  1. Hello,

    I'm using Xalan and I have a bunch of xslt documents that were
    constructed to run with another processor that has alot of custom
    extension functions. The names of these functions sometimes have
    dashes in them:

    e.g., a function might be called: do-something

    ane might be used like this:

    <xsl:value-of select="do-something(.)"/>

    My problem is that as far as I can tell with the xalan extension
    mechanism
    one's java class functions must be identical to the name of the xslt
    function you are providing the extension for... Thus I don't see how
    could specify that the do-something xslt function is to be implemented
    by a java class like this:

    public class Something {
    public String doSomething(String input) { return input +
    "whatever"; }
    }

    Java naming conventions prevent me from doing this ->

    public class Something {
    public String do-something(String input) { return input +
    "whatever"; }
    }

    I'm wondering if there is some kind of aliasing trick in the xalan
    extensions mechanism to make this work.

    Thanks !
    - Chris
    Chris Bedford, Aug 17, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. enrique
    Replies:
    2
    Views:
    553
  2. Chris Bedford
    Replies:
    0
    Views:
    539
    Chris Bedford
    Aug 17, 2003
  3. Arjen Haayman
    Replies:
    0
    Views:
    854
    Arjen Haayman
    Mar 1, 2004
  4. Fisch von Gestern
    Replies:
    1
    Views:
    822
    GIMME
    Jun 14, 2004
  5. cvissy
    Replies:
    0
    Views:
    603
    cvissy
    Nov 16, 2004
Loading...

Share This Page