Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
1.4.x
-
None
-
None
-
Operating System: All
Platform: All
-
16276
Description
Namespace nodes inherited from ancestor elements are being re-declared even
when a namespace further down the tree has over-ridden the local name.
e.g.
z.xml :
<?xml version="1.0" encoding="UTF-8"?>
<foo:Root xmlns:bar="http://example.org/bar" xmlns:foo="http://example.org/foo">
<bar:Something xmlns:bar="http://example.org/bar"
xmlns:foo="http://example.org/foo">
</bar:Something>
</foo:Root>
Using XPathWrapper from Oct 21 interim release:
berin@zeus:bin$ ./XPathWrapper /tmp/z.xml
/foo:Root/bar:Something/namespace::bar[1] "parent::node()/namespace::* |
self::node()"
the result set has 5 strings
item 1= "http://www.w3.org/XML/1998/namespace"
item 2= "http://example.org/bar"
item 3= "http://example.org/foo"
item 4= "http://example.org/bar"
item 5= "http://example.org/foo"
The [1] index should not be required for namespace::bar, as there should only
be one definition of bar.