users@jaxb.java.net

RE: Re: External customize

From: Lulseged Zerfu <lulseged.zerfu_at_ericsson.com>
Date: Mon, 16 Nov 2009 14:15:39 +0100

Thanks

<!-- preInstantiable -->
<jxb:bindings node=".//xs:attribute[@name='preInstantiable']">
        <jxb:javaType name="boolean"
        
parseMethod="com.ericsson.ims.pgm.config.converter.TextualNumericConvert
er.parseBoolean"
        
printMethod="com.ericsson.ims.pgm.config.converter.TextualNumericConvert
er.printBoolean">
         </jxb:javaType>
</jxb:bindings>


I have used (dot) as above. Which still complains. The error is:
 
2009-11-16 14:11:59 CET: [ERROR] Error while parsing schema(s).Location
[
file:/F:/eclipse-jee-galileo-SR1-win32-wei/workspace/application-config/
src/main/resources/xsd/binding.xjb{49,111}]. <javaType> customization in
this context must be nested (JAXB spec sec 6.8.1):
        <property>
          <baseType>
            <javaType ...>
          </baseType>
        </property>
2009-11-16 14:11:59 CET: Build errors for application-config;
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error
in the plugin manager executing goal
'org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.7.2:generate': Mojo
execution failed.

Lulseged


-----Original Message-----
From: aleksei.valikov_at_gmail.com [mailto:aleksei.valikov_at_gmail.com] On
Behalf Of Aleksei Valikov
Sent: den 16 november 2009 14:01
To: users_at_jaxb.dev.java.net
Subject: Re: External customize

Hi,

> My binding.xjb file looks like this:
>
> <!-- preInstantiable -->
> <jxb:bindings
>
node="//xs:complexType[@name='componentAttributesT']//xs:element[@name='
proxiedComponent']">
> <jxb:bindings
> node="//xs:attribute[@name='preInstantiable']">

> I was not able to compile with this customization. I guess I am not
> getting the correct xpath.

Try .//xs:attribute[@name='preInstantiable'] (with leading dot). //
means from root, not from the "current" node, so you may get several
nodes, not just one. However in your schema you only has one attribute,
so it should work...
What exactly the error is?

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