on 11-10-2015 3:28 PM
Hi experts,
I need to make several Xpath expressions in order to determine receiver. The expressions works fine, except when I try to group them like this.
Group A and Group B needs to be true in order to route the message.
Group A:
(Xpath./p1:test/variable = "1") OR
(Xpath./p1:test/variable = "2") OR
(Xpath./p1:test/variable = "3")
Group B:
(Xpath./p1:test/variable2 = "1") OR
(Xpath./p1:test/variable2 = "2") OR
(Xpath./p1:test/variable2 = "3")
Combined:
((Xpath./p1:test/variable = "1") OR
(Xpath./p1:test/variable = "2") OR
(Xpath./p1:test/variable = "3")) AND
((Xpath./p1:test/variable2 = "1") OR
(Xpath./p1:test/variable2 = "2") OR
(Xpath./p1:test/variable2 = "3"))
The combined expressions does not work. If variable = 1 and variable2 = 99 it still routes to the receiver.
Any ideas?
Br
Hi, Max,
I believe the "OR" operation does not work quite well when split as this. I did suffer with a similar scenario some time ago.
What worked for me was to group the "OR" operations in separate XPath clauses into a single expression bound by an outlining "AND" argument, such as:
Group A:
(/p1:test[(p1:variable = "1" OR p1:variable = "2" OR p1:variable = "3")]
"AND"
Group B:
(/p1:test[(p1:variable2 = "1" OR p1:variable2 = "2" OR p1:variable2 = "3")]
Do not forget to use "EX" operation and leave the right operand empty in each line.
Regards,
Eduardo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your replies! It is now working. Actually it was a combination of the grouping like Eduardos suggestion, but also lower case operators were needed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Max,
Have you entered a space between each operator and each operand, manly in the AND that is the only change with the parenthesis?
You can try something more, in below versions there was a restrictions like the operator should be in lowercase, i think it is not your case for your syntaxes, but you can try.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.