xtree responding differently on Texis V5 and Texis V6

Post Reply
linda.a.kennedy
Posts: 19
Joined: Wed Dec 31, 2008 2:17 pm

xtree responding differently on Texis V5 and Texis V6

Post by linda.a.kennedy »

I have a section of code I use on my server running Commercial Version 5.00.1086121238 20040601 (i686-unknown-linux2.4.9-64-32) that gets a list of all of the URLs in an html file and makes it a live link in what is put to the screen. When I copy the small bit of coded to my other server running Texis Commercial Version 6.00.1288082496 20101026 (x86_64-unknown-linux2.6.9-64-64), it doesn't work properly. The DUMP doesn't seem to have anything in it. Is there a difference in the 2 versions that would cause this small bit of code to work incorrectly on one and not the other?

Here is what is looks like. $ret to start is the file.
<$HYPRVAL = $ret>
<rex ">>http=s?://=![\x20\x0A\x0D]+[\x20\x0A\x0D]" $HYPRVAL >
<xtree INSERT $ret >

<xtree ROW DUMP >
<$ZZrcount = $ret.count>
<$ZZFOUND = $ret>
<if $ZZrcount gt 1>
<$DupURL = "YES" >
<$MutipleURL = $MutipleURL $ZZFOUND >
</if>
<$ZTMP = ( "Click this link: <a href=" + $ZZFOUND + ' target="_blank" >' + $ZZFOUND + "</a>" ) >
<sandr $ZZFOUND $ZTMP $HYPRVAL >
<$HYPRVAL = $ret >
</xtree>
<xtree CLEAR>
<send $HYPRVAL >

I have also try it with loop instead of the xtree loop. It acts the same.
User avatar
Kai
Site Admin
Posts: 1271
Joined: Tue Apr 25, 2000 1:27 pm

xtree responding differently on Texis V5 and Texis V6

Post by Kai »

<xtree> in Texis version 6 respects the new setting stringcomparemode, but that should not change behavior except in rare circumstances (a string with Unicode characters in both ISO-8859-1 and UTF-8).

It looks like the first REX expression (for `>>http=...') assumes that $HYPRVAL ends in a newline: if it does not, nothing is returned by <rex>, hence nothing is inserted into the <xtree insert>, and no `Click this link...' <sandr>s occur. Are you sure that $HYPRVAL ends in a newline on both servers?
linda.a.kennedy
Posts: 19
Joined: Wed Dec 31, 2008 2:17 pm

xtree responding differently on Texis V5 and Texis V6

Post by linda.a.kennedy »

Thanks for your help. I did verify that both files end in a newline. After looking closer at the files it looks like the issue is the spell checker function I run it through one is using ispell and the other is using aspell and the links are being tagged miss spelled in the ispell version. Which is what makes the rex expression not find the urls.

Thanks so much for your help.

Linda
Post Reply