Skip to content
This repository
Newer
Older
100644 1408 lines (951 sloc) 51.424 kb
b3a5e934 »
2012-03-26 Tidy up 'old' documents, and remove no-longer-needed items
1 !!! This file is no longer maintained. Please see the GitHub Commits !!!
2 https://github.com/hunterhacker/jdom/commits/master
3
4
b50c7780 »
2009-07-23 Noting what's new.
5 * * * * * * JDOM 1.1.1 (tag: jdom_1_1_1) from JDOM 1.1 * * * * * *
6
7 Fixed a synchronization issue in the Namespace class that could cause a
8 hang when doing concurrent builds.
9
10 Added output support for Unicode surrogate pairs.
11
12 Added a new flag on SAXBuilder named setFastReconfigure() which, when set,
13 can speed reconfiguration by skipping repeated attempts to set features that
14 are determined not to be present on a parser. Useful when doing many builds
15 per second.
16
17 Updated the provided Jaxen library from a modified Jaxen 1.0 to the latest
18 which is Jaxen 1.1.1.
19
20 Added reflection code in the error reporting system to support Android's
21 Dalvik VM which doesn't have the java.rmi.* classes.
22
23
a652c0ea »
2007-11-10 Noting what's new for this release. Updating copyright headers.
24 * * * * * * JDOM 1.1 (tag: jdom_1_1) from JDOM 1.0 * * * * * *
25
26 Added an additional constructor to JDOMSource with an EntityResolver which is
27 passed to the internal DocumentReader allowing the SAXOutputter to properly
28 resolve DTDs.
29
30 Added a forceNamespaceAware property to DOMOutputter which specifies you want
31 a DOM constructed with namespaces even if the source JDOM document has no
32 namespaces.
33
34 Added support for attribute "INF" and "-INF" values, to indicate positive and
35 negative infinity, as XML Schema allows.
36
37 Moved isXMLWhitespace() method from private in XMLOutputter to public in
38 Verifier.
39
40 Clarified XMLOutputter behavior with newlines and indents:
41 setIndent(" ") means newlines and " " indents
42 setIndent("") means newlines and "" indents
43 setIndent(null) means no newlines and no indents
44
45 Added set/getIgnoringBoundaryWhitespace() methods and features to SAXBuilder
46 and SAXHandler.
47
d87a0543 »
2007-11-14 Noting a new feature: setFactory() on XSLTransformer.
48 Added a setFactory() method on XSLTransformer to control the object types
49 built by the transform.
50
a652c0ea »
2007-11-10 Noting what's new for this release. Updating copyright headers.
51 Added a string constant for the JDOM_OBJECT_MODEL_URI used by JAXP 1.3. It
52 deserves being part of the public API.
53
54 Fixed bug in SAXOutputter where default namespaces would be declared as
55 xmlns:="" with a spurious colon.
56
57 Fixed bug when using attributes without a namespace and outputting to a
58 JDOMResult.
59
60 Removing check that a comment not start with a hyphen. A careful reading of
61 production 15 in the XML 1.0 spec indicates leading hyphens are in fact
62 allowed.
63
64 Fixed bug where outputFragment() on SAXOutputter could cause a
65 NullPointerException because the locator would be null during the call.
66
67 Fixed bug where serializing ElementFilter causes a NullPointerException if the
68 filter has no assigned namespace
69
70 Fixed some subtle bad behaviors in listIterator.add() logic, using brand new
71 iterator logic.
72
73 Allowed a String to be passed to ContentList.add(int, Object).
74
75 Simplified JDOMAbout and renamed info.xml to jdom-info.xml, so
76 getResourceAsStream() won't suffer any name collision.
77
78 Fixed tiny issue where CDATA could be set with illegal character content.
79
80 Added logic to escape some special characters in namespace URIs.
81
82 Fixed bug where the attribute type would change on a setAttribute() call.
83
84 Improved performance on Namespace handling.
85
86 Improved and clarified Javadocs.
87
88
89 * * * * * * JDOM 1.0 (tag: jdom_1_0) from JDOM Beta10 * * * * * *
438fa370 »
2004-02-17 Removing deprecated methods. We always do this right after a beta
90
88ea5203 »
2004-09-01 Recording the current changes.
91 Added a new lib/jaxen-jdom.jar that solves some XPath ancestry problems
92 introduced by the Parent interface. See the new lib/jaxen.readme for
93 details.
94
95 Moved the addContent() and setContent() methods from Parent into Element and
96 Document directly. This re-enables method chaining that some people missed.
97
98 Fixed a few bugs in SAXOutputter: start/endPrefixMapping was not being fired
99 for no namespace, DocType was being improperly constructed, changed to use a
100 DefaultHandler with the dtd parser to better suppress unimportant problems.
101
102 Added SAXOutputter support for outputting fragments of documents with the
103 new methods:
104 output(Content)
105 outputFragment(List)
106 outputFragment(Content)
107
108 Added support in XMLOutputter for ignoring the JAXP processing instructions
109 <?javax.xml.transform.enable-output-escaping?> and
110 <?javax.xml.transform.disable-output-escaping?>. Respect for these PIs is
111 toggled by the Format.set/getIgnoreTrAXEscapingPIs() feature, default false.
112
113 Added to JDOMFactory the methods document(Element rootElement, DocType
114 docType, String baseURI) and entityRef(String elementName, String systemID).
115 These match constructors that were previously overlooked. Also added
116 implementations to DefaultJDOMFactory and UnverifiedJDOMFactory.
117
20130836 »
2004-09-03 Noting getParentElement().
118 Added to Element the method getParentElement() that returns the parent element
119 or null if the object is unattached or the root element.
120
88ea5203 »
2004-09-01 Recording the current changes.
121 Fixed bug in FilterIterator that affected next() calls.
122
123 Fixed bug in DOMOutputter regarding extraneous namespace declarations
124 appearing under certain conditions.
125
126 Changed XMLOutputter to clone the Format objects when they're set/get
127
128 Fixed bug in JDOMResult where the result list could include incomplete
129 results in certain situations, fixed by forcing a flush.
130
131 Made SAXHandler.flushCharacters() protected again after being private. It's
132 needed for the above fix.
133
134 Changed Verifier.isXXX() methods from private to public as it was well
135 argued that they're based on unchanging spec productions and can be
136 generally useful even apart from JDOM.
137
138 Added support for surrogate pairs in the Verifier. (Surrogate pairs don't
139 yet have any special output support.)
140
141 Fixed bug in SAXBuilder to avoid an IllegalStateException when apps access
142 the partial document when parse failure occurs right after the beginning of
143 the parse.
144
145 Updated JaxenXPath to avoid the deprecated XPath.valueOf().
146
147 Brought the jdom-contrib ElementScanner up to date.
148
149 Fixed various Javadoc typos.
150
151 Removed the build-time dependence on saxpath.jar.
152
438fa370 »
2004-02-17 Removing deprecated methods. We always do this right after a beta
153 Removed all deprecated methods.
154
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
155 Fixed bug where in "pretty print" output EntityRef instances would erroneously
156 print on their own line.
157
158 Added character encoding rules to improve whitespace round tripping:
159 http://lists.denveronline.net/lists/jdom-interest/2003-July/013227.html
160
161 Added DOMBuilder.getFactory() method to match what we added to SAXBuilder.
162
163 Removed Parent.canContain() and the Document and Element implementations.
164 Moved the logic directly into ContentList. No reason to expose a public
165 method unless it has a general purpose.
166
167 Reduced the visibility on some XMLOutputter internals that we don't want to
168 guarantee support for over the long term. Some people who want custom output
169 formatting may need to copy some code blocks. That's OK since JDOM is open
170 source and while it's less than ideal, it's better than our exposing protected
171 internal variables and methods that we may have reason to change later.
172 Now marked private:
173 userFormat
174 printString()
175 printContentRange()
176 printTextRange()
177 Now static final:
178 preserveFormat
179
88ea5203 »
2004-09-01 Recording the current changes.
180 Removed some unnecessary casts.
181
182 Made a few private methods static where it made sense. Also a select
183 few protected methods.
184
185 Made the Format constructor private. It used to be pkg protected which
186 doesn't make a lot of sense.
187
188 Removed equals() from AbstractFilter since it's better to let concrete
189 subclasses define that, as they already were.
190
191 Removed some unnecessary instanceof and != null checks.
192
193 --
194 Added an UncheckedJDOMFactory class which builds without doing any
195 content or structure checks, letting you gain speed in a situation
196 where you have 100% confidence in your parser. The Javadocs for
197 the class naturally includes a serious warning.
198
199 It's not used by default, but you can select it with a
200 builder.setFactory(new UncheckedJDOMFactory()) call.
201
202 I also added to JDOMFactory a few methods:
203 addContent(Parent, Content)
204 setAttribute(Element, Attribute)
205 addNamespaceDeclaration(Element, Namespace)
206
207 These are called during the build to do the adds. The default builder
208 just calls parent.addContent(Content) while the "unchecked" factory does
209 the work without checks using package protected methods on ContentList
210 and AttributeList.
211
212 A perk of having these methods in the factory and used by the builder
213 is you can write a custom factory to do certain things during the adds.
214 Like you could ignore all elements named "foo" by not doing the add if
215 the Content was an Elt foo. That's not perfect since the elements
216 underneath foo would still be built into a subtree that got ignored,
217 but it's an easy solution to save memory in the resulting document.
218 --
438fa370 »
2004-02-17 Removing deprecated methods. We always do this right after a beta
219
dbb475e9 »
2004-02-17 Noting isAncestor() and DOMOutputter bug fixes.
220 * * * * * * Beta10 (tag: jdom_1_0_b10) from Beta9 * * * * * *
0aba55ec »
2004-02-06 Updating the TODO.txt.
221
222 PARENT AND CONTENT
223 ------------------
224
225 Added a new Parent interface and a new Content abstract class. Parent is
226 implemented by Document and Element. Content is extended by Element, Comment,
227 DocType, EntityRef, ProcessingInstruction, and Text (CDATA).
228
229 Parent has methods (* means new):
230 Parent addContent(Content child);
231 * Parent addContent(Collection collection);
232 * Parent addContent(int index, Content child);
233 * Parent addContent(int index, Collection collection);
234 * List cloneContent();
235 * void canContain(Content, int);
236 List getContent();
237 List getContent(Filter filter);
238 * Content getContent(int index);
239 * int getContentSize();
240 * Iterator getDescendants()
241 * Iterator getDescendants(Filter)
242 * Document getDocument()
243 * Parent getParent()
244 * int indexOf(Content)
245 * List removeContent();
246 boolean removeContent(Content child);
247 * List removeContent(Filter filter);
248 * Content removeContent(int index);
249 Parent setContent(Content child);
250 Parent setContent(Collection collection);
251 * Parent setContent(int index, Content child);
252 * Parent setContent(int index, Collection collection);
253 Object clone();
254
255 Content has public methods:
256 Content detach();
257 Document getDocument();
258 Parent getParent();
259 * String getValue();
260 Object clone();
261
262 The new methods on Parent are pretty self explanatory. A few methods that used
263 to require getting the content List now work on Parent itself for convenience
264 (tired of all those FAQs). The cloneContent() and removeContent() calls
265 should be especially helpful. The getDescendants() methods is great in
266 providing a mechanism to walk the entire tree from this item down using an
267 optional filter.
268
269 The getValue() method in Content is defined to return the XPath 1.0 string
270 value of the element. The getText() methods in Element are left unchanged.
271
272 A subtle change is that getParent() now returns a Parent type which is its
273 immediate parent. Previously an item at the document level would return null
274 and you'd use getDocument() to get its Document. Parent has getParent() as
275 well to make repeated getParent() calls easier.
276
277 The protected setDocument() methods have been removed in favor of just using
278 setParent(). getDocument() remains as a potentially recursive lookup method.
279
280
281 NEW CLASSES
282 -----------
283
284 Added an org.jdom.transform.XSLTransformer class to help with simple
285 transformations. It's a one-liner now, the way it should be. Also added an
286 XSLTransformException class to support the XSLTransformer.
287
288 Added an org.jdom.output.Format class to control XMLOutputter behavior.
289 Format has convenience methods .getRawFormat(), .getPrettyFormat(), and
290 .getCompactFormat() to use in lieu of people having to remember when to trim,
291 set indents, and such. The old XMLOutputter.set*() methods are now deprecated
292 and should be called on a Format instance. The XMLOutputter constructors that
293 took indents and so on are also deprecated.
294
295 Added an EscapeStrategy plug-in interface for XMLOutputter to determine which
296 chars to escape. A user can set a strategy and go, no need to subclass.
297
298 Created a DefaultEscapeStrategy which tries to be generally smart. It quickly
299 says no escaping is necessary for UTF-8 (our default) and UTF-16. It escapes
300 everything above 255 for ISO-8859-1/Latin1. It escapes everything above 127
301 for ASCII. For the other charsets, it tries to use the JDK 1.4 CharsetEncoder
302 to determine if the char needs escaping. Reflection is used for this so JDOM
303 isn't dependent on JDK 1.4. That means if you run on JDK 1.3 there's no
304 escaping unless JDOM knows about the charset itself or you plug in your own.
305
306 Added a Format.TextMode inner class with values: PRESERVE, TRIM, NORMALIZE,
307 and TRIM_FULL_WHITE. Removed the methods setTextTrim(), setTextNormalize(),
308 and setTrimAllWhite(). Replaced them with setTextMode(Format.TextMode) and
309 getTextMode().
310
01932745 »
2004-02-06 Moving JDOMFactory and DefaultJDOMFactory to org.jdom where they
311 Moved org.jdom.input.JDOMFactory and org.jdom.input.DefaultJDOMFactory into
312 the org.jdom package.
313
0aba55ec »
2004-02-06 Updating the TODO.txt.
314
315 NEW METHODS
316 -----------
317
318 Added Document.setBaseURI(String) and getBaseURI() to record the effective URI
319 from which the document was loaded (against which relative URLs in the
320 document should be resolved). The builders record the URI when possible.
321
322 Added a Document(Element, DocType, String baseURI) constructor.
323
324
325 ENHANCEMENTS
326 ------------
327
328 Incorporated Jaxen 1.0 and Xerces 2.6.1.
329
330 Enhanced the filter classes so they extend a new AbstractFilter class and
331 inherit its and(), or(), and negate() methods.
332
333 Added proper hashCode() methods to the filters.
334
335 Changed the Document's DocType storage so it's part of the ContentList now and
336 has a location that can be preserved. This helps with round tripping. The
337 getDocType() and setDocType() methods remain for convenience but just operate
338 based on searches through the ContentList. Adding logic to ensure the DOCTYPE
339 isn't added after the root, or vice-versa.
340
341 The Attribute class now trims its value before attempted conversion to a
342 double, float, or boolean values. Also "1" and "0" are legal boolean values
343 following the lead of Schema.
344
345 Added better support for loading from files whose names have special
346 characters like #.
347
348 Added a protected SAXHandler.flushCharacters(String) method to allow
349 subclassers to have more control over strings.
350
351
352 BUG FIXES
353 ---------
354
355 Fixed bug in AttributeList.clear() where the cleared list did not reset its
356 size to 0, causing NullPointerException when the list was reused.
357
358 Fixed bug where serializing a content list using a filter. It wouldn't work
359 because FilterList wasn't serializable. It is now.
360
361 Fixed bug in ContentList that could theoretically cause problems during
362 reverse iteration.
363
364 Changed JDOMException.initCause() to return "this" instead of "cause"
365 since that's what Throwable says it should do.
366
dbb475e9 »
2004-02-17 Noting isAncestor() and DOMOutputter bug fixes.
367 Fixed bug with elt.isAncestor() where it had been acting like "is descendant".
368
369 Fixed bug in DOMOutputter where it could have problems outputting documents
370 with a DocType.
371
0aba55ec »
2004-02-06 Updating the TODO.txt.
372
373 DEPRECATED METHODS
374 ------------------
375
376 Deprecated the Document(List, DocType) constructor because it doesn't make
377 sense if the DocType should be part of the content list rather than separate.
378
379 Deprecated the XMLOutputter.set*() methods that now reside in Format.
380
381 Deprecated the XMLOutputter constructors that took format parameters. Use the
382 constructor that accepts a Format now instead.
383
384 Deprecated the Attribute constants:
385 Attribute.CDATA_ATTRIBUTE
386 Attribute.ID_ATTRIBUTE
387 Attribute.IDREFS_ATTRIBUTE, etc.
388 Their new names are simpler:
389 Attribute.CDATA_TYPE
390 Attribute.ID_TYPE
391 Attribute.IDREFS_TYPE, etc.
392
393 Renamed methods from the PI class to be more consistent and explanatory.
394 Deprecating:
395 getNames()
396 getValue()
397 setValue()
398 removeValue()
399 New names:
400 getPseudoAttributeNames()
401 getPseudoAttributeValue()
402 setPseudoAttribute()
403 removePseudoAttribute()
404
405 Deprecated the methods setTextTrim(), setTextNormalize(), and
406 setTrimAllWhite(). Replaced them with setTextMode(Format.TextMode) and
407 getTextMode().
408
409 Changed the protected method SAXHandler.setAlternateRoot() to pushElement().
410
411
412 REMOVED CLASSES
413 ---------------
414
415 None.
416
417
418 REMOVED METHODS
419 ---------------
420
421 Removed everything deprecated in b9. (JDOM deprecates for one beta cycle,
422 then removes.)
423
424 Made the DOMOutputter output(Element, ...) and output(Attribute, ...) private.
425 They used to be protected. Skipped the deprecation step because you couldn't
426 actually extend them because of the NamespaceStack visibility, and we don't
427 usually deprecate protected methods.
428
429
430 SPECIAL NOTE
431 ------------
432
433 Reduced the visibility on many items from protected to private. Anything
434 protected or public must be supported in the future, and we don't want to
435 promise that for anything unless it's absolutely necessary. If your JDOM
436 extension has problems with the reduced visibility that can't be overcome,
437 write to jdom-interest-AT-jdom.org with your issue. We'll crack open the
438 visibility as proven necessary.
439
440
441 * * * * * * Beta9 (tag: jdom_1_0_b9) from Beta8 * * * * * *
661737c0 »
2003-04-02 Added a list of what's changed since beta8. Preparing for a beta9 rel…
442
443 NEW PACKAGES
444 ------------
445
446 Added org.jdom.xpath package for XPath manipulations.
447
448
449 NEW CLASSES
450 -----------
451
452 Added the XPath and JaxenXPath classes to the new org.jdom.xpath package.
453
454 Added org.jdom.input.JDOMParseException, a subclass of JDOMException, to be
455 thrown by the builders to convey whatever information could be gathered from
456 the parser about the error. It has a getPartialDocument() that gives access
457 to whatever part of the input document that was successfully parsed before the
458 parser fired a SAXParseException.
459
fd59de67 »
2003-04-04 Removing support for JDK 1.1.
460 Added org.jdom.output.JDOMLocator, an implementation of org.xml.sax.Locator
461 which a ContentHandler could use to determine the document object on which an
462 error occurred.
463
661737c0 »
2003-04-02 Added a list of what's changed since beta8. Preparing for a beta9 rel…
464
465 NEW METHODS
466 -----------
467
468 Added the the getResult()/setResult() methods to JDOMResult to support
469 transformations that return results other than a document.
470
471 Added saxBuilder.setReuseParser(boolean) with a default of false. Turning it
472 on allows reuse and faster performance for parsers that support reuse.
473
474 Added a ProcessingInstruction.setTarget(String newTarget) method. Once we
475 decided to allow elt.setName() we should allow pi.setTarget().
476
950154d8 »
2003-04-04 New method from Laurent's patch.
477 Added a SAXOutputter.getLocator() method to make the locator available outside
478 the ContentHandler. For example, this allows you to have ErrorHandlers not
479 implementing XMLFilters.
480
661737c0 »
2003-04-02 Added a list of what's changed since beta8. Preparing for a beta9 rel…
481
482 ENHANCEMENTS
483 ------------
484
485 Fixed the TextBuffer performance problem that made performance terrible on
486 certain JVMs in beta8.
487
488 Changed CDATA to extend Text so now you can look just for Text nodes
489 in content and don't need to differentiate CDATA sections if you don't
490 want to. This does require "instanceof CDATA" to come before "instanceof
491 Text" now. Watch out for that potential subtle bug.
492
493 Changed the exception types that may be thrown from the SAXBuilder. The idea
494 is that SAXBuilder should throw an IOException for an I/O error, a
495 JDOMException for an XML problem, and that unexpected runtime exceptions
496 should not be hidden. Previously it could only throw a JDOMException, so this
497 will break existing code! Builders will now need to catch IOException.
498
499 Changed the DOM adapter classes to throw either IOException, a JDOMException
500 wrapped around a parser-specific exception, or a subtype of RuntimeException.
501 Previously they might throw any Exception.
502
503 Changing doctype.equals() to be == instead of comparing its elt name, system
504 id, and public id. Did this because someone may not care about the elt name
505 in comparing doc types, while someone else might care about the internal DTD
506 subset. This lets the default behavior be == and lets users write their own
507 equality check.
508
509 Added a feature to prevent firing DTD events by setting the SAX core feature
510 "http://xml.org/sax/features/validation" to false.
511
512 Removed the special namespace treatment of xml:space and xml:lang so they are
513 now treated as any other attributes in a namespace.
514
515 Enhanced SAXOutputter to notify of entities through ContentHandler's
516 skippedEntity() and notify of some errors to the registered SAX ErrorHandler,
517 Added support to output Comments as Element children. Added support for CDATA
518 (i.e. distinguish CDATA from plain text and use of the start/endCDATA
519 callbacks of LexicalHandler). Removed support for CDATA as children of the
520 document node.
521
522 Added CVS_ID and @version tags to source files that were missing them.
523
524 Added JDOM_FEATURE constants to JDOMSource and JDOMResult which can be used
525 with TransformerFactory.getFeature() to determine if the transformer natively
526 supports JDOM.
527
528 Moved the printing of the line seperator after the doctype up to
529 output(Document, Writer). This allows someone who doesn't want a newline
530 after the decl to kludge it away.
531
532 Improved the Verifier's checking of Comment contents. Added logic to ensure
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
533 you can't have two default namespace declarations on the same element.
661737c0 »
2003-04-02 Added a list of what's changed since beta8. Preparing for a beta9 rel…
534
535 Numerous performance improvements.
536
537 Many Javadoc improvements.
538
539 Numerous build script enhancements.
540
541 Moved samples into the default package, building to build/samples.
542
543
544 BUG FIXES
545 ---------
546
547 Fixed Document.clone() to set the new DocType.
548
549 Fixed a bug where the JDOMException.printStackTrace(PrintWriter) method would
550 print some data to System.err instead of to the writer.
551
552 Fixed bug in PI map parse logic which could be confused when there was a lot
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
553 of whitespace surrounding the = signs.
661737c0 »
2003-04-02 Added a list of what's changed since beta8. Preparing for a beta9 rel…
554
555 Fixed bug where AttributeList.set() would not set parentage in one situation.
556
557 Fixed bug where namespace prefixes were being lost on DOM builds.
558
559 Fixed bug in PI.toString() which could cause funny output on PIs without data.
560
561 Fixed a problem with the CDATA.clone() method that would result in CDATA
562 sections being cloned as Text objects rather than CDATA objects.
563
564 Fixed the SAXOutputter so elementContent() fires a comment() event.
565
566 Fixed bug where mapping a value to an attribute wouldn't happen if the
567 attribute was renamed.
568
569 Fixed bug in XMLOutputter where \n was used instead of
570 currentFormat.lineSeparator at one location.
571
572 Fixed a whitespace output bug where whitespace-only content would be treated
573 as empty.
574
575 Fixed bug where the "xml" prefix wasn't available in Element's
576 getNamespace(String) call.
577
578
579 DEPRECATED METHODS
580 ------------------
581
582 Deprecated the XMLOutputter.setIndent* methods except setIndent(String).
583
584 Deprecated DOMBuilder(boolean validate), DOMBuilder(String adapter, boolean
585 validate), and DOMBuilder.setValidation(boolean validate) because validation
586 only matters when building from files, and those methods have already been
587 deprecated.
588
589 Deprecated the DOMOutputter output methods that return a DOM Element or Attr,
590 because they aren't truly useful and the DOM contract is that every Attr and
591 Element (and every other Node too) always belongs to exactly one Document or
592 DocumentFragment object.
593
594 Deprecated element.removeChildren() because it's a nearly useless method.
595 Call element.getChildren().clear() in the very rare case you want to remove
596 only the children but leave other content.
597
598 Deprecated element.hasChildren() because it's not a performance optimization
599 anymore. This helps simplify the most complicated class around.
600
601 Deprecated element.setChildren(List) since element.setContent(List) suffices.
602
e9965021 »
2003-04-08 Making note of the outputString() deprecation.
603 Deprecated xmlOutputter.outputString(String) since outputString(Text) handles
604 the Text nodes that now really reside within documents.
605
661737c0 »
2003-04-02 Added a list of what's changed since beta8. Preparing for a beta9 rel…
606
607 REMOVED CLASSES
608 ---------------
609
610 Removed ProjectXDOMAdapter since the parser is no longer important.
611
612
613 REMOVED METHODS
614 ---------------
615
616 Removed element.addContent(CDATA) and removeContent(CDATA) since
617 addContent(Text) and removeContent(Text) do the job now that CDATA extends
618 Text.
619
620 Removed canAdd() and canRemove() from Filter. matches() is sufficient.
621
622 Removed the methods deprecated in beta7.
623
624
06d6004d »
2003-04-04 Adding a blurb in the changelog about discontinued JDK 1.1 support.
625 SPECIAL NOTE
626 ------------
627
628 Beginning with this release JDK 1.1 is no longer supported. You'll need JDK
629 1.2 or later.
630
631
5a4a87ec »
2002-02-20 Adding a list of what changed from b7 to the upcoming b8.
632 * * * * * * Beta8 (tag: jdom_1_0_b8) from Beta7 (tag: jdom_1_0_b7) * * * * * *
983b9110 »
2001-02-14 A record of changes between beta versions. Just added changes from
633
5a4a87ec »
2002-02-20 Adding a list of what changed from b7 to the upcoming b8.
634 NEW CLASSES
635 -----------
636
637 Added a Text class. This class is primarily for internal use to store String
638 data, so strings can now have parentage. A getText() will still return a
639 String. The Text nodes themselves can be retrieved through a getContent()
640 call.
641
6edbcd62 »
2002-03-12 After some patches today, removing items from TODO and adding items to
642 Added the public interface org.jdom.filter.Filter to support the "FilterList"
643 functionality.
5a4a87ec »
2002-02-20 Adding a list of what changed from b7 to the upcoming b8.
644
6edbcd62 »
2002-03-12 After some patches today, removing items from TODO and adding items to
645 Added org.jdom.filter.ContentFilter, a standard filter for Content. And added
646 org.jdom.filter.ElementFilter, a standard filter for Element data.
647
648 Added two non-public support classes to support the "FilterList"
649 functionality: ContentList and AttributeList.
5a4a87ec »
2002-02-20 Adding a list of what changed from b7 to the upcoming b8.
650
651
652 NEW METHODS
653 -----------
654
6edbcd62 »
2002-03-12 After some patches today, removing items from TODO and adding items to
655 Added to Element and Document the method getContent(Filter) that takes a
656 Filter instance.
657
5a4a87ec »
2002-02-20 Adding a list of what changed from b7 to the upcoming b8.
658 Added to CDATA the methods getTextTrim(), getTextNormalize(), append(String),
659 append(CDATA), getParent(), getDocument(), and detach(). This brings CDATA
660 close in line with the Text class. They'll may become the same class with a
661 flag differentiator in the next beta.
662
663 Added to Element the methods addContent(Text) and removeContent(Text). These
664 methods support the new Text class.
665
666 Also added to Element the method removeAttribute(Attribute). This method was
667 simply overlooked before.
668
669 Also added to Element the method getChildTextNormalize(). This method is
670 similar to getChildTextTrim().
671
68ea2e39 »
2002-02-20 Added mention of attribute default values, which I just checked in.
672 Also added to Element two new styles of getAttributeValue() which let the
673 programmer specify default values if the attribute doesn't exist.
674
5a4a87ec »
2002-02-20 Adding a list of what changed from b7 to the upcoming b8.
675 Added to SAXBuilder the methods setFeature() and setProperty(). These methods
676 to allow programmers to customize the underlying parser.
677
678 Added to SAXOutputter the new method setLexicalHandler(LexicalHandler). Also
679 added a new SAXOutputter constructor that takes a LexicalHandler as its last
680 argument.
681
682 Added to ProcessingInstruction the method getNames(). This method returns the
683 pseudo-attribute names in the PI's data.
684
685 Added to DocType the methods setInternalDTDSubset(String) and
686 getInternalDTDSubset(). These methods support new functionality where a
687 DocType can store and alter the internal DTD subset information.
688
689 Also added to DocType the method setElementName().
690
691 Added a no-arg SAXOutputter constructor.
692
693 Added to SAXOutputter the methods getContentHandler(), getErrorHandler(),
694 getDTDHandler(), getEntityResolver(), getLexicalHandler(), setDeclHandler(),
695 getDeclHandler(), setFeature(), setProperty(), getFeature(), and
696 getProperty().
697
698 Added to Attribute the methods getAttributeType() and setAttributeType().
699 Also added various constructors that take an int type. These methods and
700 constructors support the new functionality where attributes can record their
6edbcd62 »
2002-03-12 After some patches today, removing items from TODO and adding items to
701 type information. Note: this is something DOM can't do!
5a4a87ec »
2002-02-20 Adding a list of what changed from b7 to the upcoming b8.
702
703 Added to Document the method detachRootElement().
704
705 Added to XMLOutputter the methods outputString(List list), outputString(String
706 str), outputString(Text text), output(List list, OutputStream out), and
707 output(List list, Writer out).
708
709 Added to EntityRef the constructor EntityRef(String name, String systemID).
710 This supports building an EntityRef without a public ID.
711
712 Added to Verifier the methods checkSystemLiteral() and checkPublicID().
713
714
715 NEW CONSTANTS
716 -------------
717
718 Attribute has new constants for each attribute type:
719 UNDECLARED_ATTRIBUTE, CDATA_ATTRIBUTE, ID_ATTRIBUTE, IDREF_ATTRIBUTE,
720 IDREFS_ATTRIBUTE, ENTITY_ATTRIBUTE, ENTITIES_ATTRIBUTE, NMTOKEN_ATTRIBUTE,
721 NMTOKENS_ATTRIBUTE, NOTATION_ATTRIBUTE, and ENUMERATED_ATTRIBUTE.
722
723
724 NEW SIGNATURES
725 --------------
726
727 The XMLOutputter escape*() methods are now public.
728
729 The Verifier checkXMLName() method is now public.
730
6edbcd62 »
2002-03-12 After some patches today, removing items from TODO and adding items to
731 Changed the protected "Element parent" variable for classes to be "Object
732 parent", with the object capable of serving double duty as either a Document
733 parent or Element parent. Saves noticeable memory.
5a4a87ec »
2002-02-20 Adding a list of what changed from b7 to the upcoming b8.
734
5251bc47 »
2002-02-20 Clarifications and oversights pointed out by Brad Huffman.
735 Changed the no-arg Document constructor to be public, along with Javadocs
736 explaining how the method is to be used.
737
5a4a87ec »
2002-02-20 Adding a list of what changed from b7 to the upcoming b8.
738
739 REMOVED CLASSES
740 ---------------
741
742 None.
743
744
745 REMOVED METHODS
746 ---------------
747
748 Removed the methods deprecated in beta7.
749
750
751 DEPRECATED METHODS
752 ------------------
753
754 Deprecated the DOMBuilder.build() methods that build from a File, URL, or
755 InputStream. This helps people understand those methods are for testing only.
756 DOMBuilder.build(org.w3c.dom.Document) and such are still undeprecated.
757
758
759 ENHANCEMENTS
760 ------------
761
762 Added the long-awaited "FilterList" functionality! This improves the
763 reliability and performance of the lists returned by getContent() and
764 getChildren() calls. These lists are now fully live, they fully enforce
765 well-formedness constraints, and they don't require in-memory copying before
766 returning. A huge improvement!
767
768 Integrated the Text class for wrapping strings behind the scenes and thus
769 allowing strings to have parentage.
770
771 Added the ability for the DocType to have an internal DTD subset, and changed
772 the SAX and DOM builders and outputters to support this change.
773
774 Added the ability for a Document to have a detached root to make elt.detach()
5251bc47 »
2002-02-20 Clarifications and oversights pointed out by Brad Huffman.
775 work easily. There will be an IllegalStateException thrown in case of read
5a4a87ec »
2002-02-20 Adding a list of what changed from b7 to the upcoming b8.
776 from such a Document.
777
778 Added support for "attribute types". Typing is now recorded within the
779 attribute object and fully managed during build and output.
780
781 Rearchitected the internals of SAXBuilder and SAXHandler to be more extensible
782 via subclassing. Also exposed more of the internals of SAXHandler to make
783 subclassing easier.
784
785 Made SAXOutputter much more robust, and made JDOMSource (used for
786 transformations) more robust along with it.
787
788 Changed setContent(null) to now clear the content list and does not throw an
789 exception. Same for setChildren(null).
790
5251bc47 »
2002-02-20 Clarifications and oversights pointed out by Brad Huffman.
791 Improved XMLOutputter to respect the xml:space attribute.
792
5a4a87ec »
2002-02-20 Adding a list of what changed from b7 to the upcoming b8.
793 Improved reporting behavior of build error messages.
794
795 Improved how JDOMException reports on nested exceptions.
796
797 Updated the Ant build system to version 1.4.
798
799 Improved JDOM build versioning so we have versions like "1.0beta8-dev" for
800 work after Beta8, and "1.0beta8" will only be the actual Beta8 code.
801
802 Changed the Javadocs to use CVS Revision and Date tags for @version.
803
804 Many Javadoc clarifications.
805
806 Improved the Verifier error message when adding a PI with an "xml" target,
807 since parsers and/or people have been trying to add it as a PI.
808
809 Added verification of the system and public ID's in both DocType and
810 EntityRef, the root element name in DocType, and the entity name in EntityRef.
811
812 Added ability for DocType and EntityRef to differentiate a missing ID from the
813 empty string ID.
814
815 Changed the MANIFEST.MF to no longer list Xerces in the Class-Path entry, nor
816 to have JDOMAbout as its Main-Class. This helps applet deployment, but does
817 remove the ability to do the cool "java -jar jdom.jar".
818
819 Added support for skipped entities in SAXHandler in the event that the parser
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
820 is not resolving external entities.
5a4a87ec »
2002-02-20 Adding a list of what changed from b7 to the upcoming b8.
821
6edbcd62 »
2002-03-12 After some patches today, removing items from TODO and adding items to
822 Added well-formedness checking to ensure there are never duplicate attributes.
823
5a4a87ec »
2002-02-20 Adding a list of what changed from b7 to the upcoming b8.
824 Many, many performance optimizations throughout.
825
6edbcd62 »
2002-03-12 After some patches today, removing items from TODO and adding items to
826 Made Xerces 1.4.4 the default parser in "lib/xerces.jar".
827
5a4a87ec »
2002-02-20 Adding a list of what changed from b7 to the upcoming b8.
828
829 BUG FIXES
830 ---------
831
832 Fixed XMLOutputter to no longer add spurious newlines after closing element
833 tags.
834
835 Fixed SAXBuilder to work better with XML filters.
836
837 Fixed SAXHandler bug where attributes that had a namespace were being added to
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
838 the Document, but did not have the Namespace correctly reported.
5a4a87ec »
2002-02-20 Adding a list of what changed from b7 to the upcoming b8.
839
840 Fixed bug where a ProcessingInstruction or DocType removed from a Document did
841 not have its parentage set to null.
842
843 Fixed bug where SAXBuilder would cache the class name even when using JAXP to
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
844 create the parser, causing problems for parsers without no-arg constructors.
5a4a87ec »
2002-02-20 Adding a list of what changed from b7 to the upcoming b8.
845
846 Fixed bug where Namespace collision checking could generate false positives.
847
848 Fixed bug where a document containing a huge number of character entities
849 would cause JDOM builds to slow down exponentially.
850
851 Fixed the many bugs caused by the old PartialList code, by replacing it with
852 FilterList code.
853
854
855 * * * * * * Beta7 (tag: jdom_1_0_b7) from Beta6 (tag: jdom_1_0_b6) * * * * * *
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
856
857 NEW CLASSES
858 -----------
859
860 Added JDOMSource and JDOMResult to the org.jdom.transform package. These
67398b81 »
2003-05-01 s/TRax/TrAX/g.
861 support XSLT transforms using the JAXP TrAX model. Added Crimson, JAXP, and
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
862 Xalan JARs to the lib directory to support the transform functionality.
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
863
864 Added org.jdom.EntityRef to replace org.jdom.Entity. Changed methods taking
865 Entity to take EntityRef.
866
867 Made org.jdom.input.SAXHandler a public class. It used to be package
868 protected. This is helpful to classes that want to build JDOM from a SAX
869 source, such as JDOMResult.
870
871 Added org.jdom.input.JDOMFactory/DefaultJDOMFactory to support the builder
872 factory model.
873
874 Added org.jdom.adapters.JAXPDOMAdapter to contain all the logic for
875 interacting with JAXP. Most people will never use this class.
876
877 Added org.jdom.Text to the repository. It's not yet used.
878
879
880 NEW METHODS
881 -----------
882
883 Added a new detach() method to each of the classes Attribute, Comment,
884 Element, EntityRef, and ProcessingInstruction. It removes the node from its
885 parent.
886
887 Added setName(String) and setNamespace(Namespace) to Element and Attribute.
888
889 Added elt.setAttribute() method, to replace elt.addAttribute(). It replaces
890 any existing attribute by the same name, instead of throwing an exception as
891 addAttribute() did.
892
8f3bd380 »
2001-06-28 Bringing these up to date with the latest changes.
893 Added elt.getContent() and elt.setContent() methods, to replace
894 elt.getMixedContent() and elt.setMixedContent(). Did the same on Document.
895
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
896 Added SAXBuilder.setExpandEntitities(boolean) method to indicate if entities
897 should be expanded, or if EntityRef objects should appear within the document.
898
899 Added two new Document constructors to support constructing with a list of
900 content:
901 Document(List)
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
902 Document(List, DocType)
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
903
904 Added elt.removeNamespaceDeclaration(Namespace). It removes a namespace
905 declaration, the counterpart to addNamespaceDeclaration(Namespace).
906
907 Added a new constructor in IllegalAddException to account for a Namespace
908 illegally added:
909 IllegalAddException(Element base, Namespace added, String reason)
910
911 Added getDocument() method to DocType. Added a protected setDocument() method
912 also.
913
914 Added setFactory() method to SAXBuilder/DOMBuilder to support the factory
915 build model.
916
917 Added elt.getTextNormalize() to return a normalized string (external
918 whitespace trimmed, internal whitespace reduced to a single space). The
919 getTextTrim() method now does a true trim.
920
921 Added a SAXBuilder.setIgnoringElementContentWhitespace(boolean) method with
922 behavior that matches the method by the same name in JAXP's
923 DocumentBuilderFactory. Setting the value to true causes
924 ignorableWhitespace() to operate like a no-op. By default its value is false.
925
926 Added getCause() to JDOMException, replacing getRootCause(). This new name
927 matches JDK 1.4.
928
929 Added setOmitDeclaration on XMLOutputter, replacing the now-deprecated
930 setSuppressDeclaration().
931
932 Added elt.removeContent(CDATA) which was previously overlooked.
933
934 Added protected methods in SAXBuilder to make it easier to extend:
935 protected XMLReader createParser()
936 protected SAXHandler createContentHandler()
937 protected void configureContentHandler(SAXHandler)
938
939 Added getDocument() method to Attribute.
940
941
942 NEW SIGNATURES
943 --------------
944
945 DOMAdapter methods now may throw Exception instead of IOException. DOMBuilder
946 and DOMOutputter have the same API as always.
947
948 Changed XMLOutputter's protected printXXX() methods to have a new signature
949 without the "int indentLevel" final parameter. Didn't bother with
950 deprecation.
951
952 Changed XMLOutputter's printEntity() method to printEntityRef().
953
954 Made SAXBuilder's build(InputSource) method public. It used to be protected.
955
956
957 REMOVED CLASSES
958 ---------------
959
960 Removed org.jdom.Entity; it's replaced by EntityRef.
961
962
963 REMOVED METHODS
964 ---------------
965
966 Removed various methods that were previously deprecated in beta6:
967 Document.addContent(Element)
968 Namespace.getNamespace(String prefix, Element context)
969 CDATA.setText(String)
970
971 Removed Document's protected rootElement variable.
972
973
974 DEPRECATED METHODS
975 ------------------
976
977 Deprecated constructor Attribute(String name, String prefix, String uri,
978 String value). Its parameter order was non-standard and it was not a useful
979 method.
980
981 Deprecated XMLOutputter's setIndentLevel() method. Having a global indent is
982 better done with a stacked FilterOutputStream. The method is now empty.
983
984 Deprecated XMLOutputter's setPadText() method. It's not needed with the
985 current output mechanism. The method is now empty.
986
987 Deprecated Element's getCopy(String) and getCopy(String, Namespace). These
988 can better be done now with a clone() and setName()/setNamespace().
989
990 Deprecated elt.addAttribute(). It's replaced by elt.setAttribute().
991
8f3bd380 »
2001-06-28 Bringing these up to date with the latest changes.
992 Deprecated getMixedContent() and setMixedContent() on Element and Document.
993 They're replaced by getContent() and setContent() versions.
994
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
995 Deprecated getSerializedForm() methods on all objects, and moved the logic
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
996 into XMLOutputter.
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
997
998 Deprecated the various xxxProcessingInstruction() methods in Document:
999 List getProcessingInstructions()
1000 List getProcessingInstructions(String target)
1001 ProcessingInstruction getProcessingInstruction(String target)
1002 boolean removeProcessingInstruction(String target)
1003 boolean removeProcessingInstructions(String target)
1004 Document setProcessingInstructions(List pis)
1005
1006 Deprecated the SAXHandler constructor SAXHandler(Document document) since now
1007 the handler constructs the document itself.
1008
1009 Deprecated elt.hasMixedContent() because it's of little use and its behavior
1010 isn't well defined.
1011
1012 Deprecated getRootCause() on JDOMException in favor of getCause(). This new
1013 name matches JDK 1.4.
1014
1015 Deprecated XMLOutputter's setSuppressDeclaration() in favor of
1016 setOmitDeclaration() to better match setOmitEncoding().
1017
1018 Deprecated elt.addAttribute(String name, String prefix, String value).
1019 Instead, setAttribute() should be used.
1020
1021
1022 ENHANCEMENTS
1023 ------------
1024
1025 Clarified and improved many, many javadocs.
1026
1027 Performance enhancement for files with namespaces. This improves build times
1028 on one test from 13000ms to 580ms.
1029
1030 Added support for the DOM DocumentType object when constructing documents
1031 using DOMOutputter.
1032
1033 Added a check that only one element is allowed in the document list as the
1034 root.
1035
1036 Added informational XML files in the jdom.jar META-INF directory storing
1037 things like the version, credits, description, etc. These can be accessed
1038 with a "java -jar jdom.jar" command which uses JDOM to read the info about
1039 JDOM.
1040
1041 Added JDOM version info to the MANIFEST.MF so servlets and such can depend on
1042 it using http://java.sun.com/j2se/1.3/docs/guide/extensions/versioning.html
1043
1044 Made elt.setMixedContent() check object types and parentage, and set
1045 parentage.
1046
1047 For the JDK 1.1 build, added a replace target so @throws is replaced by
1048 @exception, which is the old JDK 1.1 javadoc keyword.
1049
1050 Improved XMLOutputter internals so it no longer uses list.get(i) and instead
1051 uses an Iterator. Should lighten the burden on outputting large documents.
1052
01932745 »
2004-02-06 Moving JDOMFactory and DefaultJDOMFactory to org.jdom where they
1053 Added CVS Id variable to the top of each file for better tracking.
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1054
1055 Changed pi.getValue("nonexistant") to return null instead of "". Also made it
1056 so that any parse error aborts and clears the parse results.
1057
1058 Created a new implementations of clone() without any constructor calls.
1059
1060 Revamped XMLOutputter's output logic to better match expectations.
1061
1062 Changed XMLOutputter flushing logic so output() methods handle their own
1063 flush() at the end of writing so user flush() calls should no longer be
1064 necessary.
1065
1066 Made elt.setMixedContent() and doc.setMixedContent() appear atomic, even in
1067 case of failure.
1068
1069 Optimized attr.getQualifiedName() implementation for speed.
1070
1071 Added logic to setAttribute() to ensure well-formedness by verifying the
1072 attribute namespace prefix doesn't collide with an existing prefix on that
1073 element (either on the element's own ns, an additional ns, or another
1074 attribute's ns).
1075
1076 Added logic to addNamespaceDeclaration() to ensure the prefix doesn't collide
1077 with an existing prefix on the element.
1078
1079 Changed DocType.equals() to check for equivalency and not reference equality.
1080 Now two DocTypes are equals() if their constituent strings are equals(). This
1081 makes general sense because if you want to compare the doctypes of two docs
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
1082 you want to do an equivalency check.
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1083
1084 Added a private CVS_ID variable to the core classes containing RCS variables.
1085 This allows you to examine the compiled class to determine the source from
1086 which it was compiled. See jdom-contrib's Ident.java.
1087
1088 Performance optimization in setAttribute() so that removeAttribute() on a
1089 pre-existing attribute is only called when necessary, as determined by an
1090 earlier scan through the attributes. This was submitted by Phil Nelson who
1091 says it gave an 8% time savings during a fresh build.
1092
1093 Integrated the factory model for SAXBuilder. See the new classes
1094 DefaultJDOMFactory and JDOMFactory.
1095
1096 Changed Element.getTextTrim() behavior to truly be only a trim(). It used to
1097 do normalization.
1098
1099 Changed Document and Element internal LinkedList implementation to ArrayList.
1100 This change of list gives us a remarkable reduction in memory sizes for all
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
1101 large documents tested, and gives a speed boost too.
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1102
1103 Changed Element parentage so only one variable is used for the parent. It may
1104 be of type Element or Document depending on where the elt is placed in the
1105 tree. This saves one instance variable's worth of memory for each element in
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
1106 the tree.
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1107
1108 Added a new line after the DocType always, for better formatting.
1109
1110 Made the SAXHandler smart enough to ignore xmlns attributes. They shouldn't
1111 appear when SAXHandler is used with SAXBuilder but sometimes appear with
1112 driven by a different parser, such as with JDOMResult.
1113
1114 Made note that elt.getAdditionalNamespaces() returns an unmodifiable list, and
1115 made the implementation enforce the rule. This change allows
1116 Namespace.equals() to be implemented to compare URIs instead of resorting to
1117 ==, and more importantly it avoids having XMLOutputter trigger a new List
1118 object creation for every element with an empty additional namespace list
1119 (which is 99.9% of elements).
1120
1121 Refactored SAXBuilder to make it easier to extend.
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
1122 * The parser is created in a separate createParser() method, and
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1123 configured in a separate configureParser() method.
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
1124 * The content handler is created in a separate createContentHandler()
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1125 method, and configured in a separate configureContentHandler() method.
1126
1127 Improved builder exception handling to if anything in the build process throws
1128 a JDOMException, we no longer wrap it in another JDOMException; we just
1129 rethrow as-is.
1130
1131 Made XMLOutputter expose its NamespaceStack using an inner class, so
1132 subclassers could have access to the stack.
1133
1134
1135 BUG FIXES
1136 ---------
1137
1138 Fixed bug where Element.clone() didn't copy over PIs.
1139
1140 Made DOMOutputter check if there was a pre-existing root element on a new
1141 document, and if so call replaceChild() instead of appendChild(). This is
1142 necessary for Xerces 1.3 where new documents are created with a default
1143 <root/> element.
1144
1145 Fixed a bug where Attr output(Attribute) wasn't using JAXP.
1146
1147 Improved the logic by which ProcessingInstruction parses attribute-style
1148 values. The old logic was confused by whitespace, nested quotes, etc.
1149
1150 Added sanity check in DOMBuilder to ignores null NodeList and Node entries.
1151 Per the DOM2 spec neither should ever be null, but that doesn't mean some DOM
1152 implementations don't return null.
1153
1154 Fixed bug in Namespace.getNamespace() where the lookup for a pre-existing
1155 identical namespaces would fail even if there was a pre-existing identical
1156 namespace. This caused new Namespaces to be created on all
1157 Namespace.getNamespace() calls!
1158
1159 Fixed bug where elt.clone() would concatenate adjacent strings.
1160
1161 Fixed bug in elt.hasChildren() where the logic could be confused if there was
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
1162 a subclass of Element in the tree.
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1163
1164 Fixed the Javadoc on Element.getAdditionalNamespaces() to say it returns an
1165 empty list if empty. It used to say null. Empty is consistent with JDOM
1166 elsewhere.
1167
1168 Fixed bug where adding a null to a setMixedContent() method would cause an NPE
1169 while constructing the error message.
1170
1171 Fixed bug in SAXHandler where namespaces weren't being removed from the
1172 available list, causing memory bloat.
1173
1174 Fixed DOMBuilder so it works better on non-namespace-aware documents. Now if
1175 getLocalName() returns null we look for a specific tagname/attname.
1176
1177 Added ignorableWhitespace() method to SAXHandler to capture ignorable
1178 whitespace. It can be turned off with
1179 builder.setIgnoringElementContentWhitespace(true).
1180
1181 Changed Namespace.equals() to check equivalency based only on URI. It used to
1182 be both URI and prefix. This new behavior is more in line with standard XML.
1183 It's unlikely but possible that existing code might break because of this, if
1184 any code puts Namespace objects into a collection and doesn't expect
1185 namespaces with different prefixes to be treated identically. No deprecation
1186 is possible though. Also fixed behavior of Namespace.hashCode() to depend
1187 solely on the URI.
1188
1189 Fixed bug where DOMOutputter creates nodes with "" as their
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
1190 node.getNamespaceURI() even if the node is not in a namespace.
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1191
1192 Changed attribute value escaping to not escape single-quotes because it's not
1193 necessary as attribute values are always surrounded by double-quotes.
1194
1195 Made sure XMLOutputter doesn't print the newline after the decl if the decl is
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
1196 suppressed.
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1197
1198 Fixed SAXOutputter to declare namespaces using start/endPrefixMapping methods.
1199 Also added optional ability for SAXOutputter to report namespace declarations
1200 (the xmlns: attributes) if setReportNamespaceDeclarations() is true.
1201
1202 Fixed performance bug where namespaces were continuously being added to the
1203 availableNamespaces list unnecessarily, causing roughly as many entries to be
1204 added as there were elements with namespaces. In simple testing, memory usage
1205 for representing a namespace-intensive file went from 1.4 Megs to 460K.
1206
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
1207 Fixed addFirst() and addLast() in PartialList to work correctly.
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1208
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
1209 Fixed a bug in PartialList where addAll() added *before* the last element
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1210 instead of after.
1211
1212 Made PartialList's addAll() method work OK if the backing list is non-empty
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
1213 while the PartialList is empty.
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1214
1215 Fixed build scripts to work OK on Windows with spaces in directory paths.
1216
1217
1218 NEW ARCHIVES
1219 ------------
1220
1221 Added new *searchable* mailing list archives at
1222 http://www.servlets.com/archive/servlet/SummarizeList?listName=jdom-interest
1223
1224
5a4a87ec »
2002-02-20 Adding a list of what changed from b7 to the upcoming b8.
1225 * * * * * * * * * * Beta6 from Beta5 * * * * * * * * * *
983b9110 »
2001-02-14 A record of changes between beta versions. Just added changes from
1226
1227 NEW CLASSES
1228 -----------
1229
1230 Added new class org.jdom.input.BuilderErrorHandler as a default error handler
1231 for JDOM builders. It ignores warnings but throws on errors and fatal errors.
1232
1233 Added a Crimson adapter CrimsonDOMAdapter.java, to support the parser slated
1234 to come with JAXP 1.1.
1235
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1236
983b9110 »
2001-02-14 A record of changes between beta versions. Just added changes from
1237 NEW METHODS
1238 -----------
1239
1240 Added parentage for Attribute, Comment, Element, Entity, and PI! They all now
1241 have getParent() methods. All but Attribute have getDocument() methods also.
1242 The addContent() and addAttribute() methods now check parentage and don't
1243 allow an item to be added if it's already held by another.
1244
1245 Added to Element the method Namespace getNamespace(String prefix). It returns
1246 the Namespace in scope with the given prefix. It helps with attributes whose
1247 values include namespaces, like <xsl:template match="sg:title">.
1248
1249 Added DOMBuilder.setValidation(boolean) to set the validate flag after
1250 construction, to match SAXBuilder.
1251
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
1252 Added DOMOutputter.output(Attribute) methods.
983b9110 »
2001-02-14 A record of changes between beta versions. Just added changes from
1253
1254 Added XMLOutputter.setExpandEmptyElements() to choose between <empty/> and
1255 <empty></empty>.
1256
1257 Many new XMLOutputter methods for outputting document fragments.
1258
1259 SAXBuilder now has a setXMLFilter() method to allow setting of XMLFilter
1260 objects to operate during the build.
1261
1262 Added to Element a hasChildren() method.
1263
1264 Added various removeContent() methods on Element. They were deprecated and
1265 scheduled for removal, but they're now being kept.
1266
1267 Added various removeContent() methods on Document. These are brand new.
1268
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1269
983b9110 »
2001-02-14 A record of changes between beta versions. Just added changes from
1270 NEW SIGNATURES
1271 --------------
1272
1273 Made clone() methods no longer final.
1274
1275 Made toString() methods no longer final.
1276
1277 Changed all outputter output() signatures to throw JDOMException in case of
1278 problem.
1279
1280 Changed DOMAdapter signature so getDocument(String filename, ...) is now
1281 getDocument(File filename, ...) to match the standard builder model. I did
1282 not do a deprecation because no one should be using this internal API
1283 directly, and if they are, I want to hear from them.
1284
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1285
983b9110 »
2001-02-14 A record of changes between beta versions. Just added changes from
1286 REMOVED METHODS
1287 ---------------
1288
1289 Removed all methods marked deprecated in beta5.
1290
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1291
983b9110 »
2001-02-14 A record of changes between beta versions. Just added changes from
1292 DEPRECATED METHODS
1293 ------------------
1294
1295 Marked Namespace.getNamespace(String prefix, Element context) deprecated
1296 because it had been replaced by the more elegant elt.getNamespace(String
1297 prefix).
1298
1299 Marked Document.addContent(Element) deprecated because there can be only one
1300 element and it's properly set with setMixedContent().
1301
1302 Marked CDATA.setText() as deprecated. This is because CDATA doesn't have
1303 parentage, and without parentage an object should be immutable.
1304
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1305
983b9110 »
2001-02-14 A record of changes between beta versions. Just added changes from
1306 ENHANCEMENTS
1307 ------------
1308
1309 Added JAXP 1.1 support to SAXBuilder, DOMBuilder, and DOMOutputter. The
1310 default parser for all these is now the JAXP parser, with a fallback of Xerces
1311 if JAXP isn't available.
1312
1313 Added improved Verifier checks of well-formedness throughout all of JDOM.
1314 Among the most likely to be noticed:
1315 - Added Verifier detection of wrongly places "xmlns" attributes.
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
1316 - Added check in Attribute that a namespace with "" prefix must be
983b9110 »
2001-02-14 A record of changes between beta versions. Just added changes from
1317 NO_NAMESPACE.
1318 - Added Verifier checks so CDATA text cannot contain ">>]"
1319
1320 Upgraded provided parser to Xerces 1.2.
1321
1322 Improved SAXBuilder and DOMBuilder to be *much* smarter about namespaces.
1323 Most likely to be noticed:
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
1324 - DOMBuilder now keeps xmlns namespaces declaration location, and it now
1325 relies on the parser to handle namespaces (necessary for importing a
983b9110 »
2001-02-14 A record of changes between beta versions. Just added changes from
1326 document that has nodes moved around).
1327
1328 Made SAXBuilder and DOMBuilder much more specific on error reporting.
1329
225ef3dd »
2004-02-19 Reduced the visibility on some XMLOutputter internals that we don't w…
1330 Brought DOMOutputter up to DOM Level 2 compliance.
1331 - Added logic to DOMOutputter to add xmlns attributes to the DOM tree
983b9110 »
2001-02-14 A record of changes between beta versions. Just added changes from
1332 where appropriate.
1333
1334 Added SAXOutputter to generate SAX events.
1335
1336 Improved documentation on clone() methods.
1337
1338 Changed XMLOutputter.escape*Entities() to protected from private to help
1339 subclasses.
1340
1341 Improved removeContent() to solve a Crimson performance problem regarding
1342 duplicate string entries.
1343
1344 Added logic to prevent an element from being added as a child or descendent of
1345 itself.
1346
1347 Optimized SAXBuilder list handling so retrievals and removes will most likely
1348 hit on their first try instead of their last try.
1349
1350 Added Namespace output to Element.toString() to help debugging element
1351 namespace issues.
1352
1353 Improved the Verifier.isXML*() methods to operate much faster.
1354
1355 XMLOutputter now prints new lines after the declaration, even if newlines are
1356 turned off for the rest of the document.
1357
1358 Made PI's getSerializedForm() smarter about spacing between target and data.
1359 Now if there is no data, there's no space added.
1360
2bb1dde0 »
2001-02-14 Added changes made today.
1361 Guarantee XMLOutputter prints a new line at the end of each document, for
1362 better formatting, esp when printing to System.out.
1363
983b9110 »
2001-02-14 A record of changes between beta versions. Just added changes from
1364 Put samples in the "samples" package.
1365
9d0b3c03 »
2001-06-23 Comping a list of changes between beta6 and beta7. Very impressive!
1366
983b9110 »
2001-02-14 A record of changes between beta versions. Just added changes from
1367 BUG FIXES
1368 ---------
1369
1370 Fixed bug in XMLOutputter where "additional namespace" declarations would be
1371 output even if they were already declared by an ancestor.
1372
1373 Fixed bug where an element not in any namespace will still inherit the default
1374 namespace from an ancestor.
1375
1376 Added fix to recognize implicit "xml" namespace during
1377 Namespace.getNamespace() call.
1378
1379 Added fix so XMLOutputter no longer outputs XML_NAMESPACE.
1380
1381 Fixed Element.getDocument() behavior to work reliably.
1382
1383 Fixed Verifier to not see "xmlnsfoo" attributes as invalid.
1384
1385 Fixed Verifier to allow attribute names xml:lang and xml:space as special
1386 cases.
1387
1388 Improved all adapters to throw exceptions on error instead of printing stack
1389 traces.
1390
1391 Fixed Element.clone() to be a true deep copy.
1392
1393 Fixed bug in SAXBuilder that would throw an EmptyStackException if a PI
1394 appeared after the root element.
1395
1396 Fixed bug in doc.setMixedContent(List) so it now stores the new data
1397 correctly.
1398
1399 Made removeChildren() properly set parents to null, and to return true only if
1400 children were actually deleted.
1401
1402 Changed SAXBuilder's endPrefixMapping(String, String) to be
1403 endPrefixMapping(String) as it should have been so we now get the callback and
1404 can remove namespaces.
1405
1406 Fixed PartialList.addAll() to behave as specified.
1407
Something went wrong with that request. Please try again.