GNOME Bugzilla – Bug 314358
Added xml:id attributes not considered to be IDs
Last modified: 2009-08-15 18:40:50 UTC
Version details: Debian package version: 2.6.20-1 Distribution/Version: Debian GNU/Linux unstable Using the Python bindings, xml:id attribute values are not considered to be IDs for the purposes of (at least) the XPath id function. To reproduce, add an xml:id attribute to an element in an existing doc: ns = root.searchNsByHref(doc, 'http://www.w3.org/XML/1998/namespace') prop = elem.setNsProp(ns, 'id', 'b') Then try finding that element using the XPath id function: ctxt = doc.xpathNewContext() print bool(ctxt.xpathEval('id("b")')) And False is printed. The expected result is that it finds the element and prints True. The potentially useful doc.addID(None, 'b', prop) doesn't work because addID is not generated in the Python bindings.
Okay I fixed this (and a bunch of other ID related problems) in CVS, thanks ! Daniel
Fantastic, Daniel - thank you!
This should be closed by release of libxml2-2.6.21, thanks, Daniel