19. nodePathTags

<nodePathTags>
  Content: [ element ]*
</nodePathTags>

<element
  name = non empty list of QNames
  parent = XPath (subset)
  attribute = QName
  value = string
  op = (equals|contains|starts-with|ends-with) : equals
  tag = non empty token
/>

Specifies the “tag” to be used by the node path bar in XMLmind XML Editor - Online Help for certain elements. For example, specifying

<nodePathTags>
  <element name="html:div html:span" attribute="class" tag="%E.%v" />
</nodePathTags>

instructs the node path bar to display div.first_class_name and span.first_class_name for XHTML div and span elements having a class attribute.

Child element element specifies a “tag rule” to be applied to an element by the node path bar. The node path bar considers the rules in the order specified in the configuration file. Therefore more specific rules must precede less specific rules.

The attributes of child element element are:

name

One or more element names. Specifies the elements to which the rule applies. Optional. An absent name attribute means: this rule applies to all elements.

parent

An XPath pattern matching the parent of the elements to which the rule applies. Optional. An absent parent attribute means: any parent.

attribute

The rule applies to elements having this attribute. Optional. An absent attribute attribute means: attributes are not considered when matching an element.

value

The rule applies to elements having attribute attribute (see above) and the value of this attribute must be value. Optional. An absent value attribute means: any value.

op

The operation used to compare the actual value of attribute attribute (see above) to attribute value (see above). Optional. Defaults to equals.

Example: attribute="class" value="role-" op="starts-with". The rule applies to element <span class="role-foo bar"> but not to element <span class="bar role-foo">. With op="contains", the rule applies to both elements.

tag

Specifies the tag to be used by the node path bar. This string may contain the following variables:

VariableSubstituted With
%EThe qualified name of the element matched by the rule.
%eThe local part of the name of the element matched by the rule.
%AThe qualified name of attribute. Empty string if attribute is not specified.
%aThe local part of the name of attribute. Empty string if attribute is not specified.
%VThe value of attribute. Empty string if attribute is not specified.
%v

Short form of the value of attribute. Empty string if attribute is not specified.

Here, the value of attribute is considered to be a list of tokens separated by whitespace. Example, let's suppose the value of attribute is "one two three".

op="ends-with"

Last token. Example: "three".

op="contains"

The token matching the contained string; first token if contained string has not be specified using attribute value. Example: if value="w", "two". Example: if value="three", "three". Example: if attribute value has not been specified, "one".

op="starts-with", op="equals"

First token. Example: "one".

If the value of attribute is not a list of tokens, then %v and %V are equivalent.

An empty nodePathTags configuration element may be used to discard the previously specified nodePathTags.

DocBook 5 example:

<nodePathTags>
  <element name="db:indexterm" attribute="class" value="startofrange" 
           tag="%E(%V)" />
  <element name="db:indexterm" attribute="class" value="endofrange" 
           tag="%E(%V)" />
</nodePathTags>