You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Psoroulas John <ps...@telecom.ntua.gr> on 2007/10/31 17:37:07 UTC

ignore multi definitions

Hi,

I have the following two very simple xsds



----------
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:iso:foo1"
						targetNamespace="urn:iso:foo1" elementFormDefault="qualified">
	<xs:element name="Document" type="mytype1"/>

	<xs:complexType name="mytype2">
		<xs:sequence>
			<xs:element name="Id" type="xs:string"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="mytype1">
		<xs:sequence>
			<xs:element name="Header" type="mytype2"/>
		</xs:sequence>
	</xs:complexType>

</xs:schema>
--------------

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:iso:foo2"
						targetNamespace="urn:iso:foo2" elementFormDefault="qualified">
	<xs:element name="Document" type="mytype1"/>

	<xs:complexType name="mytype2">
		<xs:sequence>
			<xs:element name="Id" type="xs:string"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="mytype1">
		<xs:sequence>
			<xs:element name="Header" type="mytype2"/>
		</xs:sequence>
	</xs:complexType>

</xs:schema>

--------------



In the xsds above, the same types are defined (mytype1, mytype2).

I want the xmlbeans compiler to ingnore multi-definitions in

the above schmemas so as only one Mytype1 and Mytype2 classes to be generated

(not Mytype1, Mytype12, Mytype2, Mytype22).

I use the following command

scomp -out foo.jar  -compiler C:\j2sdk1.4.2_13\bin\javac.exe  -allowmdef
"urn:iso:foo1 urn:iso:foo2" -mx 1024M *.xsd config.xsdconfig


but has no effect


I really appreciate any help


Best regards

John







the used config.xsdconfig file is

<xb:config  xmlns:xb="http://www.bea.com/2002/09/xbean/config">
        		<xb:namespace uri="urn:iso:foo1">
            		<xb:package>com.foo.types</xb:package>
        		</xb:namespace>
        		<xb:namespace uri="urn:iso:foo2">
            		<xb:package>com.foo.types</xb:package>
        		</xb:namespace>
</xb:config>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


RE: ignore multi definitions

Posted by Psoroulas John <ps...@telecom.ntua.gr>.
The refactor seems the best way Radu

Thanks for your help,

John

On Thu, November 1, 2007 17:29, Radu Preotiuc-Pietro wrote:
> John,
>
>
> Ideally, you would refactor the Schemas so there are no duplicates. But
> if you don't do this, you can use -allowmdef, just note the URI of those
> common Schema types. Your example did not have any "common" Schema types,
> which is why -allowmdef had no effect.
>
> Radu
>
>
>
> ________________________________
>
>
> From: Jacob Danner [mailto:jacob.danner@gmail.com]
> Sent: Thursday, November 01, 2007 7:21 AM
> To: user@xmlbeans.apache.org
> Subject: Re: ignore multi definitions
>
>
>
> You should look into the sfactor utility available in the bin
> directory. That utility will take common types and create a new xsd from
> them -jacobd
>
>
>
> On 11/1/07, Psoroulas John <ps...@telecom.ntua.gr> wrote:
>
>
> The real xsds that I want to process have common some
> common schema types,
>
> maybe a solution is to isolate these common types, and put them in a
> seperate xsd schema.
>
> Thanks Radu for help
>
>
> John
>
>
> On Wed, October 31, 2007 20:39, Radu Preotiuc-Pietro
> wrote:
> > Don't forget that "multiple definitions" means
> definitions for the same > name AND the same targetNamespace URI. In your
> case, since the > targetNamespace URIs are different ("urn:iso:foo1" and
> "urn:iso:foo2"),
> > then the types have different names so the "multiple definitions"
clause >
> doesn't apply. Why don't you just compile one of the Schemas if that's
> > what you want? >
> > Radu
> >
> >
> >> -----Original Message-----
> >> From: Psoroulas John
> [mailto:psoroulas@telecom.ntua.gr]
> >> Sent: Wednesday, October 31, 2007 9:37 AM
> >> To: user@xmlbeans.apache.org
> >> Subject: ignore multi definitions
> >>
> >>
> >> Hi,
> >>
> >>
> >> I have the following two very simple xsds
> >>
> >>
> >>
> >>
> >> ----------
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <xs:schema xmlns:xs="
> http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> "
> >> xmlns="urn:iso:foo1"
> >>
> >>
> >> targetNamespace="urn:iso:foo1"
> elementFormDefault="qualified"> >> <xs:element name="Document"
> type="mytype1"/> >>
> >>
> >> <xs:complexType name="mytype2">
> >> <xs:sequence>
> >> <xs:element name="Id" type="xs:string"/>
> >> </xs:sequence>
> >> </xs:complexType>
> >>
> >>
> >> <xs:complexType name="mytype1">
> >> <xs:sequence>
> >> <xs:element name="Header" type="mytype2"/>
> >> </xs:sequence>
> >> </xs:complexType>
> >>
> >>
> >> </xs:schema>
> >> --------------
> >>
> >>
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <xs:schema
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> >> xmlns="urn:iso:foo2"
> >>
> >>
> >> targetNamespace="urn:iso:foo2"
> elementFormDefault="qualified"> >> <xs:element name="Document"
> type="mytype1"/> >>
> >>
> >> <xs:complexType name="mytype2">
> >> <xs:sequence>
> >> <xs:element name="Id" type="xs:string"/>
> >> </xs:sequence>
> >> </xs:complexType>
> >>
> >>
> >> <xs:complexType name="mytype1">
> >> <xs:sequence>
> >> <xs:element name="Header" type="mytype2"/>
> >> </xs:sequence>
> >> </xs:complexType>
> >>
> >>
> >> </xs:schema>
> >>
> >>
> >> --------------
> >>
> >>
> >>
> >>
> >> In the xsds above, the same types are defined
> (mytype1, mytype2).
> >>
> >>
> >> I want the xmlbeans compiler to ingnore
> multi-definitions in >>
> >>
> >> the above schmemas so as only one Mytype1 and Mytype2 classes to be >>
> generated >>
> >> (not Mytype1, Mytype12, Mytype2, Mytype22).
> >>
> >>
> >> I use the following command
> >>
> >>
> >> scomp -out foo.jar  -compiler C:\j2sdk1.4.2_13\bin\javac.exe -allowmdef
> >> "urn:iso:foo1 urn:iso:foo2" -mx 1024M *.xsd
> config.xsdconfig >>
> >>
> >>
> >> but has no effect >>
> >>
> >> I really appreciate any help
> >>
> >>
> >>
> >> Best regards
> >>
> >>
> >> John
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> the used config.xsdconfig file is >>
> >> <xb:config
> xmlns:xb="http://www.bea.com/2002/09/xbean/config">
> >> <xb:namespace uri="urn:iso:foo1">
> >> <xb:package>com.foo.types</xb:package>
> >> </xb:namespace>
> >> <xb:namespace uri="urn:iso:foo2">
> >> <xb:package>com.foo.types</xb:package>
> >> </xb:namespace>
> >> </xb:config>
> >>
> >>
> >>
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> user-unsubscribe@xmlbeans.apache.org >> For additional commands, e-mail:
> user-help@xmlbeans.apache.org >>
> >>
> >>
> >
> > 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:
> user-unsubscribe@xmlbeans.apache.org > For additional commands, e-mail:
> user-help@xmlbeans.apache.org >
> >
> >
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@xmlbeans.apache.org For additional commands, e-mail:
> user-help@xmlbeans.apache.org
>
>
>
>
>
> 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: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


RE: ignore multi definitions

Posted by Radu Preotiuc-Pietro <ra...@bea.com>.
John,
 
Ideally, you would refactor the Schemas so there are no duplicates. But
if you don't do this, you can use -allowmdef, just note the URI of those
common Schema types. Your example did not have any "common" Schema
types, which is why -allowmdef had no effect.
 
Radu


________________________________

	From: Jacob Danner [mailto:jacob.danner@gmail.com] 
	Sent: Thursday, November 01, 2007 7:21 AM
	To: user@xmlbeans.apache.org
	Subject: Re: ignore multi definitions
	
	
	You should look into the sfactor utility available in the bin
directory. That utility will take common types and create a new xsd from
them
	-jacobd
	
	
	On 11/1/07, Psoroulas John <ps...@telecom.ntua.gr> wrote: 

		The real xsds that I want to process have common some
common schema types,
		
		maybe a solution is to isolate these common types, and
put them in a
		seperate xsd schema.
		
		Thanks Radu for help
		
		John
		
		On Wed, October 31, 2007 20:39, Radu Preotiuc-Pietro
wrote:
		> Don't forget that "multiple definitions" means
definitions for the same
		> name AND the same targetNamespace URI. In your case,
since the 
		> targetNamespace URIs are different ("urn:iso:foo1" and
"urn:iso:foo2"),
		> then the types have different names so the "multiple
definitions" clause
		> doesn't apply. Why don't you just compile one of the
Schemas if that's 
		> what you want?
		>
		> Radu
		>
		>
		>> -----Original Message-----
		>> From: Psoroulas John
[mailto:psoroulas@telecom.ntua.gr]
		>> Sent: Wednesday, October 31, 2007 9:37 AM 
		>> To: user@xmlbeans.apache.org
		>> Subject: ignore multi definitions
		>>
		>>
		>> Hi,
		>>
		>>
		>> I have the following two very simple xsds 
		>>
		>>
		>>
		>>
		>> ----------
		>> <?xml version="1.0" encoding="UTF-8"?>
		>> <xs:schema xmlns:xs="
http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> "
		>> xmlns="urn:iso:foo1"
		>>
		>>
		>> targetNamespace="urn:iso:foo1"
elementFormDefault="qualified">
		>> <xs:element name="Document" type="mytype1"/> 
		>>
		>>
		>> <xs:complexType name="mytype2">
		>> <xs:sequence>
		>> <xs:element name="Id" type="xs:string"/>
		>> </xs:sequence> 
		>> </xs:complexType>
		>>
		>>
		>> <xs:complexType name="mytype1">
		>> <xs:sequence>
		>> <xs:element name="Header" type="mytype2"/> 
		>> </xs:sequence>
		>> </xs:complexType>
		>>
		>>
		>> </xs:schema>
		>> --------------
		>>
		>>
		>> <?xml version="1.0" encoding="UTF-8"?> 
		>> <xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
		>> xmlns="urn:iso:foo2"
		>>
		>>
		>> targetNamespace="urn:iso:foo2"
elementFormDefault="qualified"> 
		>> <xs:element name="Document" type="mytype1"/>
		>>
		>>
		>> <xs:complexType name="mytype2">
		>> <xs:sequence>
		>> <xs:element name="Id" type="xs:string"/> 
		>> </xs:sequence>
		>> </xs:complexType>
		>>
		>>
		>> <xs:complexType name="mytype1">
		>> <xs:sequence>
		>> <xs:element name="Header" type="mytype2"/> 
		>> </xs:sequence>
		>> </xs:complexType>
		>>
		>>
		>> </xs:schema>
		>>
		>>
		>> --------------
		>>
		>>
		>>
		>> 
		>> In the xsds above, the same types are defined
(mytype1, mytype2).
		>>
		>>
		>> I want the xmlbeans compiler to ingnore
multi-definitions in
		>>
		>>
		>> the above schmemas so as only one Mytype1 and Mytype2
classes to be 
		>> generated
		>>
		>> (not Mytype1, Mytype12, Mytype2, Mytype22).
		>>
		>>
		>> I use the following command
		>>
		>>
		>> scomp -out foo.jar  -compiler
C:\j2sdk1.4.2_13\bin\javac.exe -allowmdef 
		>> "urn:iso:foo1 urn:iso:foo2" -mx 1024M *.xsd
config.xsdconfig
		>>
		>>
		>>
		>> but has no effect
		>>
		>>
		>> I really appreciate any help
		>> 
		>>
		>>
		>> Best regards
		>>
		>>
		>> John
		>>
		>>
		>>
		>>
		>>
		>>
		>>
		>>
		>> the used config.xsdconfig file is
		>>
		>> <xb:config
xmlns:xb="http://www.bea.com/2002/09/xbean/config">
		>> <xb:namespace uri="urn:iso:foo1"> 
		>> <xb:package>com.foo.types</xb:package>
		>> </xb:namespace>
		>> <xb:namespace uri="urn:iso:foo2">
		>> <xb:package>com.foo.types</xb:package> 
		>> </xb:namespace>
		>> </xb:config>
		>>
		>>
		>>
		>>
		>>
---------------------------------------------------------------------
		>> To unsubscribe, e-mail:
user-unsubscribe@xmlbeans.apache.org
		>> For additional commands, e-mail:
user-help@xmlbeans.apache.org
		>>
		>>
		>>
		>
		> 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:
user-unsubscribe@xmlbeans.apache.org 
		> For additional commands, e-mail:
user-help@xmlbeans.apache.org
		>
		>
		>
		
		
		
	
--------------------------------------------------------------------- 
		To unsubscribe, e-mail:
user-unsubscribe@xmlbeans.apache.org
		For additional commands, e-mail:
user-help@xmlbeans.apache.org 
		
		



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: ignore multi definitions

Posted by Jacob Danner <ja...@gmail.com>.
You should look into the sfactor utility available in the bin directory.
That utility will take common types and create a new xsd from them
-jacobd

On 11/1/07, Psoroulas John <ps...@telecom.ntua.gr> wrote:
>
> The real xsds that I want to process have common some common schema types,
>
> maybe a solution is to isolate these common types, and put them in a
> seperate xsd schema.
>
> Thanks Radu for help
>
> John
>
> On Wed, October 31, 2007 20:39, Radu Preotiuc-Pietro wrote:
> > Don't forget that "multiple definitions" means definitions for the same
> > name AND the same targetNamespace URI. In your case, since the
> > targetNamespace URIs are different ("urn:iso:foo1" and "urn:iso:foo2"),
> > then the types have different names so the "multiple definitions" clause
> > doesn't apply. Why don't you just compile one of the Schemas if that's
> > what you want?
> >
> > Radu
> >
> >
> >> -----Original Message-----
> >> From: Psoroulas John [mailto:psoroulas@telecom.ntua.gr]
> >> Sent: Wednesday, October 31, 2007 9:37 AM
> >> To: user@xmlbeans.apache.org
> >> Subject: ignore multi definitions
> >>
> >>
> >> Hi,
> >>
> >>
> >> I have the following two very simple xsds
> >>
> >>
> >>
> >>
> >> ----------
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> >> xmlns="urn:iso:foo1"
> >>
> >>
> >> targetNamespace="urn:iso:foo1" elementFormDefault="qualified">
> >> <xs:element name="Document" type="mytype1"/>
> >>
> >>
> >> <xs:complexType name="mytype2">
> >> <xs:sequence>
> >> <xs:element name="Id" type="xs:string"/>
> >> </xs:sequence>
> >> </xs:complexType>
> >>
> >>
> >> <xs:complexType name="mytype1">
> >> <xs:sequence>
> >> <xs:element name="Header" type="mytype2"/>
> >> </xs:sequence>
> >> </xs:complexType>
> >>
> >>
> >> </xs:schema>
> >> --------------
> >>
> >>
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> >> xmlns="urn:iso:foo2"
> >>
> >>
> >> targetNamespace="urn:iso:foo2" elementFormDefault="qualified">
> >> <xs:element name="Document" type="mytype1"/>
> >>
> >>
> >> <xs:complexType name="mytype2">
> >> <xs:sequence>
> >> <xs:element name="Id" type="xs:string"/>
> >> </xs:sequence>
> >> </xs:complexType>
> >>
> >>
> >> <xs:complexType name="mytype1">
> >> <xs:sequence>
> >> <xs:element name="Header" type="mytype2"/>
> >> </xs:sequence>
> >> </xs:complexType>
> >>
> >>
> >> </xs:schema>
> >>
> >>
> >> --------------
> >>
> >>
> >>
> >>
> >> In the xsds above, the same types are defined (mytype1, mytype2).
> >>
> >>
> >> I want the xmlbeans compiler to ingnore multi-definitions in
> >>
> >>
> >> the above schmemas so as only one Mytype1 and Mytype2 classes to be
> >> generated
> >>
> >> (not Mytype1, Mytype12, Mytype2, Mytype22).
> >>
> >>
> >> I use the following command
> >>
> >>
> >> scomp -out foo.jar  -compiler C:\j2sdk1.4.2_13\bin\javac.exe -allowmdef
> >> "urn:iso:foo1 urn:iso:foo2" -mx 1024M *.xsd config.xsdconfig
> >>
> >>
> >>
> >> but has no effect
> >>
> >>
> >> I really appreciate any help
> >>
> >>
> >>
> >> Best regards
> >>
> >>
> >> John
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> the used config.xsdconfig file is
> >>
> >> <xb:config  xmlns:xb="http://www.bea.com/2002/09/xbean/config">
> >> <xb:namespace uri="urn:iso:foo1">
> >> <xb:package>com.foo.types</xb:package>
> >> </xb:namespace>
> >> <xb:namespace uri="urn:iso:foo2">
> >> <xb:package>com.foo.types</xb:package>
> >> </xb:namespace>
> >> </xb:config>
> >>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> >> For additional commands, e-mail: user-help@xmlbeans.apache.org
> >>
> >>
> >>
> >
> > 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: user-unsubscribe@xmlbeans.apache.org
> > For additional commands, e-mail: user-help@xmlbeans.apache.org
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>

RE: ignore multi definitions

Posted by Psoroulas John <ps...@telecom.ntua.gr>.
The real xsds that I want to process have common some common schema types,

maybe a solution is to isolate these common types, and put them in a
seperate xsd schema.

Thanks Radu for help

John

On Wed, October 31, 2007 20:39, Radu Preotiuc-Pietro wrote:
> Don't forget that "multiple definitions" means definitions for the same
> name AND the same targetNamespace URI. In your case, since the
> targetNamespace URIs are different ("urn:iso:foo1" and "urn:iso:foo2"),
> then the types have different names so the "multiple definitions" clause
> doesn't apply. Why don't you just compile one of the Schemas if that's
> what you want?
>
> Radu
>
>
>> -----Original Message-----
>> From: Psoroulas John [mailto:psoroulas@telecom.ntua.gr]
>> Sent: Wednesday, October 31, 2007 9:37 AM
>> To: user@xmlbeans.apache.org
>> Subject: ignore multi definitions
>>
>>
>> Hi,
>>
>>
>> I have the following two very simple xsds
>>
>>
>>
>>
>> ----------
>> <?xml version="1.0" encoding="UTF-8"?>
>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>> xmlns="urn:iso:foo1"
>>
>>
>> targetNamespace="urn:iso:foo1" elementFormDefault="qualified">
>> <xs:element name="Document" type="mytype1"/>
>>
>>
>> <xs:complexType name="mytype2">
>> <xs:sequence>
>> <xs:element name="Id" type="xs:string"/>
>> </xs:sequence>
>> </xs:complexType>
>>
>>
>> <xs:complexType name="mytype1">
>> <xs:sequence>
>> <xs:element name="Header" type="mytype2"/>
>> </xs:sequence>
>> </xs:complexType>
>>
>>
>> </xs:schema>
>> --------------
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>> xmlns="urn:iso:foo2"
>>
>>
>> targetNamespace="urn:iso:foo2" elementFormDefault="qualified">
>> <xs:element name="Document" type="mytype1"/>
>>
>>
>> <xs:complexType name="mytype2">
>> <xs:sequence>
>> <xs:element name="Id" type="xs:string"/>
>> </xs:sequence>
>> </xs:complexType>
>>
>>
>> <xs:complexType name="mytype1">
>> <xs:sequence>
>> <xs:element name="Header" type="mytype2"/>
>> </xs:sequence>
>> </xs:complexType>
>>
>>
>> </xs:schema>
>>
>>
>> --------------
>>
>>
>>
>>
>> In the xsds above, the same types are defined (mytype1, mytype2).
>>
>>
>> I want the xmlbeans compiler to ingnore multi-definitions in
>>
>>
>> the above schmemas so as only one Mytype1 and Mytype2 classes to be
>> generated
>>
>> (not Mytype1, Mytype12, Mytype2, Mytype22).
>>
>>
>> I use the following command
>>
>>
>> scomp -out foo.jar  -compiler C:\j2sdk1.4.2_13\bin\javac.exe -allowmdef
>> "urn:iso:foo1 urn:iso:foo2" -mx 1024M *.xsd config.xsdconfig
>>
>>
>>
>> but has no effect
>>
>>
>> I really appreciate any help
>>
>>
>>
>> Best regards
>>
>>
>> John
>>
>>
>>
>>
>>
>>
>>
>>
>> the used config.xsdconfig file is
>>
>> <xb:config  xmlns:xb="http://www.bea.com/2002/09/xbean/config">
>> <xb:namespace uri="urn:iso:foo1">
>> <xb:package>com.foo.types</xb:package>
>> </xb:namespace>
>> <xb:namespace uri="urn:iso:foo2">
>> <xb:package>com.foo.types</xb:package>
>> </xb:namespace>
>> </xb:config>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
>> For additional commands, e-mail: user-help@xmlbeans.apache.org
>>
>>
>>
>
> 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: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


RE: ignore multi definitions

Posted by Radu Preotiuc-Pietro <ra...@bea.com>.
Don't forget that "multiple definitions" means definitions for the same
name AND the same targetNamespace URI. In your case, since the
targetNamespace URIs are different ("urn:iso:foo1" and "urn:iso:foo2"),
then the types have different names so the "multiple definitions" clause
doesn't apply. Why don't you just compile one of the Schemas if that's
what you want?

Radu

> -----Original Message-----
> From: Psoroulas John [mailto:psoroulas@telecom.ntua.gr] 
> Sent: Wednesday, October 31, 2007 9:37 AM
> To: user@xmlbeans.apache.org
> Subject: ignore multi definitions
> 
> Hi,
> 
> I have the following two very simple xsds
> 
> 
> 
> ----------
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
> xmlns="urn:iso:foo1"
> 						
> targetNamespace="urn:iso:foo1" elementFormDefault="qualified">
> 	<xs:element name="Document" type="mytype1"/>
> 
> 	<xs:complexType name="mytype2">
> 		<xs:sequence>
> 			<xs:element name="Id" type="xs:string"/>
> 		</xs:sequence>
> 	</xs:complexType>
> 
> 	<xs:complexType name="mytype1">
> 		<xs:sequence>
> 			<xs:element name="Header" type="mytype2"/>
> 		</xs:sequence>
> 	</xs:complexType>
> 
> </xs:schema>
> --------------
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
> xmlns="urn:iso:foo2"
> 						
> targetNamespace="urn:iso:foo2" elementFormDefault="qualified">
> 	<xs:element name="Document" type="mytype1"/>
> 
> 	<xs:complexType name="mytype2">
> 		<xs:sequence>
> 			<xs:element name="Id" type="xs:string"/>
> 		</xs:sequence>
> 	</xs:complexType>
> 
> 	<xs:complexType name="mytype1">
> 		<xs:sequence>
> 			<xs:element name="Header" type="mytype2"/>
> 		</xs:sequence>
> 	</xs:complexType>
> 
> </xs:schema>
> 
> --------------
> 
> 
> 
> In the xsds above, the same types are defined (mytype1, mytype2).
> 
> I want the xmlbeans compiler to ingnore multi-definitions in
> 
> the above schmemas so as only one Mytype1 and Mytype2 classes 
> to be generated
> 
> (not Mytype1, Mytype12, Mytype2, Mytype22).
> 
> I use the following command
> 
> scomp -out foo.jar  -compiler C:\j2sdk1.4.2_13\bin\javac.exe  
> -allowmdef
> "urn:iso:foo1 urn:iso:foo2" -mx 1024M *.xsd config.xsdconfig
> 
> 
> but has no effect
> 
> 
> I really appreciate any help
> 
> 
> Best regards
> 
> John
> 
> 
> 
> 
> 
> 
> 
> the used config.xsdconfig file is
> 
> <xb:config  xmlns:xb="http://www.bea.com/2002/09/xbean/config">
>         		<xb:namespace uri="urn:iso:foo1">
>             		<xb:package>com.foo.types</xb:package>
>         		</xb:namespace>
>         		<xb:namespace uri="urn:iso:foo2">
>             		<xb:package>com.foo.types</xb:package>
>         		</xb:namespace>
> </xb:config>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
> 
> 

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: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org