Platform Command Instruction Reference

This chapter provides an overview of the namespace of the platform command instructions and a discussion of its elements and attributes.

1. Overview

This section provides an overview of the namespace of the platform command instructions.

1.1. Features and Usage

Namespace that describes command instructions to execute features provided by VC's platform.

1.2. Namespace URI Reference

The URI reference of the namespace of the platform command instructions is http://xmlns.xfytec.com/instruction. In the following discussion, use the namespace prefix "instruction:" in order to describe the elements of platform command instructions.

Also, we use the following namespaces and their prefixes in the descriptions below.

2. Platform Command Instruction

2.1. Control System Instruction

2.1.1. Variable and Parameter

You can declare variables used in command instructions and define command parameters. Instructions and elements concerning variable and parameter definitions are as follows:

instruction:variable Instruction

Describes the variable to be used in the command instruction.

Attribute:
name (mandatory)

Set variable name. It can be QName.

select

Set the XPath expression which indicates the variable's value.

If omitted, the XML document fragment described within the element may be treated as an variable value.

Content:

You can describe any XML document fragment which will be an initial value of the variable within the instruction:variable element. If both the XML document fragment and select attribute are specified, the value specified within select attribute takes precedence.

instruction:param Element

Declares the parameter variable that is necessary for the command.

<!--
    To define a command with a parameter named "foo":
-->
<xvcd:command name="sample:original-command">
    <instruction:param name="foo"/>
      :
      :
</xvcd:command>
Attribute:
name (mandatory)

Specify the name of a parameter. It can be QName.

select

Set the XPath expression which indicates initial parameter value.

If omitted, the XML document fragment described within the element may be treated as an initial parameter value.

Content:

You can describe any XML document fragment which will be a initial parameter value within the instruction:param element. If both the XML document fragment and select attribute are specified, the value specified within select attribute takes precedence.

2.1.2. Command Call

You can invoke commands described in XVCD and commands provided by the platform. Instructions concerning command call are as follows:

instruction:call Instruction

Executes commands described in XVCD or commands provided by platform.

<!--
  To invoke source view command of
 the platform build-in command:
-->
<instruction:call name="command:source"/>
Attribute:
name (mandatory)

Specifies command name. Specify the command name, which is described within name attribute of the xvcd:command element or provided by a platform, by QName. It can be the attribute value template. If the command with the specified name doesn't exist, a warning appears.

namespace

Specifies namespace of command. Specify namespace URI reference. It can be the attribute value template. The namespace described in namespace attribute has precedence of the namespace specification by the namespace prefix of name attribute.

If omitted, a value is assumed to be not specified.

Content:

The instruction:call element can contain the following elements:

instruction:post Instruction

Registers commands described in XVCD or commands provided by platform in execution queue. The command registered in an execution queue is executed after the current command is terminated.

Attribute:
name (mandatory)

Specifies command name. Specify the command name, which is described within name attribute of the xvcd:command element or provided by a platform, by QName. It can be the attribute value template. If the command with the specified name doesn't exist, a warning appears.

namespace

Specifies namespace of command. Specify namespace URI reference. It can be the attribute value template. The namespace described in namespace attribute has precedence of the namespace specification by the namespace prefix of name attribute.

If omitted, a value is assumed to be not specified.

delay

Specify the time integer to delay command execution in millisecond. It can be the attribute value template.

If omitted, the command may be executed as soon as the command is ready for execution.

Content:

The instruction:post element can contain the following elements:

instruction:with-param Element

Specifies a parameter value when a command to be executed within the instruction:call instruction and the instruction:post instruction requires it.

<!--
    To invoke a command with a parameter:
-->
<xvcd:command name="sample:command">
      :
    <instruction:call name="sample:another-command">
        <instruction:with-param name="foo" select="true()"/>
    </instruction:call>
      :
</xvcd:command>
Attribute:
name (mandatory)

Set the name of a parameter. It can be QName.

select

Specify the XPath expression which indicates the parameter value.

If omitted, the XML document fragment described within the element may be treated as an parameter value.

Content:

You can describe any XML document fragment which will be a parameter value within the instruction:with-param element. If both the XML document fragment and select attribute are specified, the value specified within select attribute takes precedence.

instruction:call-next Instruction

This instruction element has the same name as the executing command, and executes the command of which the priority is low next to this command. The parameter passed to the command is equal to the one passed to the command during execution.

For example, when performing an override definition of the command with the same name as "Save" (command:save) system command using xvcd:command element, you can call the "Save" system command by describing this instruction in the command.

<!--
  To define and overwrite system's save command 
 to display confirmation message box before saving:
-->
<xvcd:command name="command:save">
    <!-- Displays message box -->
    <instruction:message-box
        type="question" option="yes-no" return-to="result">
        Save?
    </instruction:message-box>
    <!-- Saves it only when [Yes] -->
    <instruction:if test="'yes' = $result/instruction:dialog-result">
        <!-- Calls original save command (command:save) -->
        <instruction:call-next/>
    </instruction:if>
</xvcd:command>
Attribute:

No attributes for the element.

Content:

The instruction:call-next element is empty.

instruction:command-exists Instruction

The command instruction element that checks whether a command exists or not.

<!--
    To check whether foo:bar command exists:
    The result is assigned to a variable named "result".
-->
<instruction:command-exists name="foo:bar" return-to="result" />

<instruction:if test="$result">
    <!-- Operation when foo:bar command exists -->
    <instruction:call name="foo:bar"/>
</instruction:if>
Attribute:
name (mandatory)

Specifies command name. Specify the command name, which is described within name attribute of the xvcd:command element or provided by a platform, by QName. It can be the attribute value template.

namespace

Specifies namespace of command. Specify namespace URI reference. It can be the attribute value template. The namespace described in namespace attribute has precedence of the namespace specification by the namespace prefix of name attribute.

If omitted, a value is assumed to be not specified.

return-to (mandatory)

Specify the name of the variable that stores the check result whether a command exits or not. It can be QName.

Content:

The instruction:command-exists element is empty.

2.1.3. Conditional Branch

instruction:if Instruction

Used to execute the command instruction column only if the specified condition is satisfied.

<instruction:if test="Conditional expression">
    <!--
        Instruction column executed when the conditional expression is true
    -->
</instruction:if>
Attribute:
test (mandatory)

Describe an XPath expression as a condition. The XPath expression evaluation is treated as a true/false value. If it returns true, the command instruction column specified within instruction:if element is executed.

Content:

Describe the command instruction column within the instruction:if element.

instruction:choose Instruction

Used to execute command instruction column corresponding to the first of the satisfied multiple listed conditions. Use it in combination with the instruction:when element or instruction:otherwise element.

<instruction:choose>
    <instruction:when test="Conditional expression A">
        <!--
            Instruction column executed when the conditional expression A is true
        -->
    </instruction:when>
    <instruction:when test="Conditional expression B">
        <!--
            When conditional expression A is false,
            Instruction column executed when the conditional expression B is true
        -->
    </instruction:when>
    <instruction:when test="Conditional expression C">
        <!--
            When conditional expressions A and B are false,
            Instruction column executed when the conditional expression C is true
        -->
    </instruction:when>
    <instruction:otherwise>
        <!--
            When all conditional expressions A, B and C are false,
            Performed instruction columns
        -->
    </instruction:otherwise>
</instruction:choose>
Attribute:

No attributes for the element.

Content:

The elements available in the instruction:choose element are listed below:

  • instruction:when Element
    At least one element should be specified.
    As many elements as needed can be specified.
  • instruction:otherwise Element
    Only one element can be specified, if needed.
    Be sure to specify the instruction:otherwise last within the instruction:choose element if you specify the instruction:otherwise element.
    Optional.

instruction:when Element

Used to specify the conditions listed within the instruction:choose element and corresponding command instruction column.

Attribute:
test (mandatory)

Describe an XPath expression as a condition. The XPath expression evaluation is treated as a true/false value. If it returns true, the command instruction column specified within instruction:when element is executed.

Content:

You may describe the command instruction column within the instruction:when element.

instruction:otherwise Element

Specify the command instruction column to be executed when all conditions of the instruction:when elements described within instruction:choose element will not be satisfied.

Attribute:

No attributes for the element.

Content:

You may describe the command instruction column within the instruction:otherwise element.

2.1.4. Loop

instruction:for-each Instruction

Used to iterate the node in the desired node set included in the source document.

Attribute:
select (mandatory)

Specify the node set to which iterative process is applied. Specify the XPath expression which identifies the node set.

Content:

The following content can be specified within the instruction:for-each element:

  • instruction:sort Element
    Any number of elements can be specified, if needed.
    Optional. When you describe it, be sure to describe the element at the beginning of the instruction:for-each element.
  • Command instruction columns
    Describe the command instruction column within the executing element.

instruction:sort Element

Used to sort the processing order of the node set specified by the select attribute in the instruction:for-each element.

Attribute:
select (mandatory)

Specifies the node to be used to sort. Specify the XPath expression which returns the node.

data-type

Specify whether the node set is sorted by string or the string value converted to number. Specify text for the sort in character order, and specify number for the sort in converted numeric value order. It can be the attribute value template.

If omitted, text is assumed to be specified.

order

Specifies sort order. Specify ascending for the sort in ascending order, and specify descending for the sort in descending order. It can be the attribute value template.

If omitted, ascending is assumed to be specified.

Content:

The instruction:sort element is empty.

2.1.5. Exception Handling

instruction:try Instruction

Encloses the command instruction column in which a runtime exception may occur, and within the element, describes the occurred exception's handling and the handling to be executed with or without the occurrence of an exception.

Attribute:

No attributes for the element.

Content:

The contents available in the instruction:try element are listed below.

  • Command instruction columns
    Describe a series of command instruction columns in which a runtime exception may occur.
  • instruction:catch Element
    As many elements as needed can be specified.
    Optional.
  • instruction:finally Element
    Only one element can be specified, if needed.
    Be sure to specify the instruction:finally last within the instruction:try element if you specify the instruction:finally element.
    Optional.

At the end of the instruction:try element, at least one of either the instruction:catch element or the instruction:finally element should be described.

instruction:catch Element

Describes the procedure which handles the exception that occurred during the command instruction execution within the instruction:try element.

Attribute:
test (mandatory)

Describe the XPath expression which checks whether the occurred exception should be handled. In the XPath expression, the exception object evaluates to the context node. If it is evaluated to true, the command instruction column described in the element is executed. If multiple instruction:catch elements are described, each element is evaluated in the described order, and only the content of the element which first evaluates to true may be executed.

Content:

You may describe the command instruction column within the instruction:catch element.

The exception object may be referred to by using the variable named $instruction:exception in the operation of the instruction:catch element.

instruction:finally Element

Describes the command instruction column which should be executed before a series of operations within the instruction:try element has completed.

Attribute:

No attributes for the element.

Content:

You may describe the command instruction column within the instruction:finally element.

instruction:throw Instruction

Throws an exception object when an exception occurs in the processor which processes XVCD. For more information about exception object, see the "Exception Object".

Attribute:
exception (mandatory)

Specify the exception object. In general, the exception object caught by the instruction:catch element may be thrown intact.

Content:

The instruction:throw element is empty.

2.1.5.1. Exception Object

In XVCD, the exception object is represented as an XML document fragment, consisting of the following elements:

The element that consists of an exception object is shown below.

instruction:exception-name Element

Element to which the Java exception class name is output as content.

Attribute:

No attributes for the element.

Content:

Within the instruction:exception-name element, the Java's exception class name occurred during execution is described.

instruction:message Element

A message string of a Java exception object is output as the content of this element.

Attribute:

No attributes for the element.

Content:

A message that is held by a Java exception object is described in the instruction:message element.

instruction:cause Element

Element to which the history of exceptions, which caused the exception object to occur, is described as content.

Attribute:

No attributes for the element.

Content:

Within the instruction:cause element, the history of the Java exception class names whose exceptions caused the exception object to occur, are described.

2.2. UI System Instruction

2.2.1. Dialog

instruction:message-box Instruction

Displays a message box.

<!-- Displays confirmation message [Yes], [No] -->
<instruction:message-box
    title="Confirm close"
    type="question"
    option="yes-no"
    return-to="result">
     Are you sure to do **?
</instruction:message-box>

<instruction:if test="$result = 'yes'>
    <!-- If [Yes] is selected, -->
      :
</instruction:if>
Attribute:
title

Specify the title of message box. It can be the attribute value template.

If omitted, the string specified in the system is used.

type

Specify the type of message box. This can be specified with one of the following strings:

information
Information
error
Error
warning
Warning
question
Confirm close
plain
Plain

It can be the attribute value template.

If omitted, information is assumed to be specified.

option

Specify the combination of buttons displayed in message box. This can be specified with one of the following strings:

default
Default combination
Normally only [OK] is displayed.
yes-no
Combination of [Yes] and [No]
yes-no-cancel
Combination of [Yes]/[No]/[Cancel]
ok-cancel
Combination of [OK] and [Cancel]

It can be the attribute value template.

If omitted, default is assumed to be specified.

initial

Specify the button that has initial focus of buttons shown in the message box. The specified button now becomes a default in the message box. This can be specified with one of the following strings:

default
Sets initial focus to the button at the top.
yes
[Yes] Button
no
[No] Button
ok
[OK] Button
cancel
[Cancel] Button

It can be the attribute value template.

If omitted, default is assumed to be specified.

return-to

Specify the variable name which stores select result from the message box. It can be QName. The select resulted is represented by the XML document fragment composed of instruction:dialog-result element.

For example, if [Yes] is selected in the message box, the following XML document fragment is created.

<instruction:dialog-result>yes</instruction:dialog-result>

The following string is set to the content of instruction:dialog-result element:

yes
[Yes] is selected.
no
[No] is selected.
ok
[OK] is selected.
cancel
[Cancel] is selected. Or, the dialog box is closed by clicking the close box.

If omitted, the execution result may not be taken.

Content:

Any source XML document fragment for displaying in message box can be described within the instruction:message-box element.

instruction:file-chooser Instruction

Displays the file selection dialog box and returns the select result as an XML document fragment.

Attribute:
return-to (mandatory)

Specify the variable name which stores select result from the file selection dialog box. It can be QName. The select resulted is represented by the XML document fragment composed of the instruction:dialog-result element and the instruction:file element.

<!-- When file is selected and [OK] is clicked -->
<instruction:dialog-result>ok</instruction:dialog-result>
<instruction:file>file:/C:/foo/bar/foobar.xml</instruction:file>

If file is selected, the instruction:file element is included in the XML document fragment, but if file selection is cancelled, then the instruction:file element is not included in the XML document fragment.

<!-- If [Cancel] is clicked -->
<instruction:dialog-result>cancel</instruction:dialog-result>
type

Specify the file selection dialog box type. It can be a string. If save is specified as a value, the file saving dialog box is displayed. If another string is specified as a value, the open file selection dialog box is displayed.

If omitted, dialog box to select a file to open is displayed.

title

Specify the file selection dialog box title. It can be the attribute value template.

If omitted, the string specified in the system is used.

directory

Specify the directory which is listed within the dialog box. Specify it by encoded URL. It can be the attribute value template.

If omitted, the content of the directory is listed the last time file is selected. If file is not selected the last time, the content of user's home directory of the system may be listed.

multi-select

Specify whether to allow multiple file selection in the file selection dialog box. It can be a string. Select true to allow the selection of multiple files. Otherwise, only one file can be selected.

If omitted, the string other than true is assumed to be specified.

Content:

The instruction:file-chooser element can contain the following elements:

instruction:filter Element

Specifies the file displayed in the file selection dialog box.

Attribute:
pattern (mandatory)

Specify the file types that are displayed in the file selection dialog box by the pattern string. Describe the pattern string as shown below:

Specify the file type using wildcard (*) and extension.

*.xml

To describe multiple types, delimit them using a semi-colon (;).

*.xml;*.xvcd;*.xsl
label

Specify the string indicating file type. It can be the attribute value template.

If omitted, only the string specified by pattern attribute is displayed.

Content:

The instruction:filter element is empty.

instruction:directory-chooser Instruction

Displays the directory selection dialog box and returns the select result as an XML document fragment.

Attribute:
return-to (mandatory)

Specify the variable name which stores select result from the directory selection dialog box. It can be QName. The select resulted is represented by the XML document fragment composed of the instruction:dialog-result element and the instruction:directory element.

<instruction:dialog-result>ok</instruction:dialog-result>
<instruction:directory>file:/C:/Program%20Files/</instruction:directory>

If directory is selected, the instruction:directory element is included in the XML document fragment, but if directory selection is cancelled, then the instruction:directory element is not included in the XML document fragment.

<instruction:dialog-result>cancel</instruction:dialog-result>
title

Specify the directory selection dialog box title. It can be the attribute value template.

If omitted, the string specified in the system is used.

directory

Specify the directory which is first listed within the directory selection dialog box. Specify it by encoded URL. It can be the attribute value template.

If omitted, the content of the directory is listed the last time directory is selected. If directory is not selected the last time, the content of user's home directory of the system may be listed.

Content:

The instruction:directory-chooser element is empty.

instruction:template-chooser Instruction

Opens document template selection dialog box and returns the selected result as an XML document fragment.

Typically, this is used by combining with instruction:load-fragment instruction, as shown below.

<!-- 1. Document template is selected -->
<instruction:template-chooser return-to="selected-template"/>

<!-- 2. Load selected document template -->
<instruction:load-fragment
     href="{$selected-template/instruction:template-url}"
     return-to="fragment"/>

<!-- 3. Insert loaded document template (fragment) -->
<xvcd:insert ref="$somewhere" select=$fragment"/>
Attribute:
return-to (mandatory)

Specify the variable name which stores the selected result from the document template selection dialog box. It can be QName.

The select resulted is represented by the XML document fragment composed of instruction:dialog-result element, instruction:template-url element, and instruction:template-label element.

<instruction:dialog-result>ok</instruction:dialog-result>
<instruction:template-url>new:file:///foo/bar.xml</instruction:template-url>
<instruction:template-label>SAMPLE DOCUMENT TEMPLATE</instruction:template-label>

However, if instruction:dialog-result element is not ok, instruction:template-url element and instruction:template-label element are not included in the XML document fragment.

<instruction:dialog-result>cancel</instruction:dialog-result>
title

Specify the document template selection dialog box title. It can be the attribute value template.

If omitted, the string specified in the system is used.

Content:

instruction:template-chooser element is empty.

instruction:color-chooser Instruction

Displays color selection dialog box and returns the selected result as an XML document fragment.

Attribute:
return-to (mandatory)

Specify the variable name which stores the selected result from the color selection dialog box. It can be QName. The select resulted is represented by the XML document fragment composed of the instruction:dialog-result element and the instruction:color element.

<instruction:dialog-result>ok</instruction:dialog-result>
<instruction:color red="111" green="111" blue="111"/>

If color is selected, the instruction:color element is included within the XML document fragment, but if color selection is cancelled, the instruction:color element is not included within the XML document fragment.

<instruction:dialog-result>cancel</instruction:dialog-result>
title

Specify the color selection dialog box title. It can be the attribute value template.

If omitted, the string specified in the system is used.

Content:

The instruction:color-chooser element is empty.

instruction:font-family-chooser Instruction

Displays the font selection dialog box and returns the select result as an XML document fragment.

Attribute:
return-to (mandatory)

Specify the variable name which stores select result from the font selection dialog box. It can be QName. The select resulted is represented by the XML document fragment composed of the instruction:dialog-result element and the instruction:font-family element.

<instruction:dialog-result>ok</instruction:dialog-result>
<instruction:font-family>'Arial',sans-serif</instruction:font-family>

If font is selected, instruction:fontfamily element is included in the selected XML document fragment. If font selection is cancelled, instruction:font-family element is not included in the selected XML document fragment.

<instruction:dialog-result>cancel</instruction:dialog-result>
title

Specify the font selection dialog box title. It can be the attribute value template.

If omitted, the string specified in the system is used.

font-family

Specify selection status at the font selection dialog box startup by CSS font-family property. It can be the attribute value template.

If omitted, the font selection dialog box with no font selection is displayed.

Content:

The insturction:font-family-chooser element is empty.

instruction:dialog Instruction

Displays a dialog box based on the XML document fragment described in the element content and stores the execution result in a variable. The node set displayed in the dialog box is converted by applying the "template rule". When you close the dialog box, all the edits to the XML document fragment used to display the dialog box are stored in a variable.

Attribute:
return-to (mandatory)

Specify the variable which stores the result of closing the dialog box. When the dialog box is closed, the XML document fragment is stored in the variable which contains the result of the XML document converted by VC to be displayed and edited in the dialog box and the instruction:dialog-result element indicating the closing status.

width

Specifies the width of the dialog box to display. Specify integer number in pixels. It can be the attribute value template.

If omitted, an appropriate width may be set based on the width of the content displayed in the dialog box.

height

Specifies the height of the dialog box to display. Specify integer number in pixels. It can be the attribute value template.

If omitted, an appropriate height may be set based on the height of the content displayed in the dialog box.

Content:

Within the instruction:dialog element, the XML document fragment which is displayed within the dialog box can be described. The described XML document fragment is converted by VC. The destination XML document fragment is displayed in the dialog box.

2.2.1.1. Result of Selections in Dialog Box

The dialog box's result represented by the following command instruction elements will be returned as an XML document fragment.

The elements and attributes, which consist of the XML document fragment that represents the execution result of the dialog box, are listed below.

instruction:dialog-result Element

Used to represent each dialog box's execution result.

Attribute:
is-closed-with-command (mandatory)

Indicate whether the dialog box is terminated by command:dialog-close command. This can be true or false value. If the dialog box is terminated by command:dialog-close command, the attribute is set to "true". If the dialog box is forcibly terminated due to close box or such, it is set to "false".

Use it to represent the dialog box's result executed using the instruction:dialog instruction.

Content:

Within the instruction:dialog-result element, the edits to the XML document fragment displayed within the dialog box are described.

instruction:file Element

Used to represent the file selected by the instruction:file-chooser instruction.

<instruction:file>file:/C:/foo/bar/foobar.xml</instruction:file>
Attribute:

No attributes for the element.

Content:

The absolute URL of the selected file is described within the instruction:file element. The URL is encoded URL.

instruction:directory Element

Used to represent the directory selected by the instruction:directory-chooser instruction.

<instruction:directory>file:/C:/Program%20Files/</instruction:directory>
Attribute:

No attributes for the element.

Content:

The absolute URL of the selected directory is described within the instruction:directory element. The URL is encoded URL.

instruction:template-url Element

Used to represent the URL of document template selected by the instruction:template-chooser instruction.

Attribute:

No attributes for the element.

Content:

In the instruction:template-url element, the absolute URL of the selected document template. The URL is encoded URL.

instruction:template-label Element

Used to represent the label of document template selected by the instruction:template-chooser instruction.

Attribute:

No attributes for the element.

Content:

In the instruction:template-label element, the label string of the selected document template.

instruction:color Element

Used to represent the color selected by the instruction:color-chooser instruction.

<instruction:color red="0" green="0" blue="0"/>
Attribute:
red (mandatory)

Set the values of red of the selected color represented by the RGB value. This can be a value between 0 and 255.

green (mandatory)

Set the values of green of the selected color represented by the RGB value. This can be a value between 0 and 255.

blue (mandatory)

Set the values of blue of the selected color represented by the RGB value. This can be a value between 0 and 255.

Content:

The instruction:color element is empty.

instruction:font-family Element

Used to represent the font selected by the instruction:font-family-chooser instruction.

Attribute:

No attributes for the element.

Content:

CSS font-family property value is described in instruction:font-family element.

2.2.2. UI Operations

instruction:show-popup Instruction

Displays a popup menu based on the content described within the element. Within the element, XVCD template rule can be described.

<xvcd:action event="event:*[@popup-trigger='true']">
    <instruction:param name="event:event"/>
    <instruction:show-popup
        x="{$event:event/*/@area-x}"
        y="{$event:event/*/@area-y}">
        <ui:ui version="1.0">
            <ui:context-menu>
                <ui:menu-item label="Foo" command="command:foo"/>
            </ui:context-menu>
        </ui:ui>
    </instruction:show-popup>
</xvcd:action>
Attribute:
x (mandatory)

Specifies the upper-left x coordinate for the popup menu to display. Specify real number in pixels. It can be the attribute value template. The coordinate is relative to the top left corner of the document display area.

y (mandatory)

Specifies the upper-left y coordinate for the popup menu to display. Specify real number in pixels. It can be the attribute value template. The coordinate is relative to the top left corner of the document display area.

Content:

Within the instruction:show-popup element, describe XVCD template rule. The evaluation of a template rule described in the element should be the following elements:

instruction:show-status-message Instruction

Outputs a message to the status bar.

Attribute:
message (mandatory)

Specify a message to output to the status bar. It can be the attribute value template.

Content:

The instruction:show-status-message element is empty.

2.3. I/O System (Input/Output System) Instruction

2.3.1. Document

Instruction definitions to create, read and save XML document are as follows:

instruction:create-document Instruction

Creates an XML document based on the specified XML document fragment.

Attribute:
href (mandatory)

Describes URL to be assigned to the created XML document. Specify it by encoded URL. It can be the attribute value template.

select

Specify the source fragment for the XML document being created.

If omitted, the content of the element may be treated as a source XML document fragment for the XML document being created.

Content:

Any source XML document fragment for the XML document being created can be described within the instruction:create-document element. If the select attribute is also specified simultaneously, the content specified within the select attribute takes precedence.

instruction:load-document Instruction

Used to jump to the linked document specified in the URL.

Attribute:
href (mandatory)

Specifies the URL of the linked document. Specify it by encoded URL. It can be the attribute value template.

target

Specifies the frame into which the linked document is loaded and displayed. Specify the ID value that identifies a frame. If specified frame is not the target frame for link function, the linked document is loaded into the parent frame of the displayed frame. For more information, see the frames:frame element of Frame Descriptions Reference.

If omitted, the linked document may be loaded into the displayed frame.

Content:

The instruction:load-document element is empty.

instruction:load-fragment Instruction

Loads the document specified by the URL and then returns it as a document fragment.

Attribute:
href (mandatory)

Specifies the URL of the loaded document. Specify it by encoded URL. It can be the attribute value template.

return-to (mandatory)

Specifies the name of the variable that stores the loaded document fragment. It can be QName.

Content:

The instruction:load-fragment element is empty.

instruction:save-document Instruction

Stores the XML document's document node in the specified URL file. The target storage URL of the overall XML document is not changed after the command instruction execution.

Attribute:
href (mandatory)

Specifies the file's saving URL. Specify it by encoded URL. It can be the attribute value template.

select

Specify the document node to save in the file. It can be an XPath expression.

If omitted, the document node from which context node is derived may be stored.

Content:

The instruction:save-document element is empty.

2.4. Tool System Instruction

2.4.1. Development and Debug

Instruction definitions used for process verification or debugging when developing scripts in XVCD are as follows:

instruction:message Instruction

Outputs a message to the processor which processes XVCD. After the XML document fragment is processed by the processor that processes the XVCD, the string value is output as a message.

Used for process verification or debugging when developing scripts in XVCD.

Attribute:

No attributes for the element.

Content:

You can describe any XML document fragment within the instruction:message element.

instruction:tree-message Instruction

Outputs an XML document fragment to the processor which processes XVCD. After the XML document fragment is processed by the processor that processes the XVCD, the resulting XML document fragment is indented according to the tire and output.

Used for process verification or debugging when developing scripts in XVCD.

Attribute:

No attributes for the element.

Content:

You can describe any XML document fragment within the instruction:tree-message element.

2.4.2. Other

instruction:beep Instruction

Used to sound beep.

Attribute:

No attributes for the element.

Content:

The instruction:beep element is empty.