XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
k mSubject: 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
.
.
.
}

Postnext
k mSubject: Problems with Replace
Author: k m
Date: 18 Nov 2005 02:55 PM
BTW I'm using the just released Stylus Studio 2006 Enterprise Edition
Build 501e

Which I recently installed. When this was working it was in Stylus Studio 6. However in 2006 it doesn't.

Any ideas?

Thx

Postnext
(Deleted User) Subject: Problems with Replace
Author: (Deleted User)
Date: 18 Nov 2005 03:54 PM
k m,

Thankyou for bringing this to our attention. It appears to be a new bug in Stylus Studio 2006.

We will let you know when we have a fix available.

Again, thanks.
Clyde

Postnext
k mSubject: Problems with Replace
Author: k m
Date: 18 Nov 2005 04:01 PM
Thanks, I appreciate the prompt response.

Postnext
(Deleted User) 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



Postnext
k mSubject: RE: Problems with Replace
Author: k m
Date: 21 Nov 2005 12:02 PM
Thanks Cyde,

That's useful information, I'll keep it in mind.

Posttop
(Deleted User) Subject: RE: Problems with Replace
Author: (Deleted User)
Date: 08 Dec 2005 02:23 PM
k m

This bug has been fixed in the latest release of Stylus Studio, build 501f which is now available for download from http://www.stylusstudio.com/xml_download.html

- clyde

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.