docx4j trunk now uses JAXB
December 22nd, 2007 by Jason10 days ago, we created a proof of concept for using JAXB on a subset of wml.xsd (one of the OpenXML schema files).
We’ve declared that a success, and moved it from a branch into the trunk of docx4j. Here be the generated classes.
plutext-server has now been migrated to use it.
And Jo is working with it as he codes docx4all.
So we’re pretty committed at this point!
We’re tidying up bits of the object model as we go (ie editing our xsd to generate Java that we like). So far, paragraphs (p, pPr, r, rPr, t) and structured document tags (sdt, sdtPr, sdtContent) have had our attention.
We’re also making a few changes to the generated classes, so we need to think about how best to prevent those changes from getting lost when the classes are re-generated. There’s a bit of support in XJC for this, and diff may come in handy, but I’d love to hear best practices.
What we have now is an object model for key pieces of the Main Document part (document.xml), in package name
org.docx4.jaxb.document. Next cab off the rank is the Styles part, which we’ll put in org.docx4.jaxb.styles.