473,769 Members | 8,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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(Str ing input) { return input +
"whatever"; }
}

Java naming conventions prevent me from doing this ->

public class Something {
public String do-something(Strin g 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
Jul 20 '05 #1
0 1576

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4031
by: al dav | last post by:
Hi all ok i am not a java programmer I am a sys-admin, my users want xalan and have already got j2sdk_1.4.2 so i have downloaded it and set the CLASS_PATH export CLASS_PATH=/usr/local/java/xalan-j_2_5_2/bin/xalan.jar:/usr/local/java/xalan -j_2_5_2/bin/xml-apis.jar:/usr/local/java/xalan-j_2_5_2/bin/xercesImpl.jar:/
0
2077
by: Andy Fish | last post by:
Hi I am using Xalan-J 2.4.1 and I am trying to get the EXSLT node-set function working. xalan:nodeset() works fine but when I try exslt:node-set I get this error: (Location of error unknown)XSLT Error (javax.xml.transform.TransformerException): java.lang.NoSuchMethodException: For extension function, could not find method org.apache.xml.dtm.ref.DTMNodeIterator.node-set( ).
0
2231
by: Arjen Haayman | last post by:
Hello, I'm using Xalan and have written Java classes as extension functions. According the documentation the return value of an extension function can be a Result tree fragment: (== org.w3c.doc.DocumentFragment) Now I can't figure out how to create an empty DocumentFragment from a Java class that has been created in an XSL stylesheet
0
1333
by: bastien | last post by:
Hi all I get an xml file which refer to a xsl file . this xsl refer to others xsl files. I use xalan to do the transformation xml+xsl=>html but we I launch xalan *I get an error: (Emplacement inconnu de l'erreur)Erreur XSLT
1
2308
by: Fisch von Gestern | last post by:
I have tried to run the extension function/element examples provided with the Xalan-J download. I believe that my classpath is correct, and that my versions are up-to-date. However, I can't get past the following error. Any help, please? =========================================================================== C:\xalan>test C:\xalan>REM @echo off
6
3171
by: Robbie Baldock | last post by:
Hi - I'm a bit of a newbie to the world of XSLTs but am trying to call a Java method on a parameter passed into an XSLT but am having problems. I've stripped the XSLT down to its bare bones: <xsl:stylesheet version="1.0" xmlns:java="http://xml.apache.org/xslt/java"
7
4125
by: RC | last post by:
First, let me say I couldn't find a group discuss XML/XSLT. So I only choose the closest groups to post this message. Here is part of my *.xsl file <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan" xmlns:my-javascript-ext="my-ext1" extension-element-prefixes="my-javascript-ext"
3
2345
by: =?iso-8859-1?q?Eduardo_Y=E1=F1ez_Parareda?= | last post by:
Hello, I have to use xalan to transform some XML using XSL, but I have some problems within the XSLs, and Xalan doesn't give very good error messages. Is there any way to put Xalan on debug or trace mode or something else?, it's almost impossible to find the problems with those messages. i.e.: This is /xsl/template/list.xsl
1
1887
by: Blue Doze | last post by:
Hello, I'm trying to add XPATH extension function to xalan-j with namespace, I'm doing that using the following code: Function func = (Function) class.newInstance(); int findex = FunctionTable.installFunction(name, func); FuncLoader m_functions = FunctionTable.m_functions; m_functions = new FuncEntry(class.getName(), findex);
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10219
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8876
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3967
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3567
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.