Chapter 6. Commands written in the Java™ programming language

Table of Contents
1. alert
2. add
3. addAttribute
4. addBlockInFlow
5. autoSpellChecker
6. beep
7. cancelSelection
8. center
9. checkExternalRefs
10. checkValidity
11. commentOut
12. confirm
13. contextualMenu
14. convert
15. convertCase
16. copy
17. copyAsInclusion
18. copyChars
19. copyImage
20. countWords
21. cut
22. declareNamespace
23. demoteListItem
23.1. Configuring the promoteListItem and demoteListItem commands
24. delete
25. deleteChar
26. deleteSelectionOrDeleteChar
27. deleteSelectionOrJoinBlockOrDeleteChar
28. deleteWord
29. diffSupport
30. drag
31. drop
32. editAttribute
33. editAttributes
34. editObject
35. editPITarget
36. editMediaInfo
37. ensureSelectionAt
38. execute
39. executeMenuItem
40. extendSelectionAt
41. extractObject
42. fail
43. formatTextAs
43.1. Specifying an element template for use by command formatTextAs
43.2. Filtering the text pasted in the document
44. insert
45. insertCharByName
46. insertCharSequence
47. insertControlChar
48. insertNewlineOrSplitBlock
49. insertNode
50. insertOrOverwriteString
51. insertSpecialChars
52. insertSameBlock
52.1. Specifying splittable blocks
53. insertString
54. insertTextOrMoveDot
55. join
56. listAnchors
57. listBindings
58. listRepeatable
59. moveDotTo
60. moveElement
61. normalizeWhiteSpacePre
62. overwriteMode
63. overwriteString
64. pass
65. paste
66. pasteAs
67. pasteImageAs
68. pasteSystemSelection
69. pick
70. preview
71. promoteListItem
72. prompt
73. putAttribute
74. recordMacro
75. redo
76. refresh
77. reinclude
78. remark
79. removeAttribute
80. repeat
81. replace
82. resizeImage
83. resizeTableTemplate
84. resizeCALSTableTemplate
85. run
86. search
87. searchReplace
88. searchReplaceElement
89. selectAt
90. selectFile
91. selectConvertedFile
92. selectLink
93. selectNode
93.1. List of element names or node types
93.2. OrNone, OrNode, OrElement modifiers
94. selectNodeAt
95. selectText
96. selectTo
97. setProperty
98. setReadOnly
99. setObject
100. showContentModel
101. showElementReference
102. showMatchingChar
103. showColumnRowLabels
104. spellCheck
105. split
106. start
107. status
108. toggleCollapsed
109. toggleTextStyle
110. unmarkdown
111. undo
112. uninclude
113. updateInclusions
114. viewObject
115. webSearch
115.1. Declaring search engines
116. wrap
117. xIncludeText
118. xpathSearch
119. XXE.close
120. XXE.compare
121. XXE.edit
122. XXE.editInclusion
123. XXE.masterDocumentControl
124. XXE.new
125. XXE.open
126. XXE.save
127. XXE.saveAll
128. XXE.setReadOnly
129. XXE.saveAs
130. A generic, parameterizable, table editor command

In the following command reference:

selected node

means

  • the explicitly selected single node;

  • OR the node (text, comment, processing-instruction or element) containing the caret, if there is no explicit node selection and if the [implicitNode] option is used in the parameter of the command;

  • OR the element containing the textual node (text, comment, processing-instruction) containing the caret, if there is no explicit node selection and if the [implicitElement] option is used in the parameter of the command.

selected nodes

means

  • the explicitly selected single node or node range;

  • OR the node (text, comment, processing-instruction or element) containing the caret, if there is no explicit node selection and if the [implicitNode] option is used in the parameter of the command;

  • OR the element containing the textual node (text, comment, processing-instruction) containing the caret, if there is no explicit node selection and if the [implicitElement] option is used in the parameter of the command.

argument node

means

  • an empty text node, if the parameter of the command ends with #text;

  • OR an automatically generated empty element (see configuration element newElementContent in Section 20, “newElementContent” in XMLmind XML Editor - Configuration and Deployment), if the parameter of the command ends with an element name;

  • OR a copy of an element template (see configuration element elementTemplate in Section 12, “elementTemplate” in XMLmind XML Editor - Configuration and Deployment), if the parameter of the command ends with an element template name.

If the argument node is not explicitly specified in the parameter of a command, a dialog box is displayed and the user will have to interactively specify it.

Notation used in the synopsis of a command parameter:

[Important]Common pitfalls to be avoided
  • A command parameter isnotnamespace-aware

    Namespace prefixes cannot be used inside a command parameter. Notation {namespace_URI}local_name —the so-called James Clark's notation— must be used instead.

    Example 1: {http://www.w3.org/1999/xhtml}p means p in the http://www.w3.org/1999/xhtml namespace.

    Example 2: p means p with no namespace.

  • Whitespace is significant in a command parameter

    Most notably, whitespace is not allowed inside the #template() construct.

    Let's use command insert as an example. The following command parameters cannot work:

       after
    after   [implicitElement]
    before[   implicitElement   ]
    after   #template(  figure   ,   image   )
    before[implicitElement]   #template   (figure,image)

    While the following command parameters should be OK:

    after
    after[implicitElement]
    before[implicitElement]
    after   #template(figure,image)
    before[implicitElement]   #template(figure,image)