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