Lawrence,
Thanks a bunch. This helped me to figure things out.
 
1. save myXsdConfig.xsdconfig as the following to the directory with my xsds.
 
<xs:config xmlns:xs="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
<!-- Use the "namespace" element to map a namespace to the Java
package
name that should be generated. -->
<xs:namespace uri="##any">
<xs:package>com.mvg.commerce.messages</xs:package>
</xs:namespace>
</xs:config>
 
2. Save target in ant as the following (I was missing
 
<target name="phoney" depends="init" description="Buildsphoney Schema">
<xmlbean
classgendir="${xmlbeans.classgendir}/phoney"
srcgendir="${xmlbeans.srcgendir}/phoney"
destfile="${build.schemalibdir}/${build.schemaprefix}-phoney.jar"
classpathref="xmlbeans.path">
<fileset dir="schemas/phoney" includes="*.xsd"/>
<fileset dir="schemas/phoney" includes="*.xsdconfig"/>
</xmlbean>
</target>

 
Now whether I have a Namespace defined or not, things work.

Thanks again everyone for the messag es and help!
 
Wayne
 
 
 

Lawrence Jones <[EMAIL PROTECTED]> wrote:
Hi Wayne
 
Note the file doesn’t have to be called “.xsdconfig” it has to have file extension “.xsdconfig” – you can call the rest of the filename whatever you like (usually the same as the .xsd).
 
I’m surprised ##any didn’t work – are you passing the XXXX.xsdconfig filename in as one of the input files?
 
But anyway try using ##local instead of ##any – that setup is detailed in the schema but not in the docs and is specifically for the no targetNamespace issue (I agree the docs ought to be updated).
 
Cheers,
 
Lawrence
 

From: Wayne McFadden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 31, 2006 3:34 PM
To: [email protected]
Subject: Fwd: Re: .xsdconfig problem
 
says the following:
 
Note: If schema doesn't include targenamespace then use
<xb:namespace uri="##any">    <xb:package>org.openuri.easypo.xsdconfig</xb:package>  </xb:namespace>  
 
to specify package names. 
 


Edward Frederick <[EMAIL PROTECTED]> wrote:
Date: Tue, 31 Jan 2006 17:57:38 -0500
From: Edward Frederick <[EMAIL PROTECTED]>
To: [email protected]
Subject: Re: .xsdconfig problem

Don't you need a target namespace?

On 1/31/06, Wayne McFadden <[EMAIL PROTECTED]>wrote:
> I am using ant and I'm trying to get the following xsd below into a package.
>
> The last .xsdconfig file (named .xsdconfig) was
>
>
> <xs:config
> xmlns:xs="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
>
>
>
> com.confirmhub.xmlbean.schema
>
>
>
> </xs:config

>
> I can't seem to get the right combination to get the package created, it
> always puts it into nonamespace, like it isn't even reading my .xsdconfig
> file. Any help is appreciated.
>
>
>
> <xs:schema
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:po="http://openuri.org/easypo"
> elementFormDefault="qualified">
>
>
>
>
>
>
> maxOccurs="unbounded"/>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> >
>
>
>
>
>
>
>
>
>
>
>
> </xs:schema

>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

Reply via email to