Is there an exclusive OR ‘XOR’ in XPath1.0 ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use this XPath 1.0 expression:
Always try to avoid the
!=operator, because it has an unexpected meaning/behavior when one or both of its arguments are node-sets.In XSLT 2.0 or XQuery 1.0 one can write this as a function and then use just the function in any XPath expression. Below is an XSLT 2.0 function definition for
xorand a small example of using this function:when this transformation is applied on any XML document (not used), the wanted, correct result is produced: