Version: 2.0.6 Release date: 31-Mar-2006 Description: A maintenance release for 2.0, including some critical fixes. Problems fixed: * Fixed a bug in dtd.ElementIdMap; was missing entries on rehash() (and that was causing an error from sanity check) * Fixed a bug in XML name parsing -- was not acception some valid (albeit seldom used) name characters (0xF6 for example) * [WSTX-45] WstxEventReader threw an exception at EOF, instead of returning null (as per specs) (Reported by Arjen P) * [WSTX-46]: Trying to write another root element produced an incorrect error message (reported by John K) * Fixed a problem with P_OUTPUT_VALIDATE_STRUCTURE; setProperty() was setting property (reported by Steve Y) * Improved handling of output with multiple roots: if not checking structure, should not throw an exception. == History: == 2.0.5: [22-Jan-2006] Problems fixed: * [WSTX-28] Feature (WstxInputProperties.P_CUSTOM_INTERNAL_ENTITIES) did not work properly [reported by Bartlomiej R] * [WSTX-29] NamespaceContext returned by StartElement events was sometimes empty. * [WSTX-39] (partial fix): If namespace declarations were declared in DTD (to support legacy documents or processors), Woodstox would not recognized their special status, and could add default values for those as if they were regular attributes. Now such declarations will basically be ignored, which usually should work acceptably. * Problem with Namespace and EntityRerences event; were returning incorrect event type (CHARACTERS and ENTITY_REFERENCE, respectively) * Problems with external/internal DTD subset combination as identified by unit tests (attribute, element combination, precedence). * A bug in WordResolver, which could cause ArrayIndexOutOfBoundsException for enumeration/notation attributes with just one value. * Fixed a problem with bootstrapping UTF-16 streams; if "UTF-16" explicitly specified as encoding, underlying JDK reader did not always use correct endianness. 2.0.4: [16-Dec-2005] Problems fixed: * [WSTX-19]: Unnecessary default namespace declarations were written by stream writers in repairing mode. [reported by Heinz D] * Fixed DTD/attribute value normalization problem with NMTOKEN; was not catching a problem if the first non-space character of the value was not valid a valid NMTOKEN character. * [WSTX-24]: Predefined namespace with prefix 'xml' was not handled properly for elements, only for attributes. * [WSTX-27]: Attribute #FIXED default value was not added (just checked for explicit attributes), now it is used properly. [reported by Wolfgang H] 2.0.3: [29-Sep-2005] Problems fixed: * [WSTX-7]; SimpleNsStreamWriter#writeStartElement(StartElement) was stripping out attribute namespaces. [reported by Linus E] * [WSTX-8] nextTag() followed by peek() at the start of a document won't work. Also, fixed associated NPEs in WstxEventReader class. [reported by Patrick C] * [WSTX-9] sr.getTextCharacters(int srcStart, ...) had a bug that caused ArrayIndexOutOfBoundsException, and null chars in result [reported by Dan D, Erik S and Kevin V] * [WSTX-10] Handling of 3-byte UTF-8 Byte Order Marker did not work properly when XMLStreamReader was constructed for a Reader [reported by Heinz D] 2.0.2: [04-Sep-2005] Problems fixed: * Fixed [WSTX-3]; output of DTD event was missing a double quote. [reported by Linus E] * Fixed a problem with single-byte (ascii, ISO-Latin1) encoding writer; char-array methods could omit characters after encoded entities. 2.0.1: [10-Aug-2005] Problems fixed: * A nasty encoding bug in (configurable) attribute writers: trying to write entities failed with a NullPointerException... [reported by Ulrich C and Peter T] * Fixed a problem with DTDs that had enumerated value "-" (or "--"), was throwing an exception [reported by Ulrich C] 2.0-final: [10-Jul-2005] Problems fixed: * A small problem with StartElement.getPrefix() fixed: checks for masked namespaces wasn't properly working. * XMLEventWriter: START_DOCUMENT outputting fixed; was not always outputting encoding. * XMLInputFactory: entity/dtd resolvers were not properly passed to instances. 2.0rc3: [20-Jun-2005] Problems fixed: * StartElement: * Namespace handling was broken: default namespace was included twice in some cases (including reporting a dummy empty default namespace declaration) * XMLStreamWriter: * writeStartDocument was broken in 2.0rc2 (after working in 2.0rc1) 2.0rc2: [05-Jun-2005] Problems fixed: * StAX2: * XMLStreamWriter2 had wrong ordering for arguments for the new writeStartDocument(). Stax 1.0 is inconsistent, but the ordering as fixed makes more sense since they are in document order now. * XMLStreamWriter.writeCData(char[], int, int) was missing; added to make it consistent with writeCharacters(char[], int, int). 2.0rc1: [11-Apr-2005] New functionality: * XMLStreamReader2.getText(Writer) now implemented in fully streaming manner for CHARACTERS and CDATA events! (also tested succesfully using unit tests, so it does really work). * Improved text/attribute value writer system so that they now use character entities for characters outside of encoding range (for ascii and ISO-Latin, for example) * Moved profile configuration methods from woodstox API to StAX2 API. Problems fixed: * XMLStreamReader: * Fixed "]]>"-detection; was erroneously matching some escaped variations where they shouldn't have matched. * XMLStreamWriter: * Not necessarily a problem, but I change the way XML declaration is output so that it's identical to format used by Stax RI (using single quotes, no trailing extra space). Makes life easier for some general stax testing (particularly ActiveSOAP), without affecting applications. * Changed the way flush() works, so that it can now "finish" start elements (both normal and closed ones) and force such start elements to be written out, even in the absence of following events. This is sometimes necessary for networked streaming applications. * StAX2: * XMLOutputFactory2: * Added P_AUTOMATIC_EMPTY_ELEMENTS property, enabled by default, which signals that the writer is allowed to output empty elements whenever writeStartElement() is immediately followed by a writeEndElement() (except there can be intervening writeAttribute() calls). If disabled, only explicit calls to writeEmptyElement() can produce empty elements. 1.9.0: [20-Apr-2005] New functionality: * XMLStreamReader: * Full read-only access to configuration settings via getProperty() * StAX2 addition, LocationInfo, implemented to allow for extended access to location information: both start, end and current locations available, and "raw" access to start/end byte and char offsets (with appropriate long return values). Off latter, only char offsets actually implemented, due to problems with byte offset tracking with current i/o architecture. * XMLStreamWriter: * Full read-only access to configuration settings via getProperty() Problems fixed: * XMLStreamReader: * Fixed various Location reporting problems (OBOs, Location not properly updated in lazy-parsing mode) * XMLStreamWriter: * Repairing mode was not properly handling namespace bindings, esp. WRT default namespace. Now the implementation is believed to (finally!) work exactly as expected. * A compilation problem (on JDK 1.5) reported by Olivier Potonniee (a method name conflict in LineSuppressWriter) 1.8.2: [23-Mar-2005] Problems fixed: * XMLStreamWriter: * Had problems with writeEmptyElement() call followed by a writeEndElement() call; fixed now. * Problems with charset decoding: * Failed with UTF-16 encodings (reported by Mariun Raschip); now fixed. 1.8.1: [10-Mar-2005] Problems fixed: * Fixed 3 bugs reported by Eric Jain: * Bug that occured when declaring the default namespace in the same element as a non-default namespace (but only when the default one wasn't the first one) * ArrayIndexOutOfBoundsException sometimes occured with large documents, esp. if read using a network or gzip stream readers. * Problem with the repairing stream writer when generating the namespace declaration for elements dynamically; was trying to output bindings twice. * Fixes for XMLStreamWriter: * a minor incompatibility with the stax 1.0 specs: XMLStreamWriter.writeStartDocument() was not using default values defined by the specs. * writeComment() was quoting content ('<' and '&' specifically); shouldn't. 1.8: [28-Feb-2005] New functionality: * Implemented "StAX 2" interface; extended versions of many of StAX 1.0 interfaces and abstract classes. Improvements are in following areas: * Access to formerly missing information (DTDInfo, AttributeInfo, XMLStreamLocation2, new methods to XMLStreamReader) * Efficient (fully streaming) access to textual event content: XMLStreamReader2.getText() passing a writer, pass-through XMLStreamWriter2.copyEventFromReader() for copying events as read (more efficient than explicit piece-by-piece copying), XMLStreamReader2.skipElement() for skipping whole sub-trees. * Configurable output using XMLStreamWriter2: all XMLEvents can be output using specified XMLStreamWriter2 instance; can define custom text content and attribute value quoters (to quote/encode additional characters in output); raw output methods for by-passing all quoting and structural checks. * Basic support for per-instance (XMLStreamReader2, XMLStreamWriter2) configuration (only few features defined so far). Problems fixed: * Stream reader now correctly accesses attribute type information, when validating against DTD (passes matching staxtest test case). * Source package now contains jars absolutely needed for compilation. * Fixed a problem with UTF-8 reader; occasionally tried to read 0 bytes from the underlying stream, and threw an exception. 1.7: [12-Dec-2004] New functionality: * Added P_OUTPUT_CDATA_AS_TEXT for stream writers; it will force writer to output 'normal' (quoted) text when asked to output CDATA (may be useful when full control of output is needed). * Added P_PRESERVE_LOCATION flag for (event) reader: by default it is true, and Event objects have fully accurate Location information. Turning it off will make all Events use a shared location; this can improve performance of straight event-based parsing by up to 20-25%! * Added simple QName caching/recycling in input element stack; improves speed of event reader by ~5% for typical cases. * Adding some preliminary support for DTD++ (although full support is not planned to be part of 2.0 at this point): * Can enable/disable support via normal property set mechanism * Implements TARGETNS that allows proper mapping of prefixes to namespace URIs in DTD. Problems fixed: * Fixed a validation problem (pure text [#PCDATA] content didn't report validation problem when elements included) * Stream writer was adding an extra space between PI target and data, in cases where data already had space (such as when getting PI data from [broken] stream reader). * As pointed out by Glenn Marcy, processing instruction target should not contain leading space: Woodstox fixed, StAX specs need to clarify this too. * Fixed a small problem with attribute parsing; space between attribute value and following name was optional. * Finished full default value validation support (mostly relevant for NOTATION, ENTITY and ENTITIES types). * Improved event writer so that it preserves CDATA events. * Fixed a problem with UTF-8 decoder that could cause readers to block "too early", as decoder was trying to always read full buffers, instead of returning whatever could be decoded without further reads from the underlying input stream (reported by Sven Köhler). * Changed XMLEventReader.nextTag() implementation to be consistent with that of XMLStreamReader.nextTag(), even though stax (1.0) specs are bit unclear on exact behaviour. I assume it's just an oversight on specs' part, as XMLStreamReader's javadocs comments are clear. Refactoring: * Rewrote stream writer; now has 3 implementations (separated single namespace-aware writer into 2; repairing and non-repairing) Other: * Now dual-licensed under LGPL and ASL (formerly LGPL-only) 1.6: [31-Oct-2004] New functionality: * Completed DTD validation, including full handling of all attribute value types (for default values too); also better tested via StaxTest now. Problems fixed: * Fixes from 1.0.1 incorporated. 1.5: [13-Oct-2004] New functionality: * Partial DTD validation: * Full structural validation (element structure) * Full checks for definitions of attributes and elements * Handles mixed/non-mixed content checks * Partial attribute validation, including: * Checks for #REQUIRED and #FIXED values * Handles default values * Checks for ID/IDREF validity * Checks for enumerated and NOTATION validity * Normalizes attribute white space Still missing validation for some attribute types; also, not all validation fully tested yet. Problems fixed: * Now checks "split" comments and PIs; comments/PIs that start in entity expansion but do not finish. These aren't allowed by XML specs. Refactoring: * Created specific exception class (that extends RuntimeException) for throwing "lazy" parsing errors; allows for catching such exceptions reliably if necessary. * Refactored class hierarchy; flattened it so that not most sub-packages are no longer under com.ctc.wstx.stax, but directly under com.ctc.wstx. * Only change to public API: event factory is now in package com.ctc.wstx.stax.WstxEventFactory, instead of com.ctc.wstx.stax.evt.WstxEventFactory. This shouldn't usually matter, as deployment properties were updated. ----- [comments for versions 0.5 to 1.0.6 removed -- check out older versions if you are interested in historic details]