libxml2dom

README.txt

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