users@jaxb.java.net

Re: Re: Re: Re: Global bindings

From: Felipe Gaúcho <fgaucho_at_gmail.com>
Date: Fri, 3 Oct 2008 11:35:59 +0200

yep, that's correct but...

IMHO, the problem is:

You are creating a mapping between a namespace and its respective
package name.. in the future, if someone change the schema namespace
or if you include a new schema with dashes in the namespace, your
system will present the wrong generated pkg name problem again -
unless someone remember to change also the binding customization.. so,
you are creating a dependency chain that causes common maintenance
problems..

Unless the non-standard underscore is that important, I suggest you to
keep all the information constrainned in the XSD schema.. so you have
all information portable and in a unique document...

and, the wrong name causes no performance or robustness problems, so
it is just an aesthetical detail that will screw an engineer life some
day ;) eheh


On Fri, Oct 3, 2008 at 11:26 AM, Lulseged Zerfu
<lulseged.zerfu_at_ericsson.com> wrote:
> Hi
>
> I have for example the following name space in an ietf schema common-policy:
>
> urn:ietf:params:xml:ns:common-policy produces a default package -> ietf.params.xml.ns.common_policy
>
> The default package generated is not following the java naming convention in my department and there I do customize it
>
>
> .......
> <jxb:bindings schemaLocation="urn.ietf.params.xml.ns.common-policy.xsd" node="/xs:schema">
> <jxb:schemaBindings>
> <jxb:package name="ietf.params.xml.ns.common.policy"/>
> </jxb:schemaBindings>
> <jxb:bindings node="//xs:element[@name='ruleset']">
> <jxb:class name="RuleSet" />
> </jxb:bindings>
> </jxb:bindings>
> .......
>
>
> to produce the package name "ietf.params.xml.ns.common.policy".
>
> Thank you
>
>
>
> -----Original Message-----
> From: Felipe Gaúcho [mailto:fgaucho_at_gmail.com]
> Sent: den 3 oktober 2008 09:04
> To: users_at_jaxb.dev.java.net
> Subject: Re: Re: Re: Global bindings
>
> The namespace of teh schemas is the default package name of the classes.. and this seems much better than force a package name through customizations.......
>
> about the ObjectFactory name, I am not sure but I guess it is impossible to change its name.
>
> On Fri, Oct 3, 2008 at 9:01 AM, Lulseged Zerfu <lulseged.zerfu_at_ericsson.com> wrote:
>> Thank you.
>>
>>
>> -----Original Message-----
>> From: Wolfgang Laun [mailto:wolfgang.laun_at_gmail.com]
>> Sent: den 3 oktober 2008 08:55
>> To: users_at_jaxb.dev.java.net
>> Subject: Re: Re: Global bindings
>>
>> Let JAXB generate different packages for each schema. This will nicely
>> separate all of the generated classes. You can do this by adding the
>> destination package to each schema, via
>> xs:annotation/xs:appinfo/jaxb:schemaBindings/jaxbPackage name="x.y",
>> or on an separate customization file.
>> -W
>>
>> On Fri, Oct 3, 2008 at 7:50 AM, Lulseged Zerfu
>> <lulseged.zerfu_at_ericsson.com> wrote:
>>> Thank you.
>>>
>>> I will not ask you that question but let me put another question:
>>>
>>> I have more than 20 schemas in my application. ObjectFactory class
>>> is
>>
>>> generated for each schema and I don't want each of the schemas to
>>> have
>>
>>> the same factory name. Is there any way to customize an ObjectFactory
>>> class?
>>>
>>> Lulseged
>>>
>>> -----Original Message-----
>>> From: Wolfgang Laun [mailto:wolfgang.laun_at_gmail.com]
>>> Sent: den 2 oktober 2008 16:15
>>> To: users_at_jaxb.dev.java.net
>>> Subject: Re: Global bindings
>>>
>>> There are a few more than the ones you quoted. You might look at the
>>> JAXB 2.1 specification, to be found at:
>>>
>>> https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_JCP-Site/en
>>> _
>>> US
>>> /-/USD/ViewProductDetail-Start?ProductRef=jaxb-2.1-mrel-eval-oth-JSpe
>>> c
>>> @C
>>> DS-CDS_JCP
>>>
>>> Don't ask me why this is in this highly obscure place.
>>> -W
>>>
>>>
>>> On Thu, Oct 2, 2008 at 2:07 PM, Lulseged Zerfu
>>> <lulseged.zerfu_at_ericsson.com> wrote:
>>>> Hi
>>>>
>>>> I am looking for all options for global bindings. The following are
>>>> those that I could find in one of the samples in 2.1.8. Or are there
>>>> the only options that are supported? where do I find documentation
>>>> for
>>> these options?
>>>>
>>>> <jxb:globalBindings
>>>> fixedAttributeAsConstantProperty="false"
>>>> collectionType="java.util.Vector"
>>>> typesafeEnumBase="xs:NCName"
>>>> choiceContentProperty="false"
>>>> typesafeEnumMemberName="generateError"
>>>> enableFailFastCheck="false"
>>>> generateIsSetMethod="true"
>>>> underscoreBinding="asCharInWord"> </jxb:globalBindings>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Lulseged
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>>> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>>> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>