You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlbeans-user@xml.apache.org by MIDON ALEXIS <AL...@sgam.com> on 2004/06/23 15:20:00 UTC

specify a package name - A newbie question


Hi! 

I am new to XMLBean but not to xml binding concept.
I know JAXB very well but I want to give a chance to XMlBean. JAXB is not so
perfect.

My first question is: Is it possible to specify a package name for the
generated classes? Actually my schemas do not have any namespaces.

My first test generated a random package "x12.x1.x7.x10.schemas". This is so
clear...

Thx in advance,

Alexis

- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


specify a package name - A newbie question

Posted by Richard J Cardone <ri...@us.ibm.com>.
Alexis,

The xsdconfig file parameter on the scomp command-line allows one to 
specify a package name.  Here's the content of my example.xsdconfig file:


<!-- An xsdconfig file must begin with a "config" element in the
        http://www.bea.com/2002/09/xbean/config namespace. Also, be sure
        to declare any namespaces used to qualify types in your schema 
(here,
        the namespace corresponding to the pol prefix. -->
<xb:config xmlns:xb="http://www.bea.com/2002/09/xbean/config">

    <!-- Use the "namespace" element to map a namespace to the Java 
package
        name that should be generated. -->
    <xb:namespace>
        <xb:package>com.mycompany.myexample</xb:package>
    </xb:namespace>
</xb:config>

Rich
>Hi! 
>
>I am new to XMLBean but not to xml binding concept.
>I know JAXB very well but I want to give a chance to XMlBean. JAXB is not 
so
>perfect.
>
>My first question is: Is it possible to specify a package name for the
>generated classes? Actually my schemas do not have any namespaces.>
>
>My first test generated a random package "x12.x1.x7.x10.schemas". This is 
so
>clear...
>
>Thx in advance,
>
>Alexis

specify a package name - A newbie question

Posted by Richard J Cardone <ri...@us.ibm.com>.
Alexis,

The xsdconfig file parameter on the scomp command-line allows one to 
specify a package name.  Here's the content of my example.xsdconfig file:


<!-- An xsdconfig file must begin with a "config" element in the
        http://www.bea.com/2002/09/xbean/config namespace. Also, be sure
        to declare any namespaces used to qualify types in your schema 
(here,
        the namespace corresponding to the pol prefix. -->
<xb:config xmlns:xb="http://www.bea.com/2002/09/xbean/config">

    <!-- Use the "namespace" element to map a namespace to the Java 
package
        name that should be generated. -->
    <xb:namespace>
        <xb:package>com.mycompany.myexample</xb:package>
    </xb:namespace>
</xb:config>

Rich
>Hi! 
>
>I am new to XMLBean but not to xml binding concept.
>I know JAXB very well but I want to give a chance to XMlBean. JAXB is not 
so
>perfect.
>
>My first question is: Is it possible to specify a package name for the
>generated classes? Actually my schemas do not have any namespaces.>
>
>My first test generated a random package "x12.x1.x7.x10.schemas". This is 
so
>clear...
>
>Thx in advance,
>
>Alexis