This section provides an overview of the platform built-in commands.
This chapter explains the platform built-in commands.
This section provides an overview of the platform built-in commands.
The platform built-in commands are provided with the platform that executes VC.
You can add commands to the platform by providing their plug-ins. Therefore, you must identify the module that provides the command when executing it. To identify the module, you use the namespace.
When you write a command in your XVCD, you must explicitly identify the to namespace to which it belongs. It requires you to use QName to represent the name of any command provided with the platform or plug-ins. Command names without a namespace prefix are used locally in the document.
The namespace URI reference for the platform built-in commands is http://xmlns.xfytec.com/command. In the descriptions below, we use command: as the namespace prefix to describe every platform built-in command.
Also, we use the following namespaces and their prefixes in the descriptions below.
xvcd: as the namespace prefix. For more information, see the VC Core Reference.
instruction: as the namespace prefix. For more information, see the Platform Command Instruction Reference.
This section explains each platform built-in command by its type.
Commands for file are listed below.
command:open CommandOpens a document in a new window.
string command:url
Specify a file to load with encoded URL.
If it is omitted, the dialog for file selection is displayed to select the loading file.
command:reload CommandReloads the currently opened document.
string command:encoding
Specifies the encoding for the document. This is set to the string representing the encoding. If set to default, the encoding is inferred from the MIME type of the file or the contents of the document.
If omitted, the document is reloaded with the current encoding.
command:save commandSaves the currently opened document.
string command:save-as
Specify whether to save as or not. This can be a string. If set to "true", the file selection dialog box opens. The document is saved as the file name specified in the dialog box, if necessary. If you set "false", the document is saved into the same document.
If omitted, "false" is assumed to be set.
command:close CommandCloses the window. If there are any modified but not saved documents when the window is being closed, the behavior of the command depends upon the property settings in the xfy technology user agent.
No parameter.
command:exit CommandCloses all documents opened by xfy technology user agent and terminates the xfy technology user agent. If there are any modified but not saved documents when the window is being closed, the behavior of the command depends upon the property settings in the xfy technology user agent.
No parameter.
Commands for display are listed below.
command:change-vocabulary CommandChanges a view to the vocabulary service specified by the parameter.
The vocabulary service to be changed is specified using QName, or namespace URI and local name. If all parameters are omitted, the vocabulary service is changed to the one first displayed when the XML document is opened.
string command:vocabulary-name
Specifies the vocabulary service to be used with the vocabulary name used by the vocabulary service. It can be QName. If the specified value is not QName, the vocabulary names are searched on the assumption that the local name of the vocabulary is specified in string.
If omitted, a value is assumed to be not specified.
string command:vocabulary-name-ns
Specifies the namespace URI reference to which the vocabulary service refers in URI string.
If omitted, a value is assumed to be not specified.
string command:vocabulary-name-local
Specifies the local name to which the vocabulary service refers in string.
If omitted, a value is assumed to be not specified.
command:backward CommandMoves to the previous document while navigating through documents using their links.
No parameter.
command:forward CommandMoves to the next document while navigating through documents using their links.
No parameter.
command:upward CommandMoves to the parent directory.
No parameter.
command:home CommandDisplays the document configured as the home page.
No parameter.
command:source CommandDisplays the source text of the currently opened document.
No parameter.
Commands for edit are listed below.
command:undo CommandReverses the last edit operation.
No parameter.
command:redo CommandPerforms the last reversed edit operation again.
No parameter.
command:move-point CommandMoves the caret to the coordinates of the screen specified with the parameters below.
number command:screen-x
Specifies the x coordinate to move the caret to. The coordinates of the top left corner of the canvas are (0,0).
number command:screen-y
Specifies the y coordinate to move the caret to. The coordinates of the top left corner of the canvas are (0,0).
boolean command:selecting
Specify whether to move caret with selecting a range or without. This can be a true/false value.
true
false
If omitted, false is assumed to be specified.
command:move-right CommandMoves the caret to the right.
string command:unit
Specifies the unit to move the caret by. This can be specified with one of the following strings.
character
word
node
If omitted, character is assumed to be specified.
boolean command:selecting
Specify whether to move caret with selecting a range or without. This can be a true/false value.
true
false
If omitted, false is assumed to be specified.
command:move-left CommandMoves the caret to the left.
string command:unit
Specifies the unit to move the caret by. This can be specified with one of the following strings.
character
word
node
If omitted, character is assumed to be specified.
boolean command:selecting
Specify whether to move caret with selecting a range or without. This can be a true/false value.
true
false
If omitted, false is assumed to be specified.
command:move-up CommandMoves the caret upward.
boolean command:selecting
Specify whether to move caret with selecting a range or without. This can be a true/false value.
true
false
If omitted, false is assumed to be specified.
command:move-down CommandMoves the caret downward.
boolean command:selecting
Specify whether to move caret with selecting a range or without. This can be a true/false value.
true
false
If omitted, false is assumed to be specified.
command:move-home CommandMoves the caret to the top of the moving unit.
string command:unit
Specifies the unit to move the caret by. This can be specified with one of the following strings.
character
word
node
line
If omitted, character is assumed to be specified.
boolean command:stop-home-end
Specifies whether or not to stop the caret at the top of the moving unit that contains the current position. If set to true, the caret stops at the head of the current moving unit.
If omitted, moves the caret at the top of previous moving unit.
boolean command:selecting
Specify whether to move caret with selecting a range or without. This can be a true/false value.
true
false
If omitted, false is assumed to be specified.
command:move-end CommandMoves the caret to the end of the moving unit.
string command:unit
Specifies the unit to move the caret by. This can be specified with one of the following strings.
character
word
node
line
If omitted, character is assumed to be specified.
boolean command:stop-home-end
Specifies whether or not to stop the caret at the end of the moving unit that contains the current position. If set to true, the caret stops at the end of the current moving unit.
If omitted, moves the caret to the end of next moving unit.
boolean command:selecting
Specify whether to move caret with selecting a range or without. This can be a true/false value.
true
false
If omitted, false is assumed to be specified.
command:select CommandSelects an object at the current caret position.
string command:unit
Specifies the unit to select an object by. This can be specified with one of the following strings.
character
word
node
line
If omitted, character is assumed to be specified.
Commands for bookmarks are listed below.
command:add-bookmark CommandAdds a bookmark for the currently opened document.
No parameter.
command:remove-bookmark CommandRemoves the bookmark for the currently opened document.
No parameter.
command:edit-bookmark CommandEdits the bookmarks.
No parameter.
Commands for tools are listed below.
command:transformed-document-writer CommandSaves the destination document to be saved for the currently opened document if it is converted to display by VC.
This command is available when xfy Developer's Toolkit is installed.
string command:save-url
Specify the encoded URL to save the destination document to.
If omitted, dialog box to select a document to save is displayed.
string command:document-type
Specifies the save format. This can be a string. If html is set, the save format is HTML. Otherwise, the save format is XML.
If omitted, the save format is XML format.
Other commands are listed below.
command:dialog-close Command Closes the dialog box opened by the instruction:dialog. Available only for dialog boxes.
No parameter.