You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Green, Jason M." <ja...@ngc.com> on 2006/10/05 14:27:52 UTC
Creating class files from schema help
Hey all,
I would like to be able to specify a different directory structure
other than noNamespace when compiling my schema. Is this possible if
there is no namespace declared in the schema?
Thanks,
Jason
Re: Creating class files from schema help
Posted by Radu Preotiuc-Pietro <ra...@bea.com>.
Yes, just use "##local" when describing the package mapping
in .xsdconfig.
Radu
On Thu, 2006-10-05 at 05:27 -0700, Green, Jason M. wrote:
> Hey all,
> I would like to be able to specify a different directory structure
> other than noNamespace when compiling my schema. Is this possible if
> there is no namespace declared in the schema?
>
> Thanks,
> Jason
>
_______________________________________________________________________
Notice: This email message, together with any attachments, may contain
information of BEA Systems, Inc., its subsidiaries and affiliated
entities, that may be confidential, proprietary, copyrighted and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
RE: Creating class files from schema help
Posted by "Green, Jason M." <ja...@ngc.com>.
got it. Thanks a lot Wing Yew
Jason
________________________________
From: Wing Yew Poon [mailto:wpoon@bea.com]
Sent: Thursday, October 05, 2006 5:38 PM
To: dev@xmlbeans.apache.org
Subject: RE: Creating class files from schema help
Jason,
try using a different name for your package than "com.package".
"package" is a reserved word in java and is causing the problem.
- Wing Yew
________________________________
From: Green, Jason M. [mailto:jason.green@ngc.com]
Sent: Thursday, October 05, 2006 12:44 PM
To: dev@xmlbeans.apache.org
Subject: RE: Creating class files from schema help
Wing Yew,
Thanks for the response. I have implemented what you given me. here
is my .xsdconfig file:
<xb:config
xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
<xb:namespace>
<xb:package>com.package</xb:package>
</xb:namespace>
</xb:config>
when i run the file through maven, I get a ton of errors. Here is an
example of them:
java:compile:
xmlbeans:compileSchema:
[schemaCompiler] Compiling 277 source files to
C:\projects\CWS\sdks\build\sdks\gcas_xml_converter\classes
[schemaCompiler]
C:\projects\CWS\sdks\build\sdks\gcas_xml_converter\xmlbeans\com\package\
ABLType.java:8: <identifier> expected
[schemaCompiler] package com.package;
[schemaCompiler] ^
[schemaCompiler]
C:\projects\CWS\sdks\build\sdks\gcas_xml_converter\xmlbeans\com\package\
ABLType.java:42: <identifier> expected
[schemaCompiler] public static com.package.ABLType
newInstance() {
[schemaCompiler] ^
[schemaCompiler]
C:\projects\CWS\sdks\build\sdks\gcas_xml_converter\xmlbeans\com\package\
ABLType.java:96: <identifier> expected
[schemaCompiler] private Factory() { } // No instance of
this class allowed
Do you know what the errors mean??
Thanks,
Jason
________________________________
From: Wing Yew Poon [mailto:wpoon@bea.com]
Sent: Thursday, October 05, 2006 1:41 PM
To: dev@xmlbeans.apache.org
Subject: RE: Creating class files from schema help
According to
http://dev2dev.bea.com/pub/a/2004/11/Configuring_XMLBeans.html:
Java bean classes may be generated in a specified package even when a
namespace is not specified in the schema.
Define the .xsdconfig file as
<?xml version="1.0" encoding="UTF-8"?>
<xb:config
xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
<xb:namespace>
<xb:package>com.xmlbeans</xb:package>
</xb:namespace>
</xb:config>
- Wing Yew
________________________________
From: Green, Jason M. [mailto:jason.green@ngc.com]
Sent: Thursday, October 05, 2006 5:28 AM
To: dev@xmlbeans.apache.org
Subject: Creating class files from schema help
Hey all,
I would like to be able to specify a different directory structure
other than noNamespace when compiling my schema. Is this possible if
there is no namespace declared in the schema?
Thanks,
Jason
_______________________________________________________________________
Notice: This email message, together with any attachments, may contain
information of BEA Systems, Inc., its subsidiaries and affiliated
entities, that may be confidential, proprietary, copyrighted and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.
RE: Creating class files from schema help
Posted by Wing Yew Poon <wp...@bea.com>.
Jason,
try using a different name for your package than "com.package".
"package" is a reserved word in java and is causing the problem.
- Wing Yew
________________________________
From: Green, Jason M. [mailto:jason.green@ngc.com]
Sent: Thursday, October 05, 2006 12:44 PM
To: dev@xmlbeans.apache.org
Subject: RE: Creating class files from schema help
Wing Yew,
Thanks for the response. I have implemented what you given me. here
is my .xsdconfig file:
<xb:config
xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
<xb:namespace>
<xb:package>com.package</xb:package>
</xb:namespace>
</xb:config>
when i run the file through maven, I get a ton of errors. Here is an
example of them:
java:compile:
xmlbeans:compileSchema:
[schemaCompiler] Compiling 277 source files to
C:\projects\CWS\sdks\build\sdks\gcas_xml_converter\classes
[schemaCompiler]
C:\projects\CWS\sdks\build\sdks\gcas_xml_converter\xmlbeans\com\package\
ABLType.java:8: <identifier> expected
[schemaCompiler] package com.package;
[schemaCompiler] ^
[schemaCompiler]
C:\projects\CWS\sdks\build\sdks\gcas_xml_converter\xmlbeans\com\package\
ABLType.java:42: <identifier> expected
[schemaCompiler] public static com.package.ABLType
newInstance() {
[schemaCompiler] ^
[schemaCompiler]
C:\projects\CWS\sdks\build\sdks\gcas_xml_converter\xmlbeans\com\package\
ABLType.java:96: <identifier> expected
[schemaCompiler] private Factory() { } // No instance of
this class allowed
Do you know what the errors mean??
Thanks,
Jason
________________________________
From: Wing Yew Poon [mailto:wpoon@bea.com]
Sent: Thursday, October 05, 2006 1:41 PM
To: dev@xmlbeans.apache.org
Subject: RE: Creating class files from schema help
According to
http://dev2dev.bea.com/pub/a/2004/11/Configuring_XMLBeans.html:
Java bean classes may be generated in a specified package even when a
namespace is not specified in the schema.
Define the .xsdconfig file as
<?xml version="1.0" encoding="UTF-8"?>
<xb:config
xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
<xb:namespace>
<xb:package>com.xmlbeans</xb:package>
</xb:namespace>
</xb:config>
- Wing Yew
________________________________
From: Green, Jason M. [mailto:jason.green@ngc.com]
Sent: Thursday, October 05, 2006 5:28 AM
To: dev@xmlbeans.apache.org
Subject: Creating class files from schema help
Hey all,
I would like to be able to specify a different directory structure
other than noNamespace when compiling my schema. Is this possible if
there is no namespace declared in the schema?
Thanks,
Jason
_______________________________________________________________________
Notice: This email message, together with any attachments, may contain
information of BEA Systems, Inc., its subsidiaries and affiliated
entities, that may be confidential, proprietary, copyrighted and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.
RE: Creating class files from schema help
Posted by "Green, Jason M." <ja...@ngc.com>.
Wing Yew,
Thanks for the response. I have implemented what you given me. here
is my .xsdconfig file:
<xb:config
xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
<xb:namespace>
<xb:package>com.package</xb:package>
</xb:namespace>
</xb:config>
when i run the file through maven, I get a ton of errors. Here is an
example of them:
java:compile:
xmlbeans:compileSchema:
[schemaCompiler] Compiling 277 source files to
C:\projects\CWS\sdks\build\sdks\gcas_xml_converter\classes
[schemaCompiler]
C:\projects\CWS\sdks\build\sdks\gcas_xml_converter\xmlbeans\com\package\
ABLType.java:8: <identifier> expected
[schemaCompiler] package com.package;
[schemaCompiler] ^
[schemaCompiler]
C:\projects\CWS\sdks\build\sdks\gcas_xml_converter\xmlbeans\com\package\
ABLType.java:42: <identifier> expected
[schemaCompiler] public static com.package.ABLType
newInstance() {
[schemaCompiler] ^
[schemaCompiler]
C:\projects\CWS\sdks\build\sdks\gcas_xml_converter\xmlbeans\com\package\
ABLType.java:96: <identifier> expected
[schemaCompiler] private Factory() { } // No instance of
this class allowed
Do you know what the errors mean??
Thanks,
Jason
________________________________
From: Wing Yew Poon [mailto:wpoon@bea.com]
Sent: Thursday, October 05, 2006 1:41 PM
To: dev@xmlbeans.apache.org
Subject: RE: Creating class files from schema help
According to
http://dev2dev.bea.com/pub/a/2004/11/Configuring_XMLBeans.html:
Java bean classes may be generated in a specified package even when a
namespace is not specified in the schema.
Define the .xsdconfig file as
<?xml version="1.0" encoding="UTF-8"?>
<xb:config
xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
<xb:namespace>
<xb:package>com.xmlbeans</xb:package>
</xb:namespace>
</xb:config>
- Wing Yew
________________________________
From: Green, Jason M. [mailto:jason.green@ngc.com]
Sent: Thursday, October 05, 2006 5:28 AM
To: dev@xmlbeans.apache.org
Subject: Creating class files from schema help
Hey all,
I would like to be able to specify a different directory structure
other than noNamespace when compiling my schema. Is this possible if
there is no namespace declared in the schema?
Thanks,
Jason
_______________________________________________________________________
Notice: This email message, together with any attachments, may contain
information of BEA Systems, Inc., its subsidiaries and affiliated
entities, that may be confidential, proprietary, copyrighted and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.
RE: Creating class files from schema help
Posted by Wing Yew Poon <wp...@bea.com>.
According to
http://dev2dev.bea.com/pub/a/2004/11/Configuring_XMLBeans.html:
Java bean classes may be generated in a specified package even when a
namespace is not specified in the schema.
Define the .xsdconfig file as
<?xml version="1.0" encoding="UTF-8"?>
<xb:config
xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
<xb:namespace>
<xb:package>com.xmlbeans</xb:package>
</xb:namespace>
</xb:config>
- Wing Yew
________________________________
From: Green, Jason M. [mailto:jason.green@ngc.com]
Sent: Thursday, October 05, 2006 5:28 AM
To: dev@xmlbeans.apache.org
Subject: Creating class files from schema help
Hey all,
I would like to be able to specify a different directory structure
other than noNamespace when compiling my schema. Is this possible if
there is no namespace declared in the schema?
Thanks,
Jason
_______________________________________________________________________
Notice: This email message, together with any attachments, may contain
information of BEA Systems, Inc., its subsidiaries and affiliated
entities, that may be confidential, proprietary, copyrighted and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.