On item of note. I think that it will better to use simple replacement wrapping/delegation for handling different JPA ORM Schema versions, rather than a full blown XSLT to essentially transform one (or 2[1]) elements as part of the StAX pipeline. Eric kindly contributed code for handling that as well.
I am a little nervous about this because "upgrading" to 2.1 (or to our new "combined" XSD) we would need to adjust namespaces, and I have had trouble with this approach and introducing namespaces. IIRC the issue is that each built element/attribute representation encodes its namespace as resolved initially, not after I alter the root. I assume the same issue would present itself with changing a namespace. http://stackoverflow.com/questions/10653416/stax-and-namespaces is the issue I saw originally trying to play with namespaces (see the answer and my response).
[1] upgrading 1.0 requires we handle mapping-metedata-complete in addition to the version element
|