[ https://issues.apache.org/jira/browse/XERCESJ-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17849867#comment-17849867 ]
Mahmoud M. Almazari commented on XERCESJ-1205: ---------------------------------------------- {quote}14 years later after my last comment on this issue {quote} [~radu_coravu], thank you, I really appreciate your response after all these years. {quote}we ship inside Oxygen a customized Xerces library containing various fixes (like this one or security related) {quote} Are these customization available for public? {quote}How do you know which entities are necessary or not? The entity references are found while the file is parsed {quote} In the provided patch, I simply wrapped the hashtable variable such that when entity queried and the entity does not exist, it will be loaded directly from the cache. {quote}I'm not sure if I said this anywhere on this issue. {quote} Yes, but not explicitly, but your fix is different in such case it uses the systemId to define an external entity, same as the parsing logic that is defined in XMLDTDScannerImpl#scanEntityDecl. {quote}I'm not sure, I would need to probably spend an hour or two to understand again the caching code (which I'm not really willing to do), ideally as I said we would have test cases for each situation, test cases with various ways in which XML documents refer to DTDs (with public IDs, system IDs, internal DTD declarations). And for system IDs again some may be resolved through an XML catalog to an absolute DTD location, some may be relative and resolve relative to the XML document (hopefully in rare cases). So an offered patch (like the ones on this issue) without a set of robust automatic tests is not something very robust. {quote} No worries at all. I totally agree with you about the test cases. However, although I have followed the same convention as the DTD scanner itself to provide a fix for the issue, providing test cases myself would be tricky. I'm a SDE not a DTD expert, and having those test cases covered by the Xerces community would be more robust. > 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 > Priority: Major > Attachments: XERCESJ-1205.patch, XERCESJ-1465.patch, bug.zip, > entitypatch-r1813171.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 was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: j-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: j-dev-h...@xerces.apache.org