libxml2dom

README.txt

256:85fbc707a9b9
2007-03-25 paulb [project @ 2007-03-25 01:59:19 by paulb] Fixed NamedNodeMap so that it actually produces attribute details instead of failing due to a missing impl attribute. Added documentElement to Document. Fixed the events module and added some functionality. Expanded the svg module's functionality. Updated release information.
     1 Introduction
     2 ------------
     3 
     4 See docs/index.html for the libxml2dom documentation.
     5 
     6 Compatibility Warnings
     7 ----------------------
     8 
     9 From libxml2dom 0.4, nodeValue now returns different results in some cases.
    10 Previously, it was possible to get the textual contents of an element using
    11 the nodeValue property, although this is incompatible with the DOM
    12 specifications. Instead, you should now use the textContent property to get
    13 such data.
    14 
    15 Contact, Copyright and Licence Information
    16 ------------------------------------------
    17 
    18 The current Web page for libxml2dom at the time of release is:
    19 
    20 http://www.boddie.org.uk/python/libxml2dom.html
    21 
    22 Copyright and licence information can be found in the docs directory - see
    23 docs/COPYING.txt and docs/LICENCE.txt for more information.
    24 
    25 Dependencies
    26 ------------
    27 
    28 libxml2     Tested with libxml2 2.6.17.
    29             Use --with-python=<path to python executable> if building from
    30             source. Previous releases of libxml2 in the 2.6 series may work,
    31             but releases before 2.6.16 are not recommended.
    32 
    33             For Windows users, see also the packages for libxml2, available
    34             from the following site:
    35 
    36             http://users.skynet.be/sbi/libxml-python/
    37 
    38 Python      Tested with Python 2.4.
    39             Python releases from 2.2 onwards should be compatible with
    40             libxml2dom. The principal requirement from such releases is the
    41             new-style class support which permits the use of properties in
    42             the libxml2dom implementation.
    43 
    44 Testing
    45 -------
    46 
    47 Some of the tests require libxml2macro.py to be run on the test source code
    48 first. Read the docstrings for the various test files before attempting to run
    49 any of them. See also docs/NOTES_libxml2macro.txt for more information. Note
    50 that such tests are retained for historical purposes and/or curiosity since
    51 libxml2macro.py is no longer supported.
    52 
    53 Issues
    54 ------
    55 
    56 The presence of xmlns attributes in serialised documents was called into
    57 question, and the tests/namespace*.py files attempt to show the current
    58 behaviour of libxml2dom.
    59 
    60 Use of importNode seems to cause some kind of memory issue, probably related
    61 to nodes being shared across documents. This was observed in libxml2 2.6.0 but
    62 appears to be fixed in libxml2 2.6.16.
    63 
    64 Even compared to minidom, importNode may seem very slow (even the
    65 libxml2dom.macrolib implementation, too). A way is needed to get libxml2 to do
    66 the node copying itself.
    67 
    68 New in libxml2dom 0.4.2 (Changes since libxml2dom 0.4.1)
    69 --------------------------------------------------------
    70 
    71   * Added missing impl attribute to NamedNodeMap, fixing attribute retrieval.
    72   * Added documentElement to Document.
    73   * Fixed and expanded the events module.
    74   * Added lots of functionality to the svg module.
    75 
    76 New in libxml2dom 0.4.1 (Changes since libxml2dom 0.4)
    77 ------------------------------------------------------
    78 
    79   * Fixed the absence of CDATA node creation and importing.
    80 
    81 New in libxml2dom 0.4 (Changes since libxml2dom 0.3.6)
    82 ------------------------------------------------------
    83 
    84   * Changed the nodeValue property to return None for various node types, as
    85     specified in the DOM specification (Level 3).
    86   * Fixed various "not supported" exceptions and added tests which can raise
    87     "wrong document" exceptions.
    88   * Introduced an Implementation class, permitting specialised node creation.
    89   * Added SVG-specific document support.
    90   * Made parseURI work for HTML documents.
    91   * Fixed getElementsByTagName(NS), as reported by Christian Seiler.
    92   * Fixed previousSibling, nextSibling and parentNode crashes using
    93     suggestions from Christian Seiler.
    94   * Reintroduced node comparisons using suggestions from Christian Seiler.
    95   * Fixed the absence of the CDATA node type.
    96   * Added the textContent property to nodes.
    97   * Added a getDOMImplementation function.
    98   * Added an experimental events module.
    99   * Added an htmlencoding parameter to the parse functions, as requested by
   100     Iliyan Peychev.
   101 
   102 New in libxml2dom 0.3.6 (Changes since libxml2dom 0.3.5)
   103 --------------------------------------------------------
   104 
   105   * Added cloneNode almost as a synonym for importNode (which, unlike in the
   106     DOM specification, is present on all nodes).
   107   * Introduced Debian stable package details - suggested by Robert Siemer.
   108   * Changed libxml2mod import details to try libxmlmods - suggested by Lucian
   109     Wischik.
   110 
   111 New in libxml2dom 0.3.5 (Changes since libxml2dom 0.3.4)
   112 --------------------------------------------------------
   113 
   114   * Fixed nodeType for HTML document elements - reported by Robert Siemer.
   115   * Fixed string results from XPath expressions - reported by Robert Siemer.
   116 
   117 New in libxml2dom 0.3.4 (Changes since libxml2dom 0.3.3)
   118 --------------------------------------------------------
   119 
   120   * Attempted to introduce generated prefixes for attributes having namespaces
   121     but whose names are unprefixed.
   122   * Added support for xmlns attribute retrieval (getAttributeNS) and detection
   123     (hasAttributeNS).
   124   * Added the length attribute to NamedNodeMap; renamed the length method on
   125     NodeList, adding a length attribute.
   126 
   127 New in libxml2dom 0.3.3 (Changes since libxml2dom 0.3.2)
   128 --------------------------------------------------------
   129 
   130   * Removed redundant weakref usage.
   131   * Added explicit copyright and licensing information to source files.
   132 
   133 New in libxml2dom 0.3.2 (Changes since libxml2dom 0.3.1)
   134 --------------------------------------------------------
   135 
   136   * Improved the xmlns attribute creation controls.
   137 
   138 New in libxml2dom 0.3.1 (Changes since libxml2dom 0.3)
   139 ------------------------------------------------------
   140 
   141   * Fixed empty namespace declarations on elements created with namespaceURI
   142     set to None. Previously, such declarations were missing.
   143   * Fixed attribute creation and introduced stricter controls over the
   144     construction of xmlns attributes.
   145 
   146 New in libxml2dom 0.3 (Changes since libxml2dom 0.2.4)
   147 ------------------------------------------------------
   148 
   149   * Imposed much stricter tests on strings used with the libxml2dom API.
   150     Strings given as arguments to methods and functions must now only contain
   151     ASCII characters; any other character data must be provided as Unicode
   152     objects. This change fixes various issues with XPath expressions, and
   153     quite probably various other things.
   154   * Fixed parentNode on Document objects (which caused xml.dom.ext.PrettyPrint
   155     to crash).
   156   * Added some support for the doctype attribute and related information.
   157   * libxml2dom is now licensed under the LGPL - see docs/COPYING.txt for
   158     details.
   159 
   160 New in libxml2dom 0.2.4 (Changes since libxml2dom 0.2.3)
   161 --------------------------------------------------------
   162 
   163   * Fixed Unicode conversions in the Node's xpath method.
   164 
   165 New in libxml2dom 0.2.3 (Changes since libxml2dom 0.2.2)
   166 --------------------------------------------------------
   167 
   168   * Fixed the parse function's docstring.
   169   * Added the owner element to obtained attribute nodes.
   170   * Fixed Debian package changelog distribution identifiers.
   171 
   172 New in libxml2dom 0.2.2 (Changes since libxml2dom 0.2.1)
   173 --------------------------------------------------------
   174 
   175   * Fixed exception raising in parseURI, adding a docstring to explain the
   176     current limitations around HTML parsing.
   177 
   178 New in libxml2dom 0.2.1 (Changes since libxml2dom 0.2)
   179 ------------------------------------------------------
   180 
   181   * Moved libxml2macro script to the tools directory.
   182   * Added getElementsByTagNameNS.
   183   * Added a normalize implementation.
   184   * Added HTML parsing support.
   185   * Added prettyprinting support.
   186   * Fixed parseURI.
   187   * Introduced better testing for Unicode objects, especially since things
   188     like rdflib like to subclass the unicode type, and it might be more
   189     convenient to detect such subclasses and convert their values
   190     automatically.
   191   * Improved some of the API documentation.
   192   * Introduced better suppression of warnings, network access, and other
   193     potentially intrusive libxml2 features.
   194   * Reorganised the documentation, expanding the README.txt file at the
   195     expense of the HTML documentation, but removing older, less relevant
   196     information.
   197   * Added Debian package support.
   198 
   199 New in libxml2dom 0.2 (Changes since libxml2dom 0.1.3)
   200 ------------------------------------------------------
   201 
   202   * Adopted libxml2macro code within the libxml2dom classes, removing any
   203     dependencies on the libxml2 module - this makes everything much faster
   204     and virtually removes any necessity to use libxml2macro.
   205   * Improved attribute and document node handling.
   206   * Introduced document reference management.
   207   * Introduced NodeList wrapper objects.
   208 
   209 New in libxml2dom 0.1.3 (Changes since libxml2dom 0.1.2)
   210 --------------------------------------------------------
   211 
   212   * Fixed createElement.
   213   * Introduced experimental libxml2macro tools, tests and libraries.
   214 
   215 New in libxml2dom 0.1.2 (Changes since libxml2dom 0.1.1)
   216 --------------------------------------------------------
   217 
   218   * Fixed getAttributeNode and getAttributeNodeNS.
   219   * Added comment node creation.
   220   * Fixed empty namespace usage with elements and attributes.
   221   * Introduced usage of the libxml2 file and memory parsing features.
   222   * Introduced suppression of DTD retrieval and validation as the default
   223     behaviour.
   224   * Added experimental XPath method support.
   225 
   226 New in libxml2dom 0.1.1
   227 -----------------------
   228 
   229   * Fixed text node creation.
   230   * Fixed setAttributeNS.
   231   * Added encoding parameters to convenience methods.
   232   * Added the missing previousSibling property.
   233   * Added release number to the package.
   234 
   235 Release Procedures
   236 ------------------
   237 
   238 Update the libxml2dom/__init__.py and libxml2dom/macrolib/__init__.py
   239 __version__ attributes.
   240 Change the version number and package filename/directory in the documentation.
   241 Change code examples in the documentation if appropriate.
   242 Update the release notes (see above).
   243 Update the package release notes (in the packages directory).
   244 Check the setup.py file and ensure that all package directories are mentioned.
   245 Check the release information in the PKG-INFO file.
   246 Tag, export.
   247 Archive, upload.
   248 Make packages (see below).
   249 Update PyPI, PythonInfo Wiki, Vaults of Parnassus entries.
   250 
   251 Making Packages
   252 ---------------
   253 
   254 To make Debian-based packages:
   255 
   256   1. Create new package directories under packages if necessary.
   257   2. Make a symbolic link in the distribution's root directory to keep the
   258      Debian tools happy; choose one of the following:
   259 
   260      ln -s packages/ubuntu-hoary/python2.4-libxml2dom/debian/
   261      ln -s packages/debian-stable/python2.3-libxml2dom/debian/
   262 
   263   3. Run the package builder:
   264 
   265      dpkg-buildpackage -rfakeroot
   266 
   267   4. Locate and tidy up the packages in the parent directory of the
   268      distribution's root directory.