Documentation Center

The use of XPath in configuration

You can specify the target element or XPath for the configuration by using the match attribute when using <x:nodeConfig>.

In the following example, a paragraph is being configured, and a second <x:node> is used to configure paragraphs in a section.
<x:nodeConfig>
  <x:node match="paragraph">
  </x:node>
  </x:node match="section/paragraph">
  </x:node>
</x:nodeConfig>
This looks logical, but doesn't always work in SDL LiveContent Create . In fact it only works with uiGroup, and not with these configuration elements:
  • name
  • role
  • placeholder
  • template
  • lookup
  • ignoreMixed
Each of these only work on the name of the element. SDL LiveContent Create will use the last configuration option that is defined. Therefore when using the following example, All paragraphs will be named "Section Paragraph". SDL LiveContent Create ignored the first part of the XPath:
<x:nodeConfig>
  <x:node match="paragraph">
    <x:name>Paragraph</x:name>
  </x:node>
  </x:node match="section/paragraph">
    <x:name>Section Paragraph</x:name>
  </x:node>
</x:nodeConfig>

DITA

When configuring DITA, the class function can be used to target elements and their specialization. This is an extension to the rules above.

Placeholders

Placeholders are an exception. A placeholder for an element that cannot contain text will not work, however this placeholder will be visible for children that can contain text, as long as the child itself does not have a placeholder. This only works for direct parents.