2. attributeVisibility

<attributeVisibility>
  Content: [ category ]*
</attributeVisibility>

<category
  name = Non-empty token
  attributes = Non-empty list of QNames, 
               (a QName may optionnaly be followed 
                by a list of exceptions)
  visible = boolean : true
  merge = replace|add|remove : replace
/>

The attributeVisibility configuration element specifies the checkbox entries of the menu displayed by clicking the down arrow button found at the right of the header of the attribute table (part of the Attributes tool in XMLmind XML Editor - Online Help). This menu lets the user toggle the visibility of attributes belonging to certain categories. Simply uncheck a menu entry to “hide” in the attribute table all the attributes belonging to the corresponding category.

A menu entry is created for each category child. The attributes of element category are:

name

Specifies the name of the category hence, once localized, the label of the corresponding menu entry.

attributes

Specifies the names of the attributes belonging to the category. These attributes are to be hidden by the attribute table when the corresponding menu entry is unchecked.

[Note]Exceptions

It's possible to append a list of exceptions after the name of an attribute to be hidden. This list of exception uses the following syntax:

'!' element_QName [ '|' element_QName ]*

DocBook 5 example: linkend!db:link|db:xref, which means attribute linkend is to be hidden, except when its parent element is db:link or db:xref.

visible

Default value: true. Specifies the initial visibility of the category, hence whether he corresponding menu entry is initially checked or unchecked.

merge

Default value: replace. Specifies how the current definition of a category is merged with the previous definition of the same category. See example #2 below.

Examples:

<attributeVisibility>
  <category name="Conditional Processing" 
            attributes="product platform audience deliveryTarget 
                        rev otherprops props 
                        status" />
  <category name="Other" attributes="xtrc xtrf" 
                  visible="false" />
</attributeVisibility>

<attributeVisibility/>

An attributeVisibility element without any category child element may be used to remove from a configuration the previously defined attributeVisibility.

Otherwise, an attributeVisibility element is merged with the attributeVisibility element previously defined in the configuration. This is done as follows:

  1. All category elements not found in current definition but found in the previous definition are copied from previous definition.

  2. All category elements having no attributes child element are discarded from current definition. This trick allows to skip some category elements which otherwise would have been copied from the previous definition.

  3. Otherwise, how the current definition of a category is merged with the previous definition of the same category is specified by the merge attribute:

    replace

    Default value. Current definition of a category replaces the previous definition of the same category.

    add

    Attributes found in current definition of a category are added to the attributes found in the previous definition of the same category.

    remove

    Attributes found in current definition of a category are removed from the attributes found in the previous definition of the same category.

Example #1:

<attributeVisibility>
  <category name="Profiling" attributes="revision revisionflag"/>
  <category name="Scripting" attributes="onkeydown onkeypress onkeyup"
            visible="false"/>
  <category name="Other" attributes="remap" visible="false"/>
</attributeVisibility>

<attributeVisibility>
  <category name="Profiling" attributes="revision revisionflag audience os" 
            visible="false"/>
  <category name="Other"/>
  <category name="RDF" visible="false"
            attributes="vocab typeof property resource prefix"/>
</attributeVisibility>

is equivalent to:

<attributeVisibility>
  <category name="Profiling" attributes="revision revisionflag audience os" 
            visible="false"/>
  <category name="RDF" visible="false"
            attributes="vocab typeof property resource prefix"/>
  <category name="Scripting" attributes="onkeydown onkeypress onkeyup"
            visible="false"/>
</attributeVisibility>

Example #2:

<attributeVisibility>
  <category name="Profiling" attributes="revision revisionflag"/>
  <category name="RDF" visible="false"
            attributes="vocab typeof property resource prefix"/>
  <category name="Scripting" attributes="onkeydown onkeypress onkeyup"
            visible="false"/>
</attributeVisibility>

<attributeVisibility>
  <category name="Profiling" attributes="audience os" 
            visible="false" merge="add"/>
  <category name="RDF" attributes="about" 
            visible="false" merge="replace"/>
  <category name="Scripting" attributes="onkeypress"
            visible="true" merge="remove"/>
</attributeVisibility>

is equivalent to:

<attributeVisibility>
  <category name="Profiling" attributes="revision revisionflag audience os" 
            visible="false"/>
  <category name="RDF" attributes="about" 
            visible="false"/>
  <category name="Scripting" attributes="onkeydown onkeyup"
            visible="true"/>
</attributeVisibility>