[jboss-dev-forums] [Design of JBossXB] - Re: Using annotations to define schema mappings

jason.greene@jboss.com do-not-reply at jboss.com
Fri Oct 13 14:23:29 EDT 2006


I checked and JAXB does the same thing to support the binding file. xjc loads it into a DOM tree, then applies the bindings using xpath, then parses the modified DOM.

To answer your question though, I think XSModel is flawed in a number of ways, and IMO we need to move away from it.

These include


  | [1] not very extensible
  | [2] incomplete / buggy
  | [3] tied to xerces
  | [4] language neutral API that is a bitch to work with in java
  | [5] can't use it to write schema
  | 
  | 
  | The sun jaxb implementation has a seperate model for reading a writing. They externalized their reading implementation, its called XSOM:
  | 
  | https://xsom.dev.java.net/
  | 
  | See the design overview here:
  | https://xsom.dev.java.net/implementation.html
  | 
  | For writing they basically implement a light weight model that only writes what they generate.
  | 
  | I think we should look into switching to XSOM because it doesn't suffer from problems 1-4. It is quite efficient, uses SAX, and it supports customization using visitors. 
  | 
  | Although, I don't think this solves the overall problem in the java world, which is the lack of a standard XML Schema api that supports both reading and writing. The only thing close to it I have seen is the eclipse schema model, but it is tied to tons of bloated dependencies.
  | 
  | -Jason

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978265#3978265

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978265



More information about the jboss-dev-forums mailing list