If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

DOM 3 XPath does not work if using default namespace

RESOLVED INVALID

Status

()

Core
DOM: Core & HTML
RESOLVED INVALID
15 years ago
5 years ago

People

(Reporter: Harri Hohteri, Assigned: anthonyd)

Tracking

Trunk
All
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030401
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030401

If trying to do an XPath search on a document which has a default namespace
defined e.g. <levelone xmlns="urn::hl7-org/cda" ...> the XPath engine will fail
to  find element "//levelone". If the default namespace is set to e.g. xmlns:cda
the "//levelone" will work. Even if I try to create a namespace resolver where I
set xmlns:cda to "urn::hl7-org/cda" I still cannot find anything with
"//cda:levelone".

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
(Reporter)

Comment 1

15 years ago
Created attachment 120571 [details]
HTML file which demonstrates the bug, you need the other files too
(Reporter)

Comment 2

15 years ago
Created attachment 120572 [details]
the xml document needed for the example
(Reporter)

Comment 3

15 years ago
Created attachment 120573 [details]
The namespace definer XML file for the example.
(Reporter)

Comment 4

15 years ago
This behavior is by design on XPath 1.0.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
Component: DOM: Traversal-Range → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.