The use of XPath in configuration
When configuring elements using <x:nodeConfig> , you can use the match attribute to specify for which element or XPath the configuration should work.
<x:nodeConfig> <x:node match="paragraph"> </x:node> </x:node match="section/paragraph"> </x:node> </x:nodeConfig>
In the example above paragraph is being configured, and a second <x:node> to configure paragraphs in a section.
This looks logical, but doesn't always work in Xopus. In fact it only works with uiGroup , and not with:
Each of these only work on the name of the element. Xopus will use the last configuration option that is defined. Therefore when using the following example:
<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>
All paragraphs will be named "Section Paragraph". Xopus ignored the first part of the XPath.
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 make one 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.
- Documentation
- › FAQ
- › The use of XPath in configuration