I'm trying to implement some sort of caching in a system I'm writing using
the XMLGrammarPool.
What I tried so far was to create a GrammarResolver, extract it's
XMLGrammarPool and give that to the parsers I create (DOM and SAX). I
configure the parser to cache schemas during parsing so the pool gets filled
when my parser resolves external entities.
I still have several open issues though:
1. When the parser resolves 2 schemas with the same namespace, how are those
stored inside the pool? I peeked at the implementation and noticed it uses
the target namespace as it's key.
2. Is there a way to retrieve a schema from the pool using the system id
that was given to it when it was being resolved?
3. I want the achieve thread-safety when attaching the pool to a parser and
adding grammars to it. I saw that the pool provides 2 methods, lock and
unlock although I believe that those are not the ones I'm after. After
trying to use them between calls to loadGrammar I saw that it simply stops
adding grammars to the pool.

Thanks
-- 
View this message in context: 
http://www.nabble.com/XMLGrammarPool-issues-tp16851037p16851037.html
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


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

Reply via email to