Hi Mukul,
I'm afraid I don't follow how that could work. I see nothing in the code
which sets the default function namespace [1] to be
"http://www.w3.org/2005/xpath-functions". XML Schema 1.1 [2] fixes its
value to be "http://www.w3.org/2005/xpath-functions", but an XPath 2.0
processor should allow you to set it to anything, so can't see how it could
be working correctly without having code somewhere in Xerces which
explicitly sets that on PsychoPath.
In other words a call like:
fDynamicContext.set_default_function_namespace
("http://www.w3.org/2005/xpath-functions");
or whatever the method is in PsychoPath for specifying it..
Thanks.
[1] http://www.w3.org/TR/xpath20/#dt-def-fn-ns
[2] http://www.w3.org/TR/2009/CR-xmlschema11-1-20090430/#sec-xpath-valid
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [email protected]);
E-mail: [email protected]
Mukul Gandhi <[email protected]> wrote on 11/12/2009 10:37:59 AM:
> Hi Michael,
> Kindly see my replies inline, please.
>
> On Thu, Nov 12, 2009 at 8:08 PM, Michael Glavassevich
> <[email protected]> wrote:
> > Well, it's a problem if we're interpreting "fn" as something it's not.
It
> > could be bound to another namespace or none at all.
>
> You have explained this correctly.
>
> >> string(test) eq 'xxx'
> >
> > Does this work today?
>
> Yes, it does. All built in XPath 2.0 functions work fine when invoked
> like above (i.e, without specifying any prefix to built in XPath 2
> function calls), with PsychoPath and Xerces assertions. This works ok
> with the current Xerces SVN code. That's good according to me.
>
> > Searching for "http://www.w3.org/2005/xpath-functions"
> > in the code I couldn't see where it is being set as the default
function
> > namespace. Is this supported by PsychoPath?
>
> Yes, this namespace is supported by PsychoPath. This namespace is
> defined in XPath 2.0 F&O spec (ref,
> http://www.w3.org/TR/xpath-functions/#namespace-prefixes).
>
> This XPath 2 F&O namespace URI is enforced in Xerces code in the
> class, AbstractPsychoPathImpl.java with this statement:
>
> fDynamicContext.add_namespace("fn",
"http://www.w3.org/2005/xpath-functions");
>
>
> > Michael Glavassevich
> > XML Parser Development
> > IBM Toronto Lab
> > E-mail: [email protected]
> > E-mail: [email protected]
>
>
> --
> Regards,
> Mukul Gandhi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]