DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion CSS style for read-only files

  • leo71

    CSS style for read-only files

    Participants 0
    Replies 1
    Last Activity 7 years, 9 months ago

    There are special CSS entries like:
    [code]$DOCUMENT – Set CSS style rules for the whole document
    $MARKSEC – Set CSS style rules for marked sections
    $COMMENT – Set CSS style rules for Comment Tags
    $PROCINS – Set CSS style rules for Processing Instructions[/code]

    Is there anything available to apply styling to read-only (file system/CMS) files?
      background-color: gray;


    Derek Read

    Reply to: CSS style for read-only files

    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.


  • You must be logged in to reply to this topic.

Lost Your Password?