sql processor seems to be using xpath 1.0

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

sql processor seems to be using xpath 1.0

James Liang
Hi all,

I believe the xpath replace() function is part of xpath 2.0.  I tried
to use the replace() function inside the sql processor.

sql processor script:

<sql:update "select="/some/stuff">
insert into sometable
set
name = <sql:param type="xs:string" select="replace(@name,'foo', 'bar')" />;
</sql:update>

When I ran this, I got he following error message:

Exception occurred evaluting XPath: replace(@name,'foo', 'bar').
Exception: No Such Function replace

When I tried the replace() inside the xslt sandbox (part of the orbeon
distribution), the replace() function worked.


Thanks,
James


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: sql processor seems to be using xpath 1.0

Erik Bruchez
Administrator
James,

That's right, the SQL processor hasn't been updated in a while and
still uses XPath 1.0.

-Erik

On Sun, Jun 5, 2011 at 5:00 PM, James Liang <[hidden email]> wrote:

> Hi all,
>
> I believe the xpath replace() function is part of xpath 2.0.  I tried
> to use the replace() function inside the sql processor.
>
> sql processor script:
>
> <sql:update "select="/some/stuff">
> insert into sometable
> set
> name = <sql:param type="xs:string" select="replace(@name,'foo', 'bar')" />;
> </sql:update>
>
> When I ran this, I got he following error message:
>
> Exception occurred evaluting XPath: replace(@name,'foo', 'bar').
> Exception: No Such Function replace
>
> When I tried the replace() inside the xslt sandbox (part of the orbeon
> distribution), the replace() function worked.
>
>
> Thanks,
> James
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws