Reply to: CSS style for read-only filesJune 9, 2015 at 9:47 pm
There aren't any special XMetaL-specific (non-standard) CSS selectors beyond what you have quoted.
What “read only” means will depend on the context (file system file attribute, special markup in the XML itself, information coming from a CMS system) and XMetaL Author doesn't implement any special handling for these things. Over the years we have seen these features implemented by clients in many different ways to meet specific user needs and so we simply provide APIs to allow you to build the feature to meet those needs.
Depending on the context you will need to determine whether a file should be treated as read only using different APIs and possibly information from outside of XMetaL (Windows FSO, information passed in from a CMS, etc). Once that has been decided you can then style any portion of the document using the ContainerStyle property. Keep in mind that CSS cascading rules still applies after you set this property. See the Programmers Guide for details on its use.
If you are working with a CMS system it is best to check with the vendor that provides the CMS connector for XMetaL Author Enterprise to see if such a feature already exists. Some CMS systems have a “check out for viewing only” or similar feature. In this case, if the file is locked by someone else they usually include a feature that warns you somewhere in the XMetaL UI. This is implemented in various different ways depending on the connector (CSS, a warning dialog, or sometimes in the Resource Manager if the CMS includes a UI embedded in there). In some cases the CMS connector will also stop you from modifying the document. We provide APIs for that named ReadOnly and NonRemovableContainer.