1.1 --- a/libxml2dom/xmpp.py Sun Jan 26 21:53:15 2014 +0100
1.2 +++ b/libxml2dom/xmpp.py Sun Jan 26 22:55:18 2014 +0100
1.3 @@ -10,7 +10,7 @@
1.4 See: http://www.xmpp.org/rfcs/rfc3920.html
1.5 See: http://www.xmpp.org/rfcs/rfc3921.html
1.6
1.7 -Copyright (C) 2007, 2009 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2007, 2009, 2014 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This program is free software; you can redistribute it and/or modify it under
1.11 the terms of the GNU Lesser General Public License as published by the Free
1.12 @@ -159,26 +159,23 @@
1.13
1.14 class XMPPNode(libxml2dom.Node):
1.15
1.16 - "Convenience modifications to nodes specific to libxml2dom.xmpp."
1.17 -
1.18 - def xpath(self, expr, variables=None, namespaces=None):
1.19 + "An XMPP-specific node."
1.20
1.21 - """
1.22 - Evaluate the given 'expr' using the optional 'variables' and
1.23 - 'namespaces'. If not otherwise specified, the prefixes given in the
1.24 - module global 'default_ns' will be bound as in that dictionary.
1.25 - """
1.26 -
1.27 - ns = {}
1.28 - ns.update(default_ns)
1.29 - ns.update(namespaces or {})
1.30 - return libxml2dom.Node.xpath(self, expr, variables, ns)
1.31 + pass
1.32
1.33 class XMPPDocument(libxml2dom._Document, XMPPNode):
1.34
1.35 "An XMPP document fragment."
1.36
1.37 - pass
1.38 + def __init__(self, node, impl, namespaces=None):
1.39 +
1.40 + """
1.41 + Initialise the document with the given 'node', implementation 'impl',
1.42 + and 'namespaces' details.
1.43 + """
1.44 +
1.45 + libxml2dom._Document.__init__(self, node, impl, None)
1.46 + self._update_namespaces([default_ns, namespaces])
1.47
1.48 class XMPPElement(XMPPNode):
1.49 pass