Your problem may be that jQuery does not use the "* NS" flavor of DOM selectors (for example, getElementsByTagNamecompared to getElementsByTagNameNS).
I wrote hack some time ago for imbuing jQuery with this feature (especially for XHTML context). Perhaps you can adapt it to your needs:
https://gist.github.com/352210
function addNS(obj, methods) {
var proto = obj.constructor.prototype;
var ns = document.documentElement.namespaceURI;
for (var methodName in methods) {
(function () {
var methodNS = proto[methodName + "NS"];
if (methodNS) {
proto[methodName] = function () {
var args = Array.prototype.slice.call(arguments, 0);
args.unshift(ns);
return methodNS.apply(this, args);
};
}
})();
}
}
if (document.constructor) {
addNS(document, {
createElement: 1,
getElementsByTagName: 1
});
addNS(document.createElement("div"), {
getElementsByTagName: 1,
getAttribute: 1,
getAttributeNode: 1,
removeAttribute: 1,
setAttribute: 1
});
}
source
share