Work with Protected attributes

In Inspire, you can protect an attribute to ensure the stability, maintainability, and reusability of your content. If you mark an attribute as protected, it prevents authors from altering the attribute in the Oxygen editor. If you want a specific user to be able to alter a protected attribute in the Oxygen editor, you must give them special permissions. Otherwise, only administrators can alter a protected attribute in the Oxygen editor.

In Inspire, you can configure an attribute to be protected for the following reasons:

  • Respect the intended use and constraints of the attribute, particularly for architectural and processing-related attributes
  • Control the set of allowed values for attributes to ensure consistency and correct processing
  • Utilize DITA's mechanisms like subject scheme maps and DITAVAL files to manage attribute values and conditional processing effectively

For example, your documents have a Related Information section where there must be at least one link to your home marketing website.

  • An administrator would update the href attribute and select the Protected option.
  • Users who are not administrators and are working in documents with a Related Information section would not be able to delete any hrefs, or change the website URL stored in the href attribute.
  • If you want specific users or a role to be able to delete or update the href in Oxygen, you can grant them permissions to the Content Browser module property, can_modify_protected_attributes. Follow the steps in: Give permissions to work with protected attributes.

If an attribute has the Protected property :

  • In the Oxygen editor, to delete or update protected attributes, users must have one of the following permissions:

    • Permissions to the can_modify_protected_attributes property

    • Administrator
  • This protection is enforced in the Oxygen editor in the following places:

    • Author mode

    • Edit XML Source mode

    • Reviews
    • Resolving reviews

Tips and tricks

  • By default, when creating an attribute, the Protected option is not selected.
  • You can select Protected in conjunction with any other property such as Profiled, Identifier, or Language.
  • Some attributes, like <class>, are architectural attributes and should not be directly edited by authors. They define the element's specialization hierarchy and are crucial for DITA tools and processors to function correctly. Altering these attributes can lead to incorrect processing or validation errors.
  • Many attributes benefit from having a controlled set of allowed values. Having a locked set of values helps authors choose appropriate values. This promotes consistency and accuracy across the documentation. It also prevents incorrect formatting or interpretation by the build process.
  • Subject scheme maps can define controlled values for profiling attributes without requiring specialization or constraints, making it easier to manage and modify these values quickly.

Before you begin

You cannot protect a single instance of an attribute.

  • If you select the Protected option for an attribute, such as href, all uses of that href attribute are locked.
  • Users cannot update or delete any use of the Protected attribute in the Oxygen editor unless they are an administrator or have special permissions.
  • Users can add the Protected attribute to a document, but cannot change its value.
    • For example, if you protect the scalefit attribute that has a default value of Yes, any user can add this attribute to an image element, and it will have a value of Yes.
    • Users cannot change the scalefit's value to anything else without permissions.

To create a protected attribute:

  1. Give permissions to work with protected attributes
  2. Protect an attribute