users@jaxb.java.net

Re: binding docbook 5.0 to Java

From: castef <scasadei_at_yahoo.com>
Date: Thu, 4 Feb 2010 07:05:07 -0800 (PST)

Is it possible that, although xjc complains about the *name* of the class,
the error is caused by xjc not being able to create an enum type from the
schema code:

    <define name="db.bridgehead.renderas.enumeration">
      <choice>
        <value>sect1</value>
        <a:documentation>Render as a first-level section</a:documentation>
        <value>sect2</value>
        <a:documentation>Render as a second-level section</a:documentation>
        <value>sect3</value>
        <a:documentation>Render as a third-level section</a:documentation>
        <value>sect4</value>
        <a:documentation>Render as a fourth-level section</a:documentation>
        <value>sect5</value>
        <a:documentation>Render as a fifth-level section</a:documentation>
      </choice>
    </define>





castef wrote:
>
>
> I am somewhat reluctant to modify the schema since I am a novice.
> On the other hand, the relax NG version, docbook.rng, was correctly parsed
> by xjc.
> parsing a schema...
> compiling a schema...
> But, I got lots of errors of the type:
> [ERROR] Invalid class name "db.bridgehead.renderas.enumeration".
> Either XJC has failed to derive a class name from XML name, or invalid
> name is given.
> Use <jaxb:class> customization to override a name.
>
> These errors show up if and only if the string "enumeration" appears in
> the name.
> I tried to replace "enumeration" with "jenumeration" but that did not
> solve the problem.
> I am quite puzzled by this, even more so that the reserved keyword "class"
> did not trigger an error (e.g., <define name="db.biblio.class.attribute">
> was ok).
>
> -SC
>
>
> Wolfgang Laun-2 wrote:
>>
>> The duplications of the attributes "role" and "type" appear to be errors
>> in the XML schema, compare the documentation of the docbook elements
>> where this happens. You could remove these two <xs:attribute> elements
>> whenever they are sibling of <xs:attributeGroup
>> ref="docbook:db.common.linking.attributes"/>
>>
>> -W
>>
>> On Wed, Feb 3, 2010 at 2:02 PM, castef <scasadei_at_yahoo.com> wrote:
>>>
>>>
>>>
>>> Hello,
>>> has someone been able to bind the docbook 5.0 schemas (xls and rng) to
>>> Java?
>>> I have been getting similar errors similar to those gotten by Raul
>>> Selas:
>>>
>>> 1) xsd
>>> The command:
>>> xjc -p docbook docbook.xsd
>>> yields a long list of errors, the first one being:
>>> [ERROR] Property "Role" is already defined. Use <jaxb:property> to
>>> resolve
>>> this conflict.
>>> line 7999 of file:/C:/Users/stefano/core/___docbookjava/jaxb/docbook.xsd
>>>
>>> 2) rng
>>> The command:
>>> xjc –relaxng -p docbook docbook.rng
>>> also yields a long list of errors, the first one being:
>>> [ERROR] Invalid class name "db.bridgehead.renderas.enumeration". Either
>>> XJC
>>> has failed to derive a class name from XML name, or invalid name is
>>> given.
>>> Use <jaxb:class> customization to override a name.
>>>  line 1734 of
>>> file:/C:/Users/stefano/core/___docbookjava/fusesource/library/template/lib/docbook50/rng/docbook.rng
>>>
>>> Stefano
>>>
>>
>>
>
>

-- 
View this message in context: http://old.nabble.com/What-does-it-means--%22compiler-was-unable-to-honor-this-property-customization.-It-is-attached-to-a-wrong-place%2C-or-its-inconsistent-with-other-bindings.%22-tp10196793p27452221.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.