Subject:Problems with Replace Author:k m Date:18 Nov 2005 02:30 PM
Hello,
I have a functon that converts a date string to a xs:dateTime.
It was working perfectly fine, but now throws error:
"invalid replacement pattern [error: forx0004]"
on the line below with the replace in it.
Thx Kay
------------------------
declare function local:make-dateTime($dtStr as xs:string) as xs:dateTime
{
let $re := "(\d+)/(\d+)/(\d+)\s(\d+)\:(\d+)\:(\d+)\s(.+)"
let $dt := '11/14/2005 1:42:49 PM'
let $month := replace($dt,$re,"$1") cast as xs:integer
.
.
.
}
Subject:RE: Problems with Replace Author:(Deleted User) Date:18 Nov 2005 04:17 PM
By the way, (and I think this has nothing to do with the bug)
While experimenting with several processors, I
Noticed that the Saxon xquery processor rejects the \: and works
Correctly with : unescaped.
I think the \ is unnecessary before a :
So you might want to drop the change \: to : someday.
- clyde
-----Original Message-----
From: stylus-studio-xquery Listmanager
[mailto:stylus-studio-xquery.listmanager@stylusstudio.com]
Sent: Friday, November 18, 2005 4:04 PM
Subject: Problems with Replace
From: "k m"
Thanks, I appreciate the prompt response.
--
To reply: mailto:stylus-studio-xquery.12676@stylusstudio.com
To start a new topic: mailto:stylus-studio-xquery@stylusstudio.com
To login: http://www.stylusstudio.com/SSDN/
To (un)subscribe:
mailto:stylus-studio-xquery.list-request@stylusstudio.com