Home › Forums › General XMetaL Discussion › Global View and C:temp.xml with XMetal 4.6 › Reply To: Global View and C:temp.xml with XMetal 4.6
Reply to: Global View and C:temp.xml with XMetal 4.6October 15, 2009 at 1:11 am
I suspect that what you are seeing is the temporary file created just before XMetaL Author passes the current document to Page Preview (aka: Browser Preview). This file is saved to disk in order to provide that view with the content of the current document in memory. This is because the document author may have made changes since last saving and may also not wish to save before previewing. Internet Explorer is used to render the preview after it has been transformed (which is why the types of files that can be rendered in this view are limited HTML and other types only if you have an appropriate plug-in for IE installed, such as Adobe Reader for PDF, etc) and XMetaL simply tells IE to open a document on disk. Normally to provide the preview an intermediary step is used to transform the XML to another format (HTML, XHTML, PDF, TXT, etc) before it is opened in order to give your author a “preview”. Without this transformation step being done IE would simply end up rendering its default view of the XML document (unless you inject or include a reference to an XSLT so that IE will do that transformation in memory by itself).
The temporary file is normally saved to the same location as the current XML document, then the transformation is performed and the resulting transformed document is passed to IE (so you should actually be seeing at least two files being created, usually). If the current document is in a location that cannot be written to that may be the cause for the behaviour you are seeing, however, in this case I would not expect the temporary file to be written to C: In addition, if the current document was created from a template and has never been saved then the script that is responsible for the preview needs to decide where it will place this temporary file because at that point the current document is actually the template located (by default) in
One of the APIs that may be involved in this case is CreatePreviewFile() which is documented in the XMetaL Developer Programmer's Guide. However, there are other methods for creating the preview file, which might include for example, using the Windows File System Object to write out the file, or ADODB.Stream or perhaps other means.
If a customization is involved (which must be the case if this feature is enabled) then this functionality will be defined somewhere in one of the MCR files for your customization. If the behavior you are seeing is not to your liking you should then take this up with the creator of the customization. If you need to troubleshoot this yourself (perhaps you have inherited a customization from someone no longer available to help) you will want to read the topic “The formatting object interface” and all subtopics in the XMetaL Developer Programmer's Guide (though there is no guarantee that your customization was actually implemented using that functionality). If calls to the APIs discussed in that topic are being used to implement the preview and you wish to modify the way they function you are free to alter the MCR file called multipleOutput.mcr located in the Startup folder.