Using document.evaluate with an XPath targeting an EMPTY namespaced attribute does not return the expected result

Confirmed Issue #9544701 • Assigned to Travis L.

Details

Author
Martijn
Created
Oct 26, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
Standard affected
XML Path Language (XPath)

Found in build #
38.14393
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

If attempting to find all nodes with a specific namespaced attribute, the result is empty for those nodes whose attribute is an empty string.

<a my:attr=""/> is found by //*[@my:attr=""] but not by //*[@my:attr]. Expected result is that both expression find the node. I believe XPath considers the presence of a node/attribute to be truthy regardless of whether it is empty.

Note, this is NOT the same as the fixed https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/3739767/

See simple test case here: http://codepen.io/MartijnR/pen/xEZjPQ?editors=0011

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Brad E.”

      Changed Assigned To to “Travis L.”

      Changed Status to “Confirmed”

    You need to sign in to your Microsoft account to add a comment.

    Sign in