Re: [MarkLogic Dev General] Why does fn:replace gives an error when second argument exceeds certain length

2016-10-17 Thread Florent Georges
Netherlands/@51.997531,4.3824845,17z/data=!3m1!4b1!4m5!3m4!1s0x47c5b589ec2c237b:0x22b6e5d15befb3d5!8m2!3d51.997531!4d4.3846732> >> >> -- >> *From:* general-boun...@developer.marklogic.com < >> general-boun...@developer.marklogic.com&g

Re: [MarkLogic Dev General] Why does fn:replace gives an error when second argument exceeds certain length

2016-08-22 Thread Florent Georges
techpark+37,+2628+XJ+Delft,+Netherlands/@51.997531,4.3824845,17z/data=!3m1!4b1!4m5!3m4!1s0x47c5b589ec2c237b:0x22b6e5d15befb3d5!8m2!3d51.997531!4d4.3846732> > > ---------- > *From:* general-boun...@developer.marklogic.com < > general-boun...@developer.marklogic.com> o

Re: [MarkLogic Dev General] Why does fn:replace gives an error when second argument exceeds certain length

2016-08-22 Thread Johan de Boer
ogic.com <general-boun...@developer.marklogic.com> on behalf of Florent Georges <li...@fgeorges.org> Sent: Monday, August 22, 2016 1:10:27 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Why does fn:replace gives an error when second argument exceeds certa

Re: [MarkLogic Dev General] Why does fn:replace gives an error when second argument exceeds certain length

2016-08-22 Thread Florent Georges
Hi, Not sure about the details of the length (it's hard to look at a non-reduced example containing a lot of noise), but you pass $piece-of-xml (or at least a substring of it) as a regex to fn:replace(). So MarkLogic tells you it's not a valid regex, and it looks right to do so. It's not clear

Re: [MarkLogic Dev General] Why does fn:replace gives an error when second argument exceeds certain length

2016-08-22 Thread DK Singh
Hi John, You are giving the wrong parameters in the second argument of fn: replace , replace work on patterns or the and you are passing second argument as string, So I think for the second argument in fn: replace you will have to provide regex On Aug 22, 2016 3:34 PM, "Johan de Boer"

[MarkLogic Dev General] Why does fn:replace gives an error when second argument exceeds certain length

2016-08-22 Thread Johan de Boer
I am using MarkLogic release 8.0-4 and I get a problem with fn:replace if the second argument exceeds a certain length. I use the following script in XQuery. This is just a simple query with the only goal to show the error. let $string1 := "" let $string2 := "" let $length-1 := 1463