The disappearing backslash ...

nzblue_fish
nzblue_fish's picture
User offline. Last seen 2 weeks 4 days ago. Offline
Joined: 09/30/2009
Points: 1165

Hi guys,

Not sure if this is a major issue, but it was a bit of an odd one to run in to.

When an emml script (mashup) I published to the Cloud yesterday was parsed, the process somehow removed a backslash that I had in a tokenize function buried in one of my macros.

 The original emml statement in the source file was this:

 <assign fromexpr="tokenize(xs:string($fieldName),'\^')" outputvariable="columnNamePair" />

which used the backslash to escape the use of the caret symbol in the regex parameter. This worked fine when debugging the script in Studio. However when I published the script to the Cloud, the statement ended up as:

 <assign fromexpr="tokenize(xs:string($fieldName),'^')" outputvariable="columnNamePair" />

resulting in a lovely error message about the second parameter of a tokenize could not be empty (since the ^ symbol is actually a valid regex operator I guess).

I've since modified my script to use another character other than ^ so I didn't need the escape, but I thought I would pass this one on anyway. I'm not sure if this is intended behaviour or a bug.

Cheers, Innes

 

 

0
Your rating: None