eclipse-ee4j / jaxb-ri

Jaxb RI
https://eclipse-ee4j.github.io/jaxb-ri/
BSD 3-Clause "New" or "Revised" License
202 stars 110 forks source link

Allow globalBindings to set nameXmlTransform like in schemaBindings #1779

Closed laurentschoelens closed 7 months ago

laurentschoelens commented 10 months ago

Linked to https://stackoverflow.com/questions/77437539/how-can-i-add-a-suffix-to-my-jaxb-generated-java-beans-using-jaxb2-maven-plugin When working on a single XSD (or a few number), it's quite easy to repeat the process of creating the binding section regarding the XSD, but while the number grows, it feels quite uneasy and repetitive.

It'd be easier if we could specify the nameXmlTransform element in globalBindings section like we do for schemaBindings to apply to any XSD currently worked on in XJC.

<jaxb:nameXmlTransform>
      <jaxb:elementName prefix="My" suffix="Dto"/>
      <jaxb:typeName prefix="My" suffix="Dto"/>
</jaxb:nameXmlTransform>
laurentschoelens commented 7 months ago

@lukasj : wait for this one, it may not be necessary since we could put schemaLocation="*" in normal bindings.

laurentschoelens commented 7 months ago

Closing issue as not needed, schemaLocation="*" is almost working for this. Filling new issue