Hi Glenn :) I can't say that I'm having exactly the same problem -- my included schemas are all in the same namespace as the including schema. This was basically for the sake of dividing the work up nicely on a large schema.
I tried commenting out the code you have below as a quick look-and-see if it would fix my problem as well, but it didn't. Unfortunately, I have a bunch of other work to do, so I can't look at the problem much closer right now. In any event, the developers should probably know about it as it isn't an isolated incident. Maybe we're using the API improperly? It doesn't seem that way to me, but you never know... Thanks, C To: [EMAIL PROTECTED] "Glenn Barnard" cc: (bcc: Constantine Georges/Towers Perrin) <[EMAIL PROTECTED] Subject: Re: Caching Schemas mail.com> 04/21/2003 02:34 PM Please respond to xerces-j-user Hey, thanks for the reply. Glad to know someone's listening. I've continued my investigation and would like to submit for consideration the following. Without knowing fully it's purpose, I believe the following code I've commented out in XSDHandler should be eliminated. The reason is that at this point, the XSDDescription desc variable does NOT have a name space...it's null...and the name space won't be known until the schema is parsed. So, what's happening is the subschema is read first and when the master schema reaches this code, the subschema is populated in XSGrammarBucket.fNoNSGrammar. When the following method gets to XSGrammarBucket.getGrammar(String nameSpace) with a null argument, we always get the No Name Space Grammar. I've commented the lines as shown below and in my test case, the program gets by this problem and I can get on to testing the rest of the process. Please let me know if your group agrees. FYI, am using Xerces-J 2.4. public SchemaGrammar parseSchema(XMLInputSource is, XSDDescription desc, Hashtable locationPairs) throws IOException { fLocationPairs = locationPairs; // first try to find it in the bucket/pool, return if one is found // SchemaGrammar grammar = findGrammar(desc); // if (grammar != null) // return grammar; >From: "Constantine Georges" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: Re: Caching Schemas >Date: Mon, 21 Apr 2003 13:50:27 -0400 > > >This seems to be a universal problem: Schemas that include other schemas >have problems validating components that are part of the included subset. > >I'm going to log a bug with my stuff -- hopefully other people will add to >the report with "here's my problem, too" stuff. > >C > > > > > > To: >[EMAIL PROTECTED] > "Glenn Barnard" cc: (bcc: Constantine >Georges/Towers Perrin) > <[EMAIL PROTECTED] Subject: Caching Schemas > mail.com> > > 04/21/2003 01:11 > PM > Please respond to > xerces-j-user > > > > > > > >This feature works well when schemas and sub-schemas are on disk. However, >our application calls for loading schemas and sub-schemas from an XML/RPC >server, meaning that the schemas reach the client as text. > >In my initial test, I have a master schema and one sub-schema. If I load >the >master (top level) schema first, XERCES complains it can't find the >included >sub-schema. If I load the sub-schema first, I find that the master schema >is >not loaded. > >Please note that the sub-schema does not have a TargetNameSpace, but the >master does. This appears to be relevant, because in tracing the code, >XSGrammarBucket's getGrammar() returns fNoNSGrammar for the master schema. > > > >_________________________________________________________________ >The new MSN 8: smart spam protection and 2 months FREE* >http://join.msn.com/?page=features/junkmail > > >--------------------------------------------------------------------- >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] > _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus --------------------------------------------------------------------- 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]