[ANNOUNCEMENT] XML_SaxFilters-0.3.0 (beta) Released.

From: Date: Tue, 20 Apr 2004 12:27:28 +0000
Subject: [ANNOUNCEMENT] XML_SaxFilters-0.3.0 (beta) Released.
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11976@lists.php.net to get a copy of this message
The new PEAR package XML_SaxFilters-0.3.0 (beta) has been released at http://pear.php.net/. Release notes ------------- WARNING: lots of API breakage! * API breakage to conform to PEAR namespacing standards * API breakage to remove dependance of base PEAR class. PEAR.php is now only included on error * API breakage on handler names - shortened for easier use * API breaking on IO classes to add correct PEAR namespace * Renamed StructReader and StructWriter to ListReader and ListWriter * Added startDoc and endDoc handlers for start and end of parsing * Added handler for processing instructions * Added utility function for building filter chains * HTMLSaxParser open handler leakiness to allow third empty argument * HTMLSaxParser gets two additional handlers, escape and jasp * HTMLSaxParser should now behave the same as Expat, for linefeed and entities * FilterBuilder and FilterMap modifications Package Info ------------- XML_SaxFilters provides a foundation for using Sax filters in PHP. The original code base was developed by Luis Argerich and published at phpxmlclasses.sourceforge.net/show_doc.php?class=class_sax_filters.html. Luis discussed how SaxFilters work, using the Sourceforge classes as an example, in Chapter 10 of Wrox "PHP 4 XML". Luis kindly gave permission to modify the code and license for inclusion in PEAR. This version of the Sax Filters makes significant changes to Luis's original code (backwards compatibility is definately broken), seperating abstract classes from interfaces, providing interfaces for data readers and writers and providing methods to help parse XML documents recursively with filters (for example AbstractFilter::setParent()) for documents where the structure can vary significantly. Sax Filtering is an approach to making parsing XML documents with Sax modular and easy to maintain. The parser delegates events to a child filter which may in turn delegate events to another filter. In general it's possible to implement filters for a document which are as flexible and powerful as DOM. For some discussions on Sax filtering try; http://www.cafeconleche.org/books/xmljava/chapters/ch08.html (Java) http://www-106.ibm.com/developerworks/xml/library/x-tipsaxflex.html (Python) http://www.xml.com/pub/a/2001/10/10/sax-filters.html (Perl) The API provided by XML_SaxFilters is a little different from that commonly used in other languages, providing the concepts of "parent" and "child". A parent of the current filter is the filter (or parser) "upsteam" which receive XML event notifications before the current filter. A "child" is a filter "downstream" of the current filter (or parser) to which XML events are delegated. The top of the "family tree" of filters is always the parser itself, which can have children but cannot have parents. Filters can have parents and children. The parsers themselves never handle any XML events personally but always delegate to a filter. The parser accepts an object implementing the reader interface from which it streams the XML. The filters can be given an object implementing the writer interface to write output to. For an example of SAX filters in action with PHP try; http://www.phppatterns.com/index.php/article/articleview/48/1/2/ (example uses Luis Argerich original Sax Filters). Related Links ------------- Package home: http://pear.php.net/package/XML_SaxFilters Changelog: http://pear.php.net/package-changelog.php?package=XML_SaxFilters Download: http://pear.php.net/get/XML_SaxFilters-0.3.0.tgz Authors ------------- Harry Fuecks <hfuecks@phppatterns.com> (lead)

« previous php.pear.general (#11976) next »