You don't have to touch the code at all -- just write an extension
function.

See the documentation for more information.

Dave



                                                                                       
         
                    "shruti"                                                           
         
                    <[EMAIL PROTECTED]        To:     <[EMAIL PROTECTED]>         
         
                    ltech.com>              cc:     (bcc: David N Bertoni/CAM/Lotus)   
         
                                            Subject:     Addition of a new function    
         
                    06/03/2001 10:09                                                   
         
                    PM                                                                 
         
                    Please respond                                                     
         
                    to xalan-dev                                                       
         
                                                                                       
         
                                                                                       
         



Hello,

i have to add a new function to the xalan's xpath list of functions. i am
adding a function for searching a list of words .
It would be an extension to the xalan's contains function ...

//book[contains(./,"hello")]
//book[contains-words(./,"hello hi","any")] - this would search for words
hello and hi and returns all the nodes which have either hello or hi in
their text.

For this i had to add a class (FunctionContainsWords.java) in the
org/apache/xpath/functions package and make an appropriate entry for this
function in the function table and keywords class

Could their be any alternative approach possible by which i could add this
function by not changing the existing code . But by just deriving my own
classes from the existing ones..

Please suggest...

thanx
Shruti.





Reply via email to