My first thought involved not changing the runtime evaluator. You could make all the changes to the way the query is being translated. In the translator, wrap the field name arguments with fn:string and fn:data. Take a look at XMLQueryTranslater. You will find a function call "data" which takes an ILogicalExpression and wraps it with fn:data. You can make a similar function for fn:string. Then just use these functions for your field name argument construction.
Let me know if you have questions. On Wed, Jun 29, 2016 at 9:37 AM, Riyafa Abdul Hameed < [email protected]> wrote: > Hi again, > > I think now that it would be better to reuse the evaluate() method of the > CastScalarEvaluatorFactory class rather than that of the > FnStringScalarEvaluatorFactory. Shall I move implementation of the > evaluate() method of the CastScalarEvaluatorFactory to the FunctionHelper > class so that it could be reused? > > Thanks again. > > Yours sincerely, > Riyafa > > > On 29 June 2016 at 15:01, Riyafa Abdul Hameed <[email protected]> > wrote: > >> Hi, >> >> In this issue we have to cast the left operand to xs:string after >> atomizing it. I would like to reuse the evaluate() method >> FnStringScalarEvaluatorFactory for casting strings. Shall I move it's >> implementation to the FunctionHelper class so that it could be reused. >> >> >> Thank you. >> >> Yours sincerely, >> Riyafa >> >> >> -- >> Riyafa Abdul Hameed >> Undergraduate, University of Moratuwa >> >> Email: [email protected] >> Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/> >> <http://facebook.com/riyafa.ahf> <http://lk.linkedin.com/in/riyafa> >> <http://twitter.com/Riyafa1> >> > > > > -- > Riyafa Abdul Hameed > Undergraduate, University of Moratuwa > > Email: [email protected] > Website: https://riyafa.wordpress.com/ <http://riyafa.wordpress.com/> > <http://facebook.com/riyafa.ahf> <http://lk.linkedin.com/in/riyafa> > <http://twitter.com/Riyafa1> >
