users@jaxb.java.net

Using xjc:simple and xjc:treatRestrictionLikeNewType together?

From: VanIngen, Erik (FIPS) <"VanIngen,>
Date: Tue, 09 Aug 2011 15:20:31 +0200

Dear Jaxb,

In my custom binding file I am trying to use simple and treatRestrictionLikeNewType together. I notice that that does not work. Is there a way to get them working together, being both effective?


This is one of my experiments:

      <jaxb:globalBindings xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
            generateIsSetMethod="false" generateElementClass="true">
            <xjc:simple/>
      </jaxb:globalBindings>

      <!-- targetNamespace="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/common -->
      <jaxb:bindings xmlns:xs="http://www.w3.org/2001/XMLSchema"
            schemaLocation="http://svn.code.sf.net/p/opensdmx/svn/java/trunk/opensdmx-domain-21/sdmx21xsd/SDMXCommon.xsd" node="/xs:schema">
            <xjc:treatRestrictionLikeNewType/>
            <jaxb:schemaBindings>
                  <jaxb:package name="org.opensdmx.domain.v2_1.common" />
            </jaxb:schemaBindings>
      </jaxb:bindings>


Kind Regards,
Erik