users@jaxb.java.net

Looking for hosting a Jaxb 2 plugin for namespace prefixes

From: <manuel.siggen_at_vd.ch>
Date: Tue, 15 May 2012 13:50:36 +0200

Hello,

I would like to contribute a Xjc/Jaxb 2 plugin and I'm looking for
guidance.

This plugin allows to add - at compile-time -
javax.xml.bind.annotation.XmlNs annotations to generated package-info.java
files. A javax.xml.bind.annotation.XmlNs annotation allows to specify
prefixes for namespaces. Example :

@javax.xml.bind.annotation.XmlSchema(namespace = "
http://www.ech.ch/xmlns/eCH-0010/4", elementFormDefault =
javax.xml.bind.annotation.XmlNsForm.QUALIFIED, xmlns = {
    @javax.xml.bind.annotation.XmlNs(namespaceURI = "
http://www.ech.ch/xmlns/eCH-0010/4", prefix = "eCH-0010-4")
})
package ch.ech.ech0010.v4;

... so generated Xml doesn't use incremental namespaces (ns1, ns2, ns3,
...) but the one defined (here "eCH-0010-4").

Without this plugin, to specify a namespace prefix, the only solution
(without manipulating marshallers on the java side, that is) is to
manually maintain the package-info.java files [1], which is not very
convient, and causes other problems [2].

Would you be interested in hosting this plugin ? What kind of license do
you recommend ?

Thanks in advance,
Regards,

         Manuel Siggen


[1] see solution 2 from
http://hwellmann.blogspot.com/2011/03/jaxb-marshalling-with-custom-namespace.html
[2]
http://stackoverflow.com/questions/8837108/how-to-customize-package-info-java-generated-by-jaxb2

_________________________________________________________________
Manuel SIGGEN - Ingénieur de développement sur Unireg
Etat de Vaud, Département des infrastructures
Direction des systèmes d'information (DSI)
Pôle Référentiels
Avenue de Longemalle 1, CH-1020 Renens
Tél:++41(0)21 316 26 43 - Fax: ++41(0)21 316 27 26
manuel.siggen@vd.ch - http://www.vd.ch/