Home › Forums › General XMetaL Discussion › Xmetal hangs/crashes on ActiveDocument.Reload() › Reply To: Xmetal hangs/crashes on ActiveDocument.Reload()
Reply to: Xmetal hangs/crashes on ActiveDocument.Reload()
January 30, 2013 at 6:40 amfrozen/hang/crash/Not responding, there all the same to me if an application GUI is not responding for over 5 min. How am I supposed to know its waiting on a web request? After 20 seconds any user is going to consider an application any of those terms.
I see now that XmetaL was going out to w3.org every time I open a xhtml document and creating temp folders. There were over 2000 of those #### folders with no files in them, just some w3.org sub folders cluttering up my temp folder. Initially, xMetaL would frozen while waiting for w3.org when opening xhtml files. After adding the xhtml entries in the Rulescatalog file they opened fine with no delay. I see now though, it was still making http requests out to w3.org but was not waiting for a response and used the catalog entries instead. For some reason the Reload() function seems to force xMetaL to wait on w3.org again.
Since I saw the HTML entries in the catalog file, I thought that's all that had to be changed to resolve them locally. I was looking though the information in the Mapping identifiers section of the Customization Guide. Sounds like On_Application_Resolve_Entity is what I need to create a macro for to resolve them to locally stored files. I will give that a try. I would have never thought there was a macro related to the resolving, all i was looking for was catalog related information.
What about using the addCatalog() function in the XML Catalog Resolver service the way that xmetalSamples.mcr adds a catalog.xml file around line 300? That seems to work well and the entries are nicely defined in an xml file instead of hard coding them into if statements.
PS: I know why w3.org takes a long time to respond, because w3.org gets way to many requests for those files and they intentionally make it take a very long time. At minimum it should cache them, not re-request them on every document and changing views. You might want to take a look at this article from a few years ago:
[url=http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic/]http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic/[/url]
Thanks for the detailed information and suggestions.