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. cut
21. declareNamespace
22. demoteListItem
22.1. Configuring the promoteListItem and demoteListItem commands
23. delete
24. deleteChar
25. deleteSelectionOrDeleteChar
26. deleteSelectionOrJoinBlockOrDeleteChar
27. deleteWord
28. diffSupport
29. drag
30. drop
31. editAttribute
32. editAttributes
33. editObject
34. editPITarget
35. editMediaInfo
36. ensureSelectionAt
37. execute
38. executeMenuItem
39. extendSelectionAt
40. extractObject
41. fail
42. formatTextAs
42.1. Specifying an element template for use by command formatTextAs
42.2. Filtering the text pasted in the document
43. include
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. listPlugins
59. listRepeatable
60. moveDotTo
61. moveElement
62. normalizeWhiteSpacePre
63. overwriteMode
64. overwriteString
65. pass
66. paste
67. pasteAs
68. pasteImageAs
69. pasteSystemSelection
70. pick
71. preview
72. promoteListItem
73. prompt
74. putAttribute
75. recordMacro
76. redo
77. refresh
78. reinclude
79. remark
80. removeAttribute
81. repeat
82. replace
83. resizeImage
84. resizeTableTemplate
85. resizeCALSTableTemplate
86. run
87. search
88. searchReplace
89. searchReplaceElement
90. selectAt
91. selectFile
92. selectConvertedFile
93. selectLink
94. selectNode
94.1. List of element names or node types
94.2. OrNone, OrNode, OrElement modifiers
95. selectNodeAt
96. selectText
97. selectTo
98. setProperty
99. setReadOnly
100. setObject
101. showContentModel
102. showElementReference
103. showMatchingChar
104. showColumnRowLabels
105. spellCheck
106. split
107. start
108. status
109. toggleCollapsed
110. toggleTextStyle
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)