title: Jaxb: Generate constant value for fixed-value attribute
body: <p>I'm currently working on a xsd which uses the following contruct:</p>
  
  <pre><code>&lt;xs:attribute name="listVersionID" type="xs:normalizedString" use="required" fixed="1.0"&gt;
  </code></pre>
  
  <p>While not problematic per se, it is rather annoying to work with, since the fixed-value of this definition increases between releases of the xsd spec, and we need to modify the values in a seperate constants-class to keep them valid, although little if anything of interest in the xsd has changed. The xsd is maintained elsewhere, so just changing it is no option.</p>
  
  <p>Thus I was asking myself wether there is a jaxb-plugin or similar to turn fixed-value attributes into constants ala </p>
  
  <pre><code>@XmlAttribute(name = "listVersionID")
  @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
  @XmlSchemaType(name = "normalizedString")
  protected final String listVersionID = "1.0";
  </code></pre>
  
  <p>instead of just</p>
  
  <pre><code>@XmlAttribute(name = "listVersionID")
  @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
  @XmlSchemaType(name = "normalizedString")
  protected String listVersionID;
  </code></pre>
  
  <p>which must be populated manually.</p>
  
  <p>Does anyone know of such?</p>