xalan extension functions

B

Blue Doze

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[findex] = new FuncEntry(class.getName(), findex);

I can define and use extension functions that doesn't have namespace,
but when I add the namespace in the XPATH expression, it doesn't work.



I tried to extend both Function2Args, and FuncExtFunction, and I had
no luck in both.
when I extended FuncExtFunction I called the super constructor with
the namespace i want.

Any hints?


BlueDoze
 
J

Joe Kesselman

It's hard to debug this without seeing your actual code for the
transformation and for the function installation, the actual
stylesheet... and having a better description of the problem than "it
doesn't work."

I presume you've already scoped out
http://xml.apache.org/xalan-j/extensions.html
and followed the steps therein.

I presume you've also looked at existing examples of namespaced extensions.

If not, those are where to start...
 
B

Blue Doze

It's hard to debug this without seeing your actual code for the
transformation and for the function installation, the actual
stylesheet... and having a better description of the problem than "it
doesn't work."

I don't do transformation, I have XML document and just evaluate some
XPath expressions at run time. those XPath expression have some
extension functions
 
J

Joe Kesselman

Blue said:
I don't do transformation, I have XML document and just evaluate some
XPath expressions at run time.

OK. We still need a better view of what you're actually doing and what
happens when you do it. Free support doesn't come with mindreading services.

The best place to ask Xalan-specific questions would of course be
Xalan's own mailing list, but if you provide enough detail to diagnose
I'll take a look at it.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top