[Subversion] / PEAK / src / peak / util / SOX.py |
No default branch
Bookmark a link to HEAD:
(view)
(download)
(as text)
In order to support obtaining the line and column locations of problems in XML files, we are now using Python 2.4's version of the 'pyexpat' module, built as 'peak.util.pyexpat'. Also, added "empty" option to negotiating XML parser, so that tags which don't want any children can force an error if a child element appears within them.
Initial, undocumented draft of a new "negotiating parser" for SOX, that allows dynamic communication between XML elements and attributes, so that we can parse sophisticated attribute-based languages like "PWT Reloaded", or even ZPT. The implementation is exhaustively tested, but the true test will be when we hook it up to peak.config to do its lookups, in order to implement ideas like these: http://www.eby-sarna.com/pipermail/peak/2004-June/001478.html http://www.eby-sarna.com/pipermail/peak/2004-August/001713.html
Change SOX to do a literal pass-through of any unrecognized text such as , », <!DOCTYPE> declarations, etc. Fix typos in SOX and peak.web.templates, and adjust tests since literal pass-thru now includes top-level whitespace following the document-level tag.
Slight adjustments to 'SOX.IXMLBuilder' interface: give all methods an '_xml_' prefix to avoid naming conflicts, and pass the parser as a parameter to possibly support getting file/line/column info in the future. (XXX There really should be an 'IXMLParser' added to define the parser interface.)
Make SOX and p.w.t use the same expat-based XML processor, as a prelude to adding XML configuration/serialization. See 'CHANGES.txt' for impact details.
Finished switchover to using protocols.advise() API to declare interfaces.
DEPRECATED use of '__implements__' and '__class_implements__' to declare support for interfaces. Use 'implements()', 'classProvides()', 'directlyProvides()', 'moduleProvides()', etc. to do this now; they are now available automatically from 'peak.api'. Please note that alpha 2 will *not* support the use of __implements__ attributes at all! Start using the APIs for this *now*, even if you're using alpha 1 (which at least supports the 'implements()' and 'classProvides()' functions).
Normalized whitespace.
PEAK-Zope namegeddon, phase 1. Routed all imports of Interface and Persistence through 'peak.interface' and 'peak.persistence'. Future phases will replace the bundled Interface and Persistence packages with the latest and greatest from Zope X3, updating the plugpoint modules appropriately. Also, this arrangement will let us experiment with a PEP 246 implementation as part of 'peak.interface', and prepare for the coming "interface declarations" of Zope X3.
Added 'IndentedXML' class that writes nicely formatted XML.
Streamlined SOX namespace support for better performance in the common case; revised XMI reading to load namespace data.
Added XML namespace support to SOX; this is needed for writing XMI 1.1 and higher versions, at least to verify the correct namespace prefix for output tags.
Fixes to use latest Zope 3 Interface API.
Pre-release documentation and cleanup sweep, part 4! Cleaned up the Utils directory, added docstrings, and also removed the forced load of the TW.SEF package when you import from TW.API. (It's been replaced with a lazy import.) This sonofagun just might ship this weekend.
'Utils' Package Created Created new 'Utils' package by splitting 'TW.Utilities' into seperate modules and moving 'TW.SOX' to 'TW.Utils.SOX'. From here on out, the 'Utils' package will be for modules which: * Do not rely on any non-Utils TransWarp modules (but may rely on outside packages such as kjBuckets) * Are not needed by "consumers" of TransWarp APIs in order to use non-Utils TW modules In other words, 'TW.Utils' is for utility modules needed by TransWarp, but which may also be useful outside of TransWarp. 'TW.SOX' was moved to 'TW.Utils.SOX' since it fits this description. 'TW.Callbacks', however, is staying put because in the future some TransWarp APIs may require parameters which implement 'ICallback'. Both 'TW.Callbacks' and 'TW.Utils.SOX' are useful outside of the TransWarp package itself. The difference is that 'TW.Utils.SOX' is never needed by a caller in order to use TransWarp's APIs, but 'TW.Callbacks' might be. Some additional packaging changes will be coming; see the TransWarp mailing list for details. Other Changes While doing the package re-org, I also cleaned up a few minor nits caused by the previous requirement for compatibility with Python 1.5.2, and did some prep for type/class unification in Python 2.2. Last, but not least, I stomped all the remaining uses of the 'string' module and replaced them with string method calls. I'm not positive, but this appears to have sped things up just a teensy bit.
cvs-admin@eby-sarna.com Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |