Home Forums General XMetaL Discussion Defining the Normal View CSS Reply To: Defining the Normal View CSS

Derek Read

Reply to: Defining the Normal View CSS

This has already been answered to some extent, but here's my take on an answer:

XSLT is not supported in TagsOn and Normal views (technically speaking it is not supported directly by XMetaL Author at all, and requires 3rd party tools such as MSXML to do any XSLT). The TagsOn and Normal views are styled using CSS only (though there is an API called SetRenderedContent that allows you to further manipulate content to some extent at the DOM node level using script).

For the most part CSS support is limited to W3C CSS (CSS1) with quite a bit but not full CSS2 support (CSS2 selectors and some other things are supported for example). For the complete list of supported CSS see the XMetaL Developer Customization Guide. It contains a very large table that lists all the various CSS properties and indicates whether or not they will affect the rendering of your document in TagsOn and Normal view.

XSLT can be used to do transformation for rendering in Page Preview but this is done through scripting by envoking some third party tool (such as MSXML) during the On_Before_Document_Preview where it is up to your script to generate the file to be previewed and then let XMetaL know where that file is so that it can tell IE (which we embed as the viewer in Page Preview view) to open it.

You can (and many XMetaL Author and XMAX customizers do) style TagsOn and Normal view using CSS so that they approximate as closely as possible how a particular final output might appear (whatever format that is). In many cases they will select their “primary” format (whatever that is decided to be). Do not expect to be able to do fancy CSS layouts. You are restricted to a standard top down flow because the primary purpose for the product is to edit content and not create layouts.

A large number of our clients also transform the same XML content into different output formats. Constantly switching the Normal and TagsOn views to match a particular output is (in theory) possible but might just be confuse people who should really be concentrating on editing content and, ideally, not worrying about how their final output will appear (either today or some point in the future when the transformation process might be altogether different).