Links

Project Documentation

XSD Schemas for Extensions

All of the extension object model are generated using JAXB
from the following schema. Some of them are official schema (which are usually higher quality) provided by the specs, some of them I created myself (which are usually very simplistic).

Adding support for your favorite extension

Since the object model are generated by JAXB, they are not in the builder style as the core model. You might want the extension elements to be mapped to your own object model. There also might be some extension elements that Yarfraw does not yet support. You should consider adding support for these extension elements instead of working with the DOM element object directly.

To do that, all you need to do is to write two mapping methods: one method to convert a custom object into a list of DOM elements; one method to convert a list of DOM elements into the same custom object. Yarfraw does not impose any restrctions on the signature of these mapping methods, but in general, they should look like:

If you have written support methods for an extension that Yarfraw does not yet support, or you feel that your object model is better than the one that Yarfraw currently uses, please send me a note and I will be more than happy to replace Yarfraw's current implementation with yours. As mentioned above, all the extension object models are generated by JAXB using some xsd schema files. If the extension you would like to add already has a schema file, you can use the JAXB binding tools to convert it to an object model and then implement the extension methods as followed:

If for whatever reason, you do not want to use JAXB, you can use any other XML binding framework, or even do the object binding manually. The reason that I am using JAXB here is because it does most of the work for me so I can add things really quickly.

For more details, I encourage to take a look at the Javadoc
. Also check out the FAQ
section for more insights about this API.