Forum Discussion
richie
Community Hero
Hey Nasturshia,
In regards to defining variables as strings or numerics, i just slap a .toString() or .toInteger() on it.
I should highlight variables/properties are saved as text/string type by default.
In regards to what the line is actually doing
[“count((//*[local-name() = ‘list01’] /*[local-name () = list02 and . = + expectedlist + “])”]
I cant actually read this to tell you whats going on.....i would need to know what the content of your response looks like cos i dont know what that local-name() method is doing. This is doing a count followed by the xpath to what is being counted which is then beimg concatenated with whatever variable/property defined as 'expectedlist'.
Im not in front of my laptop to actually try an xpath count (to work out if the count value is being stored as text (e.g. '4') or numeric (e.g. 4), but i'm wondering if 'expectedlist' is a stringtype and thats the problem?
Have you tried removing the concatenation of 'expectedlist' from the variable declaration to see what happens? If you remove it and you dont get the error, that'll mean that the expectedlist property is likely causing the issue.
Thats all i got, im afraid!
Ta
Rich
In regards to defining variables as strings or numerics, i just slap a .toString() or .toInteger() on it.
I should highlight variables/properties are saved as text/string type by default.
In regards to what the line is actually doing
[“count((//*[local-name() = ‘list01’] /*[local-name () = list02 and . = + expectedlist + “])”]
I cant actually read this to tell you whats going on.....i would need to know what the content of your response looks like cos i dont know what that local-name() method is doing. This is doing a count followed by the xpath to what is being counted which is then beimg concatenated with whatever variable/property defined as 'expectedlist'.
Im not in front of my laptop to actually try an xpath count (to work out if the count value is being stored as text (e.g. '4') or numeric (e.g. 4), but i'm wondering if 'expectedlist' is a stringtype and thats the problem?
Have you tried removing the concatenation of 'expectedlist' from the variable declaration to see what happens? If you remove it and you dont get the error, that'll mean that the expectedlist property is likely causing the issue.
Thats all i got, im afraid!
Ta
Rich
Nasturshia
4 years agoOccasional Contributor
Rich
Thank you for your reply, I can now go back to the script and use the information you have supplied to try to identify the glitch.
The fog is lifting slowly.
Thank you for your reply, I can now go back to the script and use the information you have supplied to try to identify the glitch.
The fog is lifting slowly.
Related Content
- 11 years agoashok_natar
- 5 years agosenthkum
Recent Discussions
- 6 days agoruchisingh