Some built-in frameworks include a configuration file that defines shortcut patterns that can
be used in Author mode to automatically insert a certain XML structure.
More specifically, the XML structure (fragment) automatically replaces a specific prefix
pattern. For example, if you are editing a DITA document using the built-in DITA framework,
entering a hyphen (-) followed by a space at the beginning of a paragraph would
automatically replace them with an unordered list element (<ul>) with a
child list item element (<li>). This is made possible by the
AutoCorrect mechanism in Oxygen XML Author Eclipse plugin.
<structure-autocorrect>
<!-- Unordered lists -->
<prefix-replacement prefix="-">
<ul><li/></ul>
</prefix-replacement>
<!-- Ordered lists -->
<prefix-replacement prefix="1.">
<ol><li/></ol>
</prefix-replacement>
<!-- Code block -->
<prefix-replacement prefix="```">
<codeblock/>
</prefix-replacement>
</structure-autocorrect> Using this example, when a user enters one of the defined prefixes at the start of an
element that allows the corresponding fragment, Oxygen XML Author Eclipse plugin will
automatically replace the prefix with its corresponding fragment. For example, entering
a hyphen (-) at the beginning of a paragraph followed by a space would
automatically replace them with an unordered list element (<ul>)
with a child list item element (<li>). Any subsequently added
content would be placed inside the first node/element that does not have a child
node/element (in this example, the cursor would be placed in the first
<li> element).
Reload toolbar
button.