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 "Thomas Krammer (JIRA)" <xe...@xml.apache.org> on 2010/09/08 21:45:32 UTC

[jira] Updated: (XERCESJ-1205) Entity resolution does not work with DTD grammar caching resolved

     [ https://issues.apache.org/jira/browse/XERCESJ-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Krammer updated XERCESJ-1205:
------------------------------------

    Attachment: XERCESJ-1465.patch

I looked at the source code and it seems the parser maintains two entity tables: one in DTDGrammar and one in XMLEntityManager. The table in the XMLEntityManager is filled by the XMLDTDScannerImpl which is never triggered when the parsed DTD is retrieved from the XMLGrammarPool.

So the table in the XMLEntityManager is empty and the entities aren't resolved during parsing.

As a quick fix I updated XMLDTDValidator to copy the entities in DTDGrammar to the XMLEntityManager when the grammar is retrieved from the pool.

A patch for this change is attached.



> Entity resolution does not work with DTD grammar caching resolved
> -----------------------------------------------------------------
>
>                 Key: XERCESJ-1205
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1205
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: DTD
>    Affects Versions: 2.8.1
>         Environment: JDK1.5. The issue appears on various machines, Windows, Linux, Mac OSX. I don't believe it is platform specific.
>            Reporter: Tin Pavlinic
>            Assignee: Michael Glavassevich
>         Attachments: bug.zip, XERCESJ-1465.patch
>
>
> We have a DTD which defines some entities. We are parsing multiple documents against this DTD. If grammar caching is enabled, the entities are unresolved when the grammar is loaded from the cache, instead of the DTD. 
> It seems that they are cleared every time a document is parsed and are only loaded when a DTD is loaded and not from the cache.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org