[jdom-interest] JDOM 1.1 Release Candidate

Paul Libbrecht paul at activemath.org
Mon Nov 12 01:39:51 PST 2007


I wanted to know if a possibility of bringing to protected the  
following methods of XMLOutputter.

   void printNamespace(Writer,Namespace,NamespaceStack)
   void printElementNamespace(Writer, Element,NamespaceStack)

This way, it owuld be possible to make "DTDAwareXMLOutputter", using  
Mark Wutka's DTD-parser, which is an essential ingredient of any  
refactoring method for XML-editors that edit languages with many  
(I sent a version with no subclass, I am happy to provide in contribs  
one as a subclass).

Currently, I had to patch directly the XMLOutputter which is no good  
style and the relaxation of making protected these two methods could  
lead me to a separate subclass.

With jdom-1.1 and this change ported up... everything runs fine in  
ActiveMath after recompilation (running jdk1.5 on Linux).

Before, however, I had the following:

java.lang.NoSuchMethodError: org.jdom.Element.setAttributes(Ljava/ 

... and indeed setAttributes was for List in JDOM 1.0...
I would suggest you keep both methods.

thanks in advance


Le 10 nov. 07 à 09:11, Jason Hunter a écrit :

> I just posted a JDOM 1.1 release candidate for download!
> This download is ready to go as far as I'm concerned, but I'm  
> offering it up as a release candidate preview because I want your  
> help to make sure.
> Please download the 1.1 candidate here:
> http://www.jdom.org/dist/binary/jdom-1.1-RC.tar.gz    // Unix
> http://www.jdom.org/dist/binary/jdom-1.1-RC.zip       // Windows
> (The only difference is the line endings.)
> Try the new build against your existing program(s).  Let me know  
> (you can send private mail) if it works or if it doesn't.  Either  
> way I'd like to know.  I won't call this build final until I get a  
> few OK's for each build.
> Two main things I want to verify:
> * I built this with Java 5 using a Java 1.2 target.  Will this  
> still work on older JVMs?
> * Did I miss anything in packaging up the build?  It's been a  
> while.  :)
> I'm calling it 1.1 instead of 1.0.1 because there are some new  
> public properties, methods, and constructors.
> Here's the list of additions and changes, from the CHANGES.txt file:
> Added an additional constructor to JDOMSource with an  
> EntityResolver which is passed to the internal DocumentReader  
> allowing the SAXOutputter to properly resolve DTDs.
> Added a forceNamespaceAware property to DOMOutputter which  
> specifies you want a DOM constructed with namespaces even if the  
> source JDOM document has no namespaces.
> Added support for attribute "INF" and "-INF" values, to indicate  
> positive and negative infinity, as XML Schema allows.
> Moved isXMLWhitespace() method from private in XMLOutputter to  
> public in
> Verifier.
> Clarified XMLOutputter behavior with newlines and indents:
>   setIndent(" ") means newlines and " " indents
>   setIndent("") means newlines and "" indents
>   setIndent(null) means no newlines and no indents
> Added set/getIgnoringBoundaryWhitespace() methods and features to  
> SAXBuilder and SAXHandler.
> Added a string constant for the JDOM_OBJECT_MODEL_URI used by JAXP  
> 1.3.  It deserves being part of the public API.
> Fixed bug in SAXOutputter where default namespaces would be  
> declared as
> xmlns:="" with a spurious colon.
> Fixed bug when using attributes without a namespace and outputting  
> to a
> JDOMResult.
> Removing check that a comment not start with a hyphen. A careful  
> reading of production 15 in the XML 1.0 spec indicates leading  
> hyphens are in fact allowed.
> Fixed bug where outputFragment() on SAXOutputter could cause a
> NullPointerException because the locator would be null during the  
> call.
> Fixed bug where serializing ElementFilter causes a  
> NullPointerException if the filter has no assigned namespace
> Fixed some subtle bad behaviors in listIterator.add() logic, using  
> brand new iterator logic.
> Allowed a String to be passed to ContentList.add(int, Object).
> Simplified JDOMAbout and renamed info.xml to jdom-info.xml, so
> getResourceAsStream() won't suffer any name collision.
> Fixed tiny issue where CDATA could be set with illegal character  
> content.
> Added logic to escape some special characters in namespace URIs.
> Fixed bug where the attribute type would change on a setAttribute()  
> call.
> Improved performance on Namespace handling.
> Improved and clarified Javadocs.
> -jh-
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/ 
> youraddr at yourhost.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2203 bytes
Desc: not available
Url : http://www.jdom.org/pipermail/jdom-interest/attachments/20071112/36f33db8/smime.bin

More information about the jdom-interest mailing list