users@jaxb.java.net

Re: Bindings documentation

From: Ryan Shoemaker - JavaSoft East <Ryan.Shoemaker_at_sun.com>
Date: Tue, 24 Jun 2003 16:40:58 -0400

Hank Ratzesberger wrote:

> Ed,
>
> Thank you. I had not seen the tutorial pages before
> and they are very helpful.
>
> I would still like a tip. I am using a supplied schema
> (iso 19115) and it has type and element declarations
> like _DQ_Quality and DQ_Quality. As the default is to
> remove "_" from identifiers, the result is namespace
> collision.
>
> I don't want to annotate these files, is there a
> shortcut way to keep "_" in identifiers, or do I
> need to build a custom binding for each of these
> classes?
>

You can use an external bindings file and the "underscoreBinding"
customization[1]. The default setting treats '_' as a word separator,
but you can flip that over to "asCharInWord" to have it keep the
underscores as you've described. Since the "underscoreBinding"
customization is global, you only need to set it once and it will
change the name mapping for all the generated classes. Take a look
at the sample apps to see how to use external bindings.

--Ryan

[1] JAXB Specification sec 6.5.3

> Best regards,
> Hank
>
>
> ----- Original Message -----
> From: "Ed Mooney" <Ed.Mooney_at_Sun.COM>
> To: <JAXB-INTEREST_at_JAVA.SUN.COM>
> Sent: Monday, June 23, 2003 1:47 PM
> Subject: Re: Bindings documentation
>
>
>
>>Hi Hank,
>>
>>There's the bindings schema: http://java.sun.com/xml/ns/jaxb/. There's
>>also Chapter 6 of the spec (http://java.sun.com/xml/downloads/jaxb.html)
>>and Chapter 10 of the Tutorial
>>(http://java.sun.com/webservices/docs/1.1/tutorial/doc).
>>
>>Regards,
>>--
>>Ed Mooney |Sun Microsystems, Inc.|Time flies like
>>Java Web Services |UBUR02-201 |an arrow, but
>>Ed.Mooney_at_Sun.COM |1 Network Drive |fruit flies like
>>781-442-0459 |Burlington, MA 01803 |a banana. Groucho
>>
>>Hank Ratzesberger wrote:
>>
>>>I am having trouble finding complete specification
>>>for the bindings file. WSDL only has one example
>>>program demonstrating the .xjb binding file.
>>>
>>>Can someone provide me a link?
>>>
>>>Thank you,
>>>Hank
>>>
>>>============================================
>>>Replying to a list? I'll get my copy there!
>>>
>>>Hank Ratzesberger
>>>Institute for Crustal Studies
>>>University of California, Santa Barbara
>>>============================================
>>
>