> Why is this?

This is required by the schema spec: when one schema document <import>s a
namespace, it only means that THIS ONE schema document can refer to
components from that namespace. So in your example, only 'C2' can refer to
components from namespace '3'. Neither A1 nor B2 can access '3'.

Cheers,
Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
[EMAIL PROTECTED]



                                                                                
                              
                    Richard                                                     
                              
                    Martell              To:     [EMAIL PROTECTED]              
                   
                    <[EMAIL PROTECTED]       cc:                                
                                  
                    osinc.com>           Subject:     Quirky behavior when 
importing components from multiple 
                                          namespaces                            
                              
                    03/14/2002                                                  
                              
                    05:07 PM                                                    
                              
                    Please respond                                              
                              
                    to                                                          
                              
                    xerces-j-user                                               
                              
                                                                                
                              
                                                                                
                              



Hi,


Perhaps someone can shed some light concerning what appears to be quirky
parser behavior. I have four schemas in three namespaces as shown below,
where the alpha character denotes a schema and the digit denotes the target
namespace; the arrows show dependencies ('imp' or 'inc').

A1.xsd --imp--> B2.xsd --inc--> C2.xsd --imp--> D3.xsd


When attempting to validate a.xml against A1.xsd, Xerces 2.0.1 generates
this SAXException (concerning components from the target namespace for
D3.xsd at the end of the chain):

** Parsing error, line 50, uri null
    src-resolve.4: Components from namespace 'http://www.w3.org/1999/xlink'

are not
    referenceable from schema document 'null'.


Now in order to get this to work, I must add two (seemingly redundant)
import statements to locate components from D3.xsd:

A1.xsd --imp--> B2.xsd --inc--> C2.xsd --imp--> D3.xsd
  |                |                               ^
  |                +--- imp -----------------------|
  +----- imp --------------------------------------+


Why is this?


- richard


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





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

Reply via email to