users@jaxb.java.net

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

From: Ajay Aggarwal <aaggarwal_at_covergence.com>
Date: Wed, 2 Apr 2008 11:14:10 -0400

Thanks. But that didn't help.

When I removed the <jaxb:class> customization from this node, I still
got the same error.

However when I removed the <jaxb:property> customization and left the
<jaxb:class> as-is, it worked ok.

I wonder if <jaxb:property> is not a valid customization for a
"//xs:choice/xs:element" node?

-Ajay

-----Original Message-----
From: aleksei.valikov_at_gmail.com [mailto:aleksei.valikov_at_gmail.com] On
Behalf Of Aleksei Valikov
Sent: Wednesday, April 02, 2008 1:48 AM
To: users_at_jaxb.dev.java.net
Subject: Re: [xjc] [ERROR] compiler was unable to honor this property
customization.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net