Hi Tony,

I don't understand this, either. The requirement to xs:include a schema 
if you're going to use it is not something unique to JiBX, it's part of 
the schema specification. How did you construct this schema which is 
using a type without including the type definition?

If you can give more details of the situation and how it arose perhaps 
we can offer a work-around.

  - Dennis

Dennis M. Sosnoski
XML and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



tony Tony wrote:
> Yes...you are right. the thing is that I don't wanna change schema to 
> include schema a into schema b.
> As the schema contains around 25 files. Is there any work-around to 
> keep the schema as original as it is.
>
> Cheers,
>
>
> On Fri, Sep 25, 2009 at 1:44 AM, Barlow, Keith 
> <keith_bar...@cable.comcast.com 
> <mailto:keith_bar...@cable.comcast.com>> wrote:
>
>     I am not sure I totally understand the question but what I am
>     thinking is that you are trying to figure out why you can not
>     reference a type in file a from file b even though both a and b
>     are imported by main.
>
>      
>
>     If that is correct the answer is because file a must import file
>     b.  An xml file must import any other xsd it wishes to reference
>     and give it an alias.  Then the types from the imported file are
>     reference able.  Importing a and b into main only makes those
>     types available in main, not in each other.
>
>      
>
>     Keith
>
>      
>
>     ------------------------------------------------------------------------
>
>     *From:* tony Tony [mailto:tonyto...@gmail.com
>     <mailto:tonyto...@gmail.com>]
>     *Sent:* Thursday, September 24, 2009 3:01 AM
>     *To:* jibx-users@lists.sourceforge.net
>     <mailto:jibx-users@lists.sourceforge.net>
>     *Subject:* [jibx-users] Xml schema referenced type not defined
>
>      
>
>     Hi All,
>
>      
>
>     I am new to JiBX library and currently, i am having problem on
>     generating code from schema.
>
>     Here are my schema scenario looks like:
>
>      
>
>     main.xsd include a.xsd (1st) and b.xsd (2nd).
>
>     b.xsd uses types from a.xsd as well. 
>
>      
>
>     So, i run the command "java -cp jibx-tools.jar
>     org.jibx.schema.codegen.CodeGen -t gen/src -w main.xsd"
>
>      
>
>     I got the result saying that referenced type XXXX is not defined
>     for element at ........in file b.xsd
>
>     From the documentation, it says that if i include the main, JibX
>     will be able include other related xsd automatically.
>
>     In this case, why a type which defined in a.xml does not get seen
>     in b.xsd since I include the main.xsd rather than b.xsd?
>
>      
>
>     Any help will be appreciated.
>
>      
>
>     Thanks
>
>      
>
>     Cheers,
>
>      
>
>     -Tony
>
>      
>
>
>     
> ------------------------------------------------------------------------------
>     Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
>     is the only developer event you need to attend this year.
>     Jumpstart your
>     developing skills, take BlackBerry mobile applications to market
>     and stay
>     ahead of the curve. Join us from November 9&#45;12, 2009. Register
>     now&#33;
>     http://p.sf.net/sfu/devconf
>     _______________________________________________
>     jibx-users mailing list
>     jibx-users@lists.sourceforge.net
>     <mailto:jibx-users@lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/jibx-users
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
> http://p.sf.net/sfu/devconf
> ------------------------------------------------------------------------
>
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>   

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to