users@jaxb.java.net

Fwd: Looking for hosting a Jaxb 2 plugin for namespace prefixes

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Tue, 22 May 2012 09:52:02 +0200

Have you seen my mail?


---------- Forwarded message ----------
From: Aleksei Valikov <valikov_at_gmx.net>
Date: Sun, May 20, 2012 at 12:09 AM
Subject: Re: Looking for hosting a Jaxb 2 plugin for namespace prefixes
To: users_at_jaxb.java.net


Hi,

> 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

Two suggestions:

* You can host this plugin in JAXB2 Commons
(http://jaxb2-commons.java.net) as a stanalone plugin. SVN URL should
be like https://svn.java.net/svn/jaxb2-commons~svn/myplugin/trunk
* You can join JAXB2 Basics project. your plugin would then be a part
of the JAXB2 Basics plugin package:
http://confluence.highsource.org/display/J2B/JAXB2+Basics+Plugins

Bye,
/lexi