users@jaxb.java.net

Re: [xjc] [ERROR] compiler was unable to honor this property customization.

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Wed, 2 Apr 2008 07:48:05 +0200

Hi.

> <jxb:bindings node="//xs:choice/xs:element[@name='class']">
>
> <jxb:class name="Clazz"/>
>
> <jxb:property name="Clazz"/>
>
> </jxb:bindings>
>
>
>
>
>
> And the schema fragment, where this binding applies and error occurs is
> below:
>
>
>
> <xsd:complexType name="classType">
>
> <xsd:sequence>
>
> <xsd:choice maxOccurs="unbounded">
>
> <xsd:element name="class" type="classInstanceType"
> minOccurs="0" maxOccurs="unbounded">
>
> <!-- make sure that the properties have unique names -->
>
> <xsd:unique name="propertyNameConstraint">
>
> <xsd:selector xpath="property"/>
>
> <xsd:field xpath="@name"/>
>
> </xsd:unique>
>
> </xsd:element>
>
> <xsd:element name="group" type="classGroupType"
> minOccurs="0" maxOccurs="unbounded"/>
>
> </xsd:choice>
>
> </xsd:sequence>
>
> </xsd:complexType>

Your jxb:class binding applies to xsd:element, which is not correct
(you need to customize the xsd:complexType with jxb:class).

Bye.
/lexi