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. ensureSelectionAt
34. execute
35. extendSelectionAt
36. extractObject
37. fail
38. formatTextAs
38.1. Specifying an element template for use by command formatTextAs
38.2. Filtering the text pasted in the document
39. include
40. insert
41. insertCharByName
42. insertCharSequence
43. insertControlChar
44. insertNewlineOrSplitBlock
45. insertNode
46. insertOrOverwriteString
47. insertSpecialChars
48. insertSameBlock
48.1. Specifying splittable blocks
49. insertString
50. insertTextOrMoveDot
51. join
52. listBindings
53. masterDocumentControl
54. moveDotTo
55. moveElement
56. normalizeWhiteSpacePre
57. overwriteMode
58. overwriteString
59. pass
60. paste
61. pasteAs
62. pasteImageAs
63. pasteSystemSelection
64. pick
65. preview
66. promoteListItem
67. prompt
68. putAttribute
69. recordMacro
70. redo
71. refresh
72. reinclude
73. remark
74. removeAttribute
75. repeat
76. replace
77. resizeImage
78. resizeTableTemplate
79. resizeCALSTableTemplate
80. run
81. search
82. searchReplace
83. searchReplaceElement
84. selectAt
85. selectFile
86. selectConvertedFile
87. selectLink
88. selectNode
88.1. List of element names or node types
88.2. OrNone, OrNode, OrElement modifiers
89. selectNodeAt
90. selectText
91. selectTo
92. setImageMode
93. setProperty
94. setReadOnly
95. setObject
96. showContentModel
97. showElementReference
98. showMatchingChar
99. showTags
100. spellCheck
101. split
102. start
103. status
104. toggleCollapsed
105. toggleTextStyle
106. undo
107. uninclude
108. updateInclusions
109. viewObject
110. webSearch
110.1. Declaring search engines
111. wrap
112. xIncludeText
113. xpathSearch
114. XXE.close
115. XXE.compare
116. XXE.edit
117. XXE.editInclusion
118. XXE.new
119. XXE.open
120. XXE.save
121. XXE.saveAll
122. XXE.setReadOnly
123. XXE.saveAs
124. 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 18, “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 11, “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:

Common pitfalls to be avoided

  • A command parameter is not namespace-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)