Try the latest version. That's the only place where bugs get fixed. :-) If
it still doesn't work, we need a test case.

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



                                                                                
                                                 
                      "Jeff Greif"                                              
                                                 
                      <[EMAIL PROTECTED]        To:       <[EMAIL PROTECTED]>   
                                      
                      nceton.edu>               cc:                             
                                                 
                                                Subject:  Unexpected behavior 
in grammar preparsing.                             
                      08/05/2003 12:33                                          
                                                 
                      PM                                                        
                                                 
                      Please respond to                                         
                                                 
                      xerces-j-user                                             
                                                 
                                                                                
                                                 
                                                                                
                                                 



When Xerces (using PSVI DOM) validates an element foo whose type is from
schema A and that element has some content element bar (in A's target
namespace) whose type is from schema B imported by schema A, everything
works as expected: If bar's content conforms to its type, it will be
reported valid, if not, validation will fail.

However, if I preparse schema A, access the schema grammar, convert to an
XSModel, and get the XSElementDeclaration for bar, it will have a type of
AnyType.  Apparently the import of B has not caused B to be parsed and its
PSVI made accessible to the grammar for A.  If I also preparse schema B
when I preparse A, the element declaration for bar has the correct type
from schema B.

Is this behavior by design?  I would have thought that the import would
lead to either immediate preparsing of the imported schema or deferred
preparsing when some reference to B's namespace was made.

My tests refer to Xerces 2.2.1 -- things could be different in later
versions.

If this doesn't ring a bell with the developers, I can try to create a
succinct test case.

Jeff




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

Reply via email to