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. include
45. insert
46. insertCharByName
47. insertCharSequence
48. insertControlChar
49. insertNewlineOrSplitBlock
50. insertNode
51. insertOrOverwriteString
52. insertSpecialChars
53. insertSameBlock
53.1. Specifying splittable blocks
54. insertString
55. insertTextOrMoveDot
56. join
57. listAnchors
58. listBindings
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)