Hi Joe, In the spirit of better late than never (the same spirit in which, I'm afraid, the documentation for all this good stuff will get written... :-)) :
>What I'm currently doing is >Create a ...impl.xs.XMLSchemaLoader >Create a ...util.XMLGrammarPoolImpl >Tell the Loader to read from the specified public/system/base-URI location >(seems to be working) >Adding the resulting Grammar to the GrammarPool The trouble is that the SchemaGrammar object that SchemaLoader gives back to you corresponds precisely to the URI you asked it to parse. Any grammars that were imported will be hidden inside this grammar, quite inaccessible to our grammar pool implementation (which tries to be generic) and to you (unless you use Sandy's handy schema component API to dig the imported rammars out). All this to say: What I bet is happening is that there *is* a grammar in your grammar pool, but there's only one and it's not the one your document wants. If you don't want to use the schema component API, there is a magical solution: set the grammar pool you've created as a property on the XMLSchemaLoader instance. XMLSchemaLoader knows how schema grammars work, so it can put all the grammars it finds in your grammar pool for you (this is how the XMLGrammarBuilder sample does it). >Then, between steps 5 and 6 above: >configuration.setProperty(GRAMMAR_POOL,,myGrammarPool) That should work. It has been known to work at points in the past. >This doesn't seem to be working. I don't know whether this is because the schema loader and/or grammar >pool need to share more data with the rest of the configuration, or because the data stream does contain >xsi:schemaLocation directives and they're overwriting the grammar I tried to load, or because I've made >some other foolish mistake... any insights into what I'm doing wrong would be welcome. The other answer of course is that you've uncovered a bug. XMLSchemaLoader is a very young piece of code, so I'd be surprised if it still couldn't use some work to bring it properly into line. :-) Hope that helped, Neil Neil Graham XML Parser Development IBM Toronto Lab Phone: 905-413-3519, T/L 969-3519 E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
