Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7421301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:23:07+00:00 2026-05-29T08:23:07+00:00

In XQuery, (foo, bar) = (foo, bar) yields the value true . That seems

  • 0

In XQuery,

("foo", "bar") = ("foo", "bar")

yields the value true. That seems obvious. But I noticed that

("foo", "bar") != ("foo", "bar")

also yields true, which I found rather surprising. I know that I can negate = with not($x = $y) and I’ve noticed that = has some kind of set intersection semantics, but can anyone explains the semantics of !=, and/or provide a reference for it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:23:09+00:00Added an answer on May 29, 2026 at 8:23 am

    This can be found in the documentation for XQuery under section “3.5.2 General Comparisons”.

    The following example contains two general comparisons, both of which
    are true. This example illustrates the fact that the = and !=
    operators are not inverses of each other.

    (1, 2) = (2, 3)
    (1, 2) != (2, 3)
    

    Reading into the reasoning, it reads to me as if the rules of Atomization are to blame here. If the elements are untypedAtomic, then the parser is free to “guess” at how the comparison should be made which allows for the difference in operations based on the elements themselves rather than on any operator behavior.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write an XQuery which would find all text nodes that
I'm attempting to create an xquery expression that will return selected nodes but will
I want to use the Saxon-B XQuery class in my ASP.Net website. But my
I'm pretty new to XQuery and I'm trying to write an example function that
I'm having difficulty getting XQuery to work. I downloaded Saxon-HE 9.2. It seems to
I am looking for an example of a XQuery that returns the xpath for
I found lot of open source XML databases (TPOX, Timber , DBXML), but they
So I have an XQuery that looks something like this: for $i in /*:rootElement
I have this XQuery element that is giving me an error: let $mx :=
Here is an example of the XQuery output that I get: <clinic> <Name xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance>Healthy

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.