diff genshi/core.py @ 278:d6c58473a9d0 trunk

Fix the handling of namespace context for match templates.
author cmlenz
date Mon, 02 Oct 2006 10:49:32 +0000
parents 84168828b074
children a99666402b12
line wrap: on
line diff
--- a/genshi/core.py
+++ b/genshi/core.py
@@ -146,14 +146,14 @@
             return output.encode(encoding, errors)
         return output
 
-    def select(self, path):
+    def select(self, path, namespaces=None, variables=None):
         """Return a new stream that contains the events matching the given
         XPath expression.
         
         @param path: a string containing the XPath expression
         """
         from genshi.path import Path
-        return Path(path).select(self)
+        return Path(path).select(self, namespaces, variables)
 
     def serialize(self, method='xml', **kwargs):
         """Generate strings corresponding to a specific serialization of the
@@ -509,6 +509,9 @@
     def __contains__(self, qname):
         return qname.namespace == self.uri
 
+    def __ne__(self, other):
+        return not self == other
+
     def __eq__(self, other):
         if isinstance(other, Namespace):
             return self.uri == other.uri
Copyright (C) 2012-2017 Edgewall Software