You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Alexander Potapchik <al...@hotmail.com> on 2002/09/06 22:16:59 UTC

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: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org