Skip to content
pdbro2k edited this page Apr 8, 2020 · 12 revisions

Documentation

AskMoreAnnotation

Most of the Java operations included in this package allow the dynamic configuration of one argument by using so called AskMoreAnnotations that create a user input dialog similar to the built-in ${ask} editor variable. However, AskMoreAnnotations are more flexible since they allow the creation of a single dialog per argument instead of one per ${ask} as well as the addition of restriction flags to prevend users from inputting invalid values:

Dialog generated from AskMoreAnnotations

This dialog is generated from the following AskMoreAnnotations:

$$"Add a value to the list [0, 1]":()!POS_INT$$
$$"What's the value after that?":("3", "4")!DEFAULT("4")$$
$$"... and the one after that?":("4", "8")!EDITABLE!POS_INT$$

A full documentation of the AskMoreAnnotation syntax is added to the description of each argument supporting the use of AskMoreAnnotations.

Please note that the dialog title and messages generated from restriction flags are also localized for German.

AuthorOperations

This software package consists of the following eight operations. Please find notes on how to create your own custom action from one of these Java operations in the official documentation of the Actions Subtab.

AnnotatedXQueryOperation

org.adwmainz.da.extensions.askmore.operations.AnnotatedXQueryOperation

Extends the built-in XQueryOperation by adding the possibility to use AskMoreAnnotations within the argument script.

AnnotatedXSLTOperation

org.adwmainz.da.extensions.askmore.operations.AnnotatedXSLTOperation

Extends the built-in XSLTOperation by adding the possibility to use AskMoreAnnotations within the argument script.

ChooseActionOperation

org.adwmainz.da.extensions.askmore.operations.ChooseActionOperation

This custom operation allows a user to select another action that should be executed from a given list of actions and has the following arguments:

Argument Description
dialogTitle The title of the dialog that will be generated (defaults to Execute action)
selectionLabel The text of the label that should be displayed next to the generated combo box (defaults to Choose an action)
actionIDs The ids of the actions that should be selectable (Please note that all ids must be defined by the corresponding framework or one of the common actions supplied by the Oxygen XML Editor)
actionNames The names of the actions that should be rendered as selectable options.

An input dialog generated by this operation may look like this:

Dialog generated from ChooseActionOperation

CopyToClipboardOperation

org.adwmainz.da.extensions.askmore.operations.CopyToClipboardOperation

This custom operation allows a user to copy the current selection in the Author Mode or an XPath result to the system's clipboard and has the following arguments:

Argument Description
elementLocation An XPath used to identify the elements that should be copied to the system clipboard
If this argument is left empty, the current selection will be copied instead.
message A message notifying the user that something is copied to the clipboard (defaults to Copied the selection to the system's clipboard)
notifyUser Specifies whether the message should be displayed or not

DisplayInResultsViewOperation

org.adwmainz.da.extensions.askmore.operations.DisplayInResultsViewOperation

This custom operation is similar to the function of the built-in XPath Toolbar as it displays elements identified by a given XPath in the Results View. However, it adds the possibility to provide a specific message explaining the XPath result to the user. It has the following arguments:

Argument Description
elementLocation An XPath used to identify the elements to be displayed in the Results View
resultsTabName The name of the tab in the Results View that should be used (defaults to XPath results)
message The message that should be displayed in the Results View next to each identified element (defaults to Element found)
noResultMessage The message that should be displayed if no elements are identified by the argument elementLocation (defaults to The action returned no results)
severity The severity of the message to be displayed in the Results View

InsertAnnotatedFragmentToSelectionOperation

org.adwmainz.da.extensions.askmore.operations.InsertAnnotatedFragmentToSelectionOperation

This custom operations extends the built-in InsertFragmentOperation by adding the possibility to use AskMoreAnnotations within the argument fragment and by applying its functuality to multiple elements selected in the Author Mode.

The additional XPath based argument insertLocationRestriction must be used to define to which specific elements a fragment should be added (e.g. the value //p inserts fragments to all selected p elements).

InsertOrReplaceAnnotatedFragmentOperation

org.adwmainz.da.extensions.askmore.operations.InsertOrReplaceAnnotatedFragmentOperation

Extends the built-in InsertOrReplaceFragmentOperation by adding the possibility to use AskMoreAnnotations within the argument fragment.

SurroundWithAnnotatedFragmentOperation

org.adwmainz.da.extensions.askmore.operations.SurroundWithAnnotatedFragmentOperation

Extends the built-in SurroundWithFragmentOperation by adding the possibility to use AskMoreAnnotations within the argument fragment.

This operation also allows the usage of the annotation $$DESTINATION$$ to specify the exact destination of the original fragment that is to be surrounded if the default position (first leaf) is not desired. You could for example create an action to wrap some text in a p element and add an h1 with the argument fragment set to <h1>Title</h1><p>$$DESTINATION$$<p/>.

Clone this wiki locally