on ‎2007 Jan 16 2:49 PM
What's the use of "|" (pipe) symbol available in the calculations area of the Link editor? I thought it was an "OR" operator. But it doesn't seem to work as an "OR"
Any ideas? I understand "&" is used to do a concatenate.
Request clarification before answering.
In XPath, the "|" (pipe) symbol is used as << union >> between two or more node-sets, where as "&" (amp) is used for string concatenation (like Rick specified above).
(An XPath expression returns either a node-set, a string, a Boolean, or a number.)
That being said, if you have for example two nodes //HItemp (high temperatures) and //LOtemp (low temperatures) the expression "//HItemp | //LOtemp" returns a node-set with all high and low temperature elements.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the official description of the various operators (I authored much of the code in xMII that processes these expressions. ).
and : logical AND
or : logical OR
! : logical NOT
& : string concatentation
<, >, <=, >=, ==, != : logical comparison
*, /, +, - : basic arithmetical operators
% = modulo operator
^ = exponential operator
Inside of XPath expressions, the standard XPath rules apply.
- Rick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi srini,
<b>" | "</b> this symbol working us a union operator when you are using xpath fumctions.
Regards,
P.S.Kishore kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
As per my understanding the link editor is based on xPATH. I have gone through some tutorial pages of xpath.
In the logical expression thread you intimated that <b>or</b> and <b>and</b> is working as loical operators.
In the same way | this symbol is used for the purpose of union operator.
I am also working to make a good example. If you know something, plase update here.
Some one else is asked for the not opertor. Try with this.
<b>not()</b>
Regards,
P.S.Kishore kumar
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.