GullFOSS
OpenOffice.org Engineering at Sun
 
 
 
 
More Flickr photos tagged with openoffice

Today's Page Hits: 2394

Locations of visitors to this page
Wednesday, 11 Nov 2009
A new version of ODFDOM 0.7.5 has been released!
Svante Schubert
The milestone had already been uploaded last week at the OpenOffice.org conference in Orvieto (Italy), but conference activities distracted me from announcing the release officially on the list.

Now you may find the ODFDOM packages of binaries and JavaDoc at ODFDOM's download section. Detailed release notes have been added to the Wiki.

My thanks to the ODFDOM developer community, especially IBM's team for their assistance to make this release possible!

To me the best news from last week's conference is the rising interest from other ODF development teams. Last week in Orvieto the teams of lpOD and ODFKIT showed interest in joining our efforts in a concept of a cross language ODF API such as ODFDOM.
Their programming language of choice will be Python (lpOD) and C++ (ODFKIT). In addition the chair of AODL (another ODF Toolkit Union project) gave signs of interest in joining an aligned approach.

The next major release (version 0.8) of ODFDOM (Java) is planned for the end of January 2010.
This release should roll out the design we already have in our minds, but which has not been integrated to our implementation so far.
Aside of improvements of design, there will be enhancements of our convenience functionality for instance the 'Navigation API' (currently delivered with an incubator status). The purpose of the 'Navigation API' is to be able to find elements and text, based on search criteria (e.g. regular expressions).

For a complete list of possible upcoming changes, please take a look at our task list.

For joining the project pick a task or contact us on the project's developer mailing list.

Looking forward to continuing our important work!
Svante

tags:

Posted by Svante Schubert on 11 Nov 2009  |  PermaLink |  Bookmark to Delicious To Delicious |  Digg this Digg this  |  Comments[0]

Wednesday, 22 Jul 2009
ODFDOM 0.7 - the new Release of the OpenDocument Java Library
Svante Schubert

A new version of ODFDOM - the OpenDocument Java API - has been released!
ODFDOM is an Apache 2 licensed Java library to easily create, access and manipulate ODF documents.

If you never have heard of ODFDOM, you might want to get a quick overview first.

With this release we made an enormous step forward!
It took us several months of continuous refactoring until we finally agreed on shipping this new release. 'We' are in this case Benson Margulies, David Eisenberg and a group of IBM and Sun developers.

The 0.7 is more than worth to be called a release, embracing several stunning new features, the best listed below:

ODF 1.2 support

With 0.7 we support the latest revision of the ODF 1.2 community draft, which has been published last week.
Supporting means as well that there is a Java class for every XML element and attribute provided by ODF 1.2.
As we generate the classes directly from the RelaxNG schema, we are able to easily update on ODF changes.
Currently we create the 599 elements and 1301 attributes of ODF 1.2 in less than 20 seconds.

ODF usability

To ease the DOM handling, every element now has methods to create their element children, requiring mandatory information as parameters. With this users no longer have to look into the RelaxNG schema to verify if an element is allowed as a child.
Furthermore there are methods to access all possible attributes of the element, as well as enumerations for their possible values.
Aside of elements and attributes there are now as well classes for all data types listed in ODF 1.2 (mostly W3C schema types, which now bear validate and helper functions).

Finally, the convenient layer of ODFDOM shows examples how easy a final API might look like.
For instance it is a simple three liner to

  1. create a new ODF document,
  2. add text and
  3. save the new document.

OdfTextDocument odt = OdfTextDocument.newTextDocument();
odt.addText("My important text");
odt.save("MyExample.odt");

Documentation

David Eisenberg has contributed new tutorials.
Our JavaDoc has been improved. Now every single ODFDOM element/attribute class links to an XHTML version of the spec, where the functionality of the XML node is being described in detail. This spec is bundled with the JavaDoc (soon the spec will be separated in smaller pieces to speed up loading times).

Build environment

Last but not least, with the support by Benson Margulies, we were able to switch our build environment from ANT to Maven. By using Maven we made our dependencies declarative. We no longer add dependent JARs to our sources (e.g. the parser XercesImpl.jar), but are able to download them via Maven on demand. Following this idea of modularization, we were able to simplify the source structure of ODFDOM by moving our code-generation to an own new project called relaxng2template.

Still interesting challenges lie in front of us and we hope with this release we are able to arouse interests at like-minded developers to join our efforts!

I hope you all enjoy the new release!
Svante

tags:

Posted by Svante Schubert on 22 Jul 2009  |  PermaLink |  Bookmark to Delicious To Delicious |  Digg this Digg this

Monday, 14 Jul 2008
Switching to Java 1.5 ... and than to OpenJDK :-)
Kay Ramme

I just recently started a discussion on jdk@tools.openoffice.org regarding the OOo Java baseline. Background was the open sourcing of Java to the OpenJDK project, and OpenJDK becoming fully functional, please see my other posting for some details.

There are two points I would like to discuss respectively to announce here, in case nobody objects. Both points are based on an overview listing the OOo platforms and the used Javas respectively the availability of OpenJDK, please see here for the details.

1) While discussing the OpenJDK switch with Svante Schubert, we observed two (pressing) issues in OOos current Java libraries. The first issue is, that some libraries are checked in in binary form, while the second is, that some libraries are functional redundant. Please have a look at Svantes posting for the details. Plan is to fix both issues before releasing OOo 3.0. Unfortunately that means, that we need to raise the Java baseline from 1.3.1 (see here for the old but still current OOo Java policy) to 1.5.

2) Later on, after the availability of OpenJDK (or a compatible version as for Mac OS X), I suggest to switch to OpenJDK as the baseline for OOo, always using the latest OpenJDK available on all of OOos platforms. That would eliminate the need to come together every once a while and to rediscuss Java baselines ... Generically I would express the OpenJDK baseline like this: "Every (Java) developer can expect that an OpenJDK (of a particular release) or better (a Sun, IBM or whatever Java with a higher version number) can be used to build and run OOo. No Java developer shall use any non-standard API and shall ensure that his/her code runs with OpenJDK or better."

There are still some unknowns in the Java platform listing, I did mail the listed owners of these platforms (as listed on http://porting.openoffice.org). Unfortunately some of the mail addresses are not valid any more. So, if you think that you are stakeholder and that the above proposals are not suitable for you, please let me know urgently.

Regards

Kay


tags:

Posted by Kay Ramme on 14 Jul 2008  |  PermaLink |  Bookmark to Delicious To Delicious |  Digg this Digg this  |  Comments[2]

Monday, 01 Oct 2007
Is your Java extension ready for 2.3?
Stephan Bergmann
Until OOo 2.2, all the jars from OOo itself (in the program/classes directory) as well as all the jars from deployed extensions ended up on the one big global class path.  This has changed dramatically with OOo 2.3, where the global class path is now empty.  Unfortunately, some OOo extensions that worked just fine with OOo 2.2 stopped to work with OOo 2.3.  The following are points OOo extension authors should be aware of, to produce well-behaved extensions that will work fine in any OOo:

First, if an extension contains multiple jars, dependencies among these jars need to be recorded in the Class-Path entries of the jars' META-INF/MANIFEST.MF files.  This is general Java stuff.

Second, if an extension calls code that uses the context class loader (to load classes from your extension), the extension needs to set up an appropriate context class loader around those calls.  All Greek to you?  See below.  This also is general Java stuff.

Third, for UNO to work properly, a jar should record in the UNO-Type-Path entry of its META-INF/MANIFEST.MF file whether it contains class files that represent UNO types.  See issue 80405 for (well hidden, for now) documentation.  This is not general Java stuff, but rather is specific to the UNO framework.

Now, to the context class loader:  There are Java libraries that dynamically load classes by name, for example javax.xml.parsers.SAXParserFactory.  When all those libraries have is a class name, where do they get a class loader from to call loadClass?  Out of thin air.  Or rather, they call Thread.getContextClassLoader to obtain such a class loader.  If you do not set a specific one, getContextClassLoader will normally return the application class loader (the one that works off the global class path).  And that happened to be a wonderfully working default in OOo 2.2, where everything you would ever want to load was on the one big global class path, anyway.  So nobody bothered to explicitly set a context class loader where needed (those are the perils of implicit arguments).  And now those extension start to fail mystically with OOo 2.3, where the application class no longer knows how to load all those classes...

tags:

Posted by Stephan Bergmann on 01 Oct 2007  |  PermaLink |  Bookmark to Delicious To Delicious |  Digg this Digg this

Thursday, 08 Mar 2007
When Java's separation promises don't deliver
Stephan Bergmann

The upcoming cleanup of OOo's Java class path turned up an interesting issue in OOo's database module: Each database document uses some Java code (sdbc_hsqldb.jar) that in turn uses a native library (hsqldb2). Until now, sdbc_hsqldb.jar was on OOo's global Java class path, was thus loaded once by the global application class loader, and thus made just one System.load call to load the native hsqldb2 library, no matter how many different database documents were open in a single OOo session.

Now, sdbc_hsqldb.jar is no longer on OOo's global Java class path, but rather each database document sets up a dedicated URLClassLoader to load the jar. That means that each database document loads a different instance of the jar's classes. And that means that each instance calls System.load to load hsqldb2. When System.load is asked by two different class loaders to load the same library twice, it throws an UnsatisfiedLinkError the second time (this is not obvious from the documentation, but you can verify it by reading the code). This is certainly in there for a reason (at least some OSs probably just cannot load the same native library more than once into a single process, and sharing a single native library instance across class loaders is presumably a security issue). However, it is a rather unpleasant interference: OOo's database documents stopped to work.

This asks for caching: Instead of one set of Java classes per document, reuse already loaded classes across documents. It turned out that doing this in a reasonable way via JNI is a rather nontrivial endeavor. It left me with an issue full of open questions (a cry for help, of sorts).

tags:

Posted by Stephan Bergmann on 08 Mar 2007  |  PermaLink |  Bookmark to Delicious To Delicious |  Digg this Digg this

GullFOSS