1.1 --- a/libxml2dom/__init__.py Sat Feb 16 20:09:22 2008 +0000
1.2 +++ b/libxml2dom/__init__.py Sat Feb 16 20:10:01 2008 +0000
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 DOM wrapper around libxml2, specifically the libxml2mod Python extension module.
1.6
1.7 -Copyright (C) 2003, 2004, 2005, 2006, 2007 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 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 @@ -19,7 +19,7 @@
1.13 with this program. If not, see <http://www.gnu.org/licenses/>.
1.14 """
1.15
1.16 -__version__ = "0.4.5"
1.17 +__version__ = "0.4.6"
1.18
1.19 from libxml2dom.macrolib import *
1.20 from libxml2dom.macrolib import \
1.21 @@ -488,6 +488,12 @@
1.22 # NOTE: To be finished.
1.23
1.24 def xpath(self, expr, variables=None, namespaces=None):
1.25 +
1.26 + """
1.27 + Evaluate the given expression 'expr' using the optional 'variables' and
1.28 + 'namespaces' mappings.
1.29 + """
1.30 +
1.31 ns = {}
1.32 ns.update(default_ns)
1.33 ns.update(namespaces or {})
1.34 @@ -499,6 +505,18 @@
1.35 else:
1.36 return result
1.37
1.38 + # Other extensions to the usual PyXML API.
1.39 +
1.40 + def xinclude(self):
1.41 +
1.42 + """
1.43 + Process XInclude declarations within the document, returning the number
1.44 + of substitutions performed (zero or more), raising an XIncludeException
1.45 + otherwise.
1.46 + """
1.47 +
1.48 + return Node_xinclude(self._node)
1.49 +
1.50 # Convenience methods.
1.51
1.52 def toString(self, encoding=None, prettyprint=0):