Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

xalan extension functions

Thread view: 
Blue  Doze - 01 Aug 2007 02:25 GMT
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
Joe Kesselman - 01 Aug 2007 03:08 GMT
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...

Signature

() ASCII Ribbon Campaign  | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry

Blue  Doze - 01 Aug 2007 04:03 GMT
> 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
Joe Kesselman - 01 Aug 2007 04:11 GMT
Blue Doze wrote:
> 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.

Signature

() ASCII Ribbon Campaign  | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.