XPath to get amount of all attributes with the specific prefix returns incorrect value

Confirmed Issue #8438339 • Assigned to Travis L.

Details

Author
Oleksiy S.
Created
Aug 9, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
13.10586
Reports
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

Steps to reproduce

Expected result

alert with value 2 (because in the example we have only two attributes with prefix x: )

Actual result

alert with value 3

HII:

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Brad E.”

      Changed Assigned To to “Christian F.”

      Changed Assigned To to “Travis L.”

      Changed Status to “Confirmed”

      Changed Steps to Reproduce

    • This bug seems to be the same as https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/3739767/

      That bug is fixed but not yet flighted.

      In 3739767, the XPath to get the namespace attributes //@x:* retrieves all the attributes rather than just those in the requested namespace.

      The current bug report just wraps count() around the attribute retrieval. The XML has 3 attributes but only 2 in the x: namespace. the 767 bug wrongly retrieves the three attributes and count returns the corresponding tally.

      So this bug should be fixed not flighted.

    • Ooops. I’ll back off on the 767 bug because that was supposedly fixed two years ago but the bug is still around.

      I’m seeing the same problem without the count. A simple XPath for namespaced attributes returns too many attributes.

      I read an SVG file that has attributes in the i: namespace.

      I use svgdocument.createNSResolver(svgdocument.documentElement) to build a resolver for the i: namespace.

      svgdocument.evaluate("//@i:*", …)

      returns all the attributes in the file instead of just the i: attributes.

      Code works on Chrome

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

    Sign in