Hi Neil:

    Thanks for your response. The only workaround I have is to save
the state of parser's EntityManager before it is reset (hence contains all 
the entities) and use it every time I parse a new document. This does not 
look like a good solution and only works with a single DTD.

    AP-

>From: [EMAIL PROTECTED]
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: Grammar caching and entities
>Date: Fri, 6 Sep 2002 16:19:49 -0400
>
>Hi Alexander,
>
>Hmmm; looks like a bug.  Let me look into it and get back to you...
>
>Cheers,
>Neil
>Neil Graham
>XML Parser Development
>IBM Toronto Lab
>Phone:  905-413-3519, T/L 969-3519
>E-mail:  [EMAIL PROTECTED]
>
>
>
>
>|---------+--------------------------------->
>|         |           "Alexander Potapchik" |
>|         |           <alexander_potapchik@h|
>|         |           otmail.com>           |
>|         |                                 |
>|         |           09/06/2002 04:16 PM   |
>|         |           Please respond to     |
>|         |           xerces-j-dev          |
>|         |                                 |
>|---------+--------------------------------->
>   
> 
>>---------------------------------------------------------------------------------------------------------------------------------------------|
>   |                                                                        
>                                                                      |
>   |       To:       [EMAIL PROTECTED]                            
>                                                                      |
>   |       cc:                                                              
>                                                                      |
>   |       Subject:  Grammar caching and entities                           
>                                                                      |
>   |                                                                        
>                                                                      |
>   |                                                                        
>                                                                      |
>   
> 
>>---------------------------------------------------------------------------------------------------------------------------------------------|
>
>
>
>Hi:
>
>I am trying to use the grammar caching mechanism described in the FAQ
>and noticed the following:
>
>% cat test.dtd
><!ENTITY Int "INT">
><!ELEMENT math ANY>
>
>% cat test.xml
><!DOCTYPE math SYSTEM "test.dtd">
><math>&Int;</math>
>
>Now, if I use xni.XMLGrammarBuilder to validate this document, I get
>errors:
>
>% java xni.XMLGrammarBuilder -d test.dtd -i test.xml test.xml
>[Error] test.xml:2:12: The entity "Int" was referenced, but not declared.
>[Error] test.xml:2:12: The entity "Int" was referenced, but not declared.
>
>If I create a parser which uses grammar pool implementation,
>the result if almost the same: I can successfully parse the first
>document and get "entity not declared" errors for all subsequent
>documents.
>
>I am wondering if this is supposed to work. If so, what did I miss?
>
>     Thanks,
>     AP-
>
>
>
>
>_________________________________________________________________
>Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
>---------------------------------------------------------------------
>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]




_________________________________________________________________
Join the world�s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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

Reply via email to