diff --git a/mozilla/extensions/transformiix/source/xpath/AttributeExpr.cpp b/mozilla/extensions/transformiix/source/xpath/AttributeExpr.cpp index 1bb513b9667..509c251037c 100644 --- a/mozilla/extensions/transformiix/source/xpath/AttributeExpr.cpp +++ b/mozilla/extensions/transformiix/source/xpath/AttributeExpr.cpp @@ -128,14 +128,16 @@ MBool AttributeExpr::matches(Node* node, Node* context, ContextState* cs) { Node* parent = cs->getParentNode(node); if (parent) XMLDOMUtils::getNameSpace(prefixForNode, (Element*)parent, nsForNode); String nsForTest; - cs->getNameSpaceURIFromPrefix(this->prefix,nsForTest); + if (prefix.length()) + cs->getNameSpaceURIFromPrefix(prefix, nsForTest); if (!nsForTest.isEqual(nsForNode)) return MB_FALSE; return localName.isEqual(this->name); } else { if (isNamespaceWild) return nodeName.isEqual(this->name); String nsForTest; - cs->getNameSpaceURIFromPrefix(this->prefix, nsForTest); + if (prefix.length()) + cs->getNameSpaceURIFromPrefix(prefix, nsForTest); if (nsForTest.length() > 0) return MB_FALSE; return nodeName.isEqual(this->name); } diff --git a/mozilla/extensions/transformiix/source/xpath/ElementExpr.cpp b/mozilla/extensions/transformiix/source/xpath/ElementExpr.cpp index 0f9d54f2b8d..4994b631909 100644 --- a/mozilla/extensions/transformiix/source/xpath/ElementExpr.cpp +++ b/mozilla/extensions/transformiix/source/xpath/ElementExpr.cpp @@ -111,7 +111,8 @@ MBool ElementExpr::matches(Node* node, Node* context, ContextState* cs) { //-- compare namespaces String nsURI; // use context to get namespace for testing against - cs->getNameSpaceURIFromPrefix(this->prefix, nsURI); + if (prefix.length()) + cs->getNameSpaceURIFromPrefix(prefix, nsURI); String nsURI2; String prefix2;