My XMLGrammarPool implementation keeps a cache of grammars, invalidating the cache when a grammar is modified. This works quite well when a document directly references a schemaLocation of, say, A.xsd. If A.xsd is modified and the document revalidated, the pool correctly does not return the cached grammar, allowing Xerces to recalculate it.

The problem arises when A.xsd includes or imports B.xsd and B.xsd is changed. Even though the cached grammar for B.xsd is refreshed, when the document is revalidated the consolidated schema representing A.xsd, which incorporates information from the previous version of B.xsd, still appears to be up-to-date and is incorrectly used for validation.

The solution would seem to be that when a schema for a given namespace is replaced in the cache, cache entries for all schemas depending on that schema should also be invalidated. Unfortunately, Xerces doesn't seem to provide any way to get such dependency information. AFAIK, the grammar pool can't tell the difference between two schemas that are used sequentially (independent) and one schema included by another (dependent).

Any suggestions welcome.

Bob Foster


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



Reply via email to