Command element

The top-level element, also known as the document or root element. The Command element contains a complete command syntax specification of an extension command.

Table 1. Command attributes
Attribute Use Description Valid Values
Language optional The programming language in which the command is implemented. Defaults to Python.

Python

R

Java

Mode optional Specifies whether the implementation code is contained in an R source file or an R package. Only applies for Language="R". Defaults to Source.

Source

Package

Name required The name of the command. The name can consist of up to three words (case insensitive) separated by spaces. Command names are restricted to 7-bit ASCII characters. For multi-word command names, ensure that the first word as well as the first two words do not match the name of another command. For example, do not use the name CMD NEW if there is a command named CMD. Likewise, do not use the name MY CMD NEW if there is a command named MY CMD. any

XML representation

<xs:element name="Command" type="command-content">
   <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" ref="Subcommand"></xs:element> 
   </xs:sequence> 
   <xs:attribute name="Name" use="required"></xs:attribute> 
   <xs:attribute name="Language">
      <xs:simpleType>
         <xs:restriction base="xs:token"> 
            <xs:enumeration value="Python"></xs:enumeration> 
            <xs:enumeration value="R"></xs:enumeration> 
            <xs:enumeration value="Java"></xs:enumeration>
         </xs:restriction>
      </xs:simpleType>
   </xs:attribute>
   <xs:attribute name="Mode">
      <xs:simpleType>
         <xs:restriction base="xs:token"> 
            <xs:enumeration value="Source"></xs:enumeration> 
            <xs:enumeration value="Package"></xs:enumeration>
         </xs:restriction>
      </xs:simpleType>
   </xs:attribute>
</xs:element>

Child elements

Subcommand element