Home Forums General XMetaL Discussion How to set page/browser preview for XMetal as HTML output Reply To: How to set page/browser preview for XMetal as HTML output

Derek Read

Reply to: How to set page/browser preview for XMetal as HTML output

If you have not modified the multipleOutput.mcr file located in the Startup folder then it should automatically do a basic transformation to HTML for previewing in Browser Preview. The scripts in that macro try to automatically generate XSLT to transform your XML into HTML. Because this is meant for preview only the CSS styling is embedded into each element inside the HTML. It is based on the styling used to display the document during editing in Author's TagsOn or Normal view (we have a DLL that reads your dtdname.css file and transforms it into XSLT). If this is working the files that are generated will have the following names, using DocBook (docbookx.dtd) as an example:

docbookx_HTML.xsl
docbookx_HTML_Style.xsl

These files are generated in the same location as your DTD's CSS file (in this example, the folder that docbookx.css is located in). In most cases that will be the same folder as the DTD (in this example: docbookx.dtd). If this does not occur then I suspect you may not have permission to write to that folder or the multipleOutput.mcr file has been modified or removed.

XMetaL Author versions prior to 5.5 will attempt to write into the Program Files folder and that is restricted in Vista and for limited users on XP. The 5.5 release is Vista / Limited User savvy and corrects that problem.

The files above are actually created when the function XMLToHTMLSetup() is run, but it is set to run (by default unless overridden as with our DITA functionality) when switching to Browser Preview even if you have not specifically implemented a macro that calls it.

Also, in most cases we don't expect people to use these XSLT files as is, though you can if you like. It is more common to replace this automatically generated XSLT with something professionally designed if you wish to use this method to transform to HTML for final output.

Reply

Products
Downloads
Support