klish.xsd 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://clish.sourceforge.net/XMLSchema" targetNamespace="http://clish.sourceforge.net/XMLSchema">
  3. <xs:annotation>
  4. <xs:appinfo>XML schema for klish configuration files</xs:appinfo>
  5. <xs:documentation xml:lang="en">
  6. The klish utility uses XML files for configuration. This schema
  7. allows to validate klish XML files. To check XML files use the
  8. following command:
  9. 'xmllint --schema /path/to/klish.xsd --noout *.xml'
  10. </xs:documentation>
  11. <xs:documentation xml:lang="ru">
  12. Утилита klish использует формат XML для своих конфигурационных
  13. файлов. Схема позволяет проверить эти конфигурационные XML файлы
  14. на правильность. Следующая команда выполнит проверку:
  15. 'xmllint --schema /path/to/klish.xsd --noout *.xml'
  16. </xs:documentation>
  17. </xs:annotation>
  18. <xs:element name="KLISH" type="klish_t"/>
  19. <xs:element name="PLUGIN" type="plugin_t"/>
  20. <xs:element name="HOTKEY" type="hotkey_t"/>
  21. <xs:element name="ACTION" type="action_t"/>
  22. <xs:element name="ENTRY" type="entry_t"/>
  23. <xs:element name="VIEW" type="view_t"/> <!-- Wrapper -->
  24. <xs:element name="COMMAND" type="command_t"/> <!-- Wrapper -->
  25. <xs:element name="COND" type="command_t"/> <!-- Wrapper -->
  26. <xs:element name="COMPL" type="command_t"/> <!-- Wrapper -->
  27. <xs:element name="HELP" type="command_t"/> <!-- Wrapper -->
  28. <xs:element name="FILTER" type="command_t"/> <!-- Wrapper -->
  29. <xs:element name="PTYPE" type="ptype_t"/> <!-- Wrapper -->
  30. <xs:element name="PARAM" type="param_t"/> <!-- Wrapper -->
  31. <xs:element name="SWITCH" type="param_t"/> <!-- Wrapper -->
  32. <xs:element name="SUBCOMMAND" type="param_t"/> <!-- Wrapper -->
  33. <xs:element name="MULTI" type="param_t"/> <!-- Wrapper -->
  34. <xs:element name="NSPACE" type="nspace_t"/> <!-- Wrapper -->
  35. <!--
  36. *******************************************************
  37. * <KLISH>
  38. ********************************************************
  39. -->
  40. <xs:group name="klish_group_t">
  41. <xs:choice>
  42. <xs:element ref="PLUGIN" minOccurs="0" maxOccurs="unbounded"/>
  43. <xs:element ref="HOTKEY" minOccurs="0" maxOccurs="unbounded"/>
  44. <xs:element ref="ENTRY" minOccurs="0" maxOccurs="unbounded"/>
  45. <xs:element ref="PTYPE" minOccurs="0" maxOccurs="unbounded"/>
  46. <xs:element ref="VIEW" minOccurs="0" maxOccurs="unbounded"/>
  47. </xs:choice>
  48. </xs:group>
  49. <xs:complexType name="klish_t">
  50. <xs:annotation>
  51. <xs:documentation xml:lang="en">
  52. 'KLISH' is the top level container.
  53. </xs:documentation>
  54. <xs:documentation xml:lang="ru">
  55. Тег 'KLISH' - контейнер верхнего уровня. Все остальные
  56. теги должны быть вложенными.
  57. </xs:documentation>
  58. </xs:annotation>
  59. <!-- Any order of tags and any number -->
  60. <xs:sequence>
  61. <xs:group ref="klish_group_t" minOccurs="0" maxOccurs="unbounded"/>
  62. </xs:sequence>
  63. </xs:complexType>
  64. <!--
  65. *******************************************************
  66. * <PLUGIN> is used to dynamically load plugins.
  67. * Plugin contains symbols that can be used for ACTIONs.
  68. *
  69. * name - Plugin name. If "file" attribute is not specified then plugin's
  70. * filename is autogenerated as "kplugin-<name>.so".
  71. * [id] - Internal plugin name for references. Can be the same as "name".
  72. * [file] - File name to use if standard autogenerated filename (using "name"
  73. * field) is not appropriate.
  74. ********************************************************
  75. -->
  76. <xs:complexType name="plugin_t">
  77. <xs:annotation>
  78. <xs:documentation xml:lang="en">
  79. Load plugin with symbols (functions).
  80. </xs:documentation>
  81. <xs:documentation xml:lang="ru">
  82. Загружает плугин для использования определяемых в нем
  83. символов (функций).
  84. </xs:documentation>
  85. </xs:annotation>
  86. <xs:simpleContent>
  87. <xs:extension base="xs:string">
  88. <xs:attribute name="name" type="xs:string" use="required"/>
  89. <xs:attribute name="id" type="xs:string" use="optional"/>
  90. <xs:attribute name="file" type="xs:string" use="optional"/>
  91. </xs:extension>
  92. </xs:simpleContent>
  93. </xs:complexType>
  94. <!--
  95. *******************************************************
  96. * <ENTRY> This tag is used to define wide class of elements.
  97. *
  98. * name - A text name for entry.
  99. *
  100. * help - A text string which describes the purpose of the entry.
  101. *
  102. * ptype - Reference to a PTYPE name. This parameter will be
  103. * validated against the syntax specified for that type.
  104. * The special value of "" indicates the parameter is a boolean flag.
  105. * The verbatim presence of the texual name on the command line
  106. * simply controls the conditional variable expansion for this
  107. * parameter.
  108. *
  109. * [mode] - Parameter mode. It can be "common", "switch", "subcommand", "multi".
  110. *
  111. * [prefix] - defines the prefix for an optional parameter. A prefix
  112. * with this value on the command line will signify the presence
  113. * of an additional argument which will be validated as the
  114. * value of this parameter.
  115. *
  116. * [optional] - Specify whether parameter is optional. The allowed values
  117. * is "true" or "false". It's false by default.
  118. *
  119. * [order] - Used only together with "optional=true" field.
  120. * If order="true" then user can't enter previously declared
  121. * optional parameters after current validated parameter.
  122. * The allowed values is "true" or "false". It's false by default.
  123. *
  124. * [default] - defines a default value for a parameter. Any parameters
  125. * at the end of command line which have default values need
  126. * not explicitly be entered.
  127. *
  128. * [value] - defines the user's value for subcommand. If this option
  129. * is defined the entered parameter will be compared to this
  130. * value instead the "name" field. If this field is defined
  131. * the mode of PARAM will be forced to "subcommand". The
  132. * feature is implemented to support subcommands with the
  133. * same names.
  134. *
  135. * [hidden] - define the visibility of the parameter while ${__line}
  136. * and ${__params} auto variables expanding. The allowed values
  137. * is "true" and "false".
  138. *
  139. * [test] - define the condition (see the description of 'test'
  140. * utility) to process this parameter.
  141. *
  142. * [access] - access rights
  143. *
  144. * [filter="true/false"] - Developer can define 'filter' command to filter stdout
  145. * of piped ("|") commands. Filter can't contain 'sync' ACTIONs. It will be
  146. * always fork()-ed. Only filters can be on the right hand to pipe "|".
  147. * Consider filters as a special type of commands.
  148. *
  149. ********************************************************
  150. -->
  151. <xs:simpleType name="entry_mode_t">
  152. <xs:restriction base="xs:string">
  153. <xs:enumeration value="sequence"/>
  154. <xs:enumeration value="switch"/>
  155. <xs:enumeration value="empty"/>
  156. </xs:restriction>
  157. </xs:simpleType>
  158. <xs:simpleType name="entry_purpose_t">
  159. <xs:restriction base="xs:string">
  160. <xs:enumeration value="common"/>
  161. <xs:enumeration value="ptype"/>
  162. <xs:enumeration value="prompt"/>
  163. <xs:enumeration value="cond"/>
  164. <xs:enumeration value="completion"/>
  165. <xs:enumeration value="help"/>
  166. </xs:restriction>
  167. </xs:simpleType>
  168. <xs:group name="entry_group_t">
  169. <xs:choice>
  170. <xs:element ref="PTYPE" minOccurs="0" maxOccurs="unbounded"/>
  171. <xs:element ref="VIEW" minOccurs="0" maxOccurs="unbounded"/>
  172. <xs:element ref="NSPACE" minOccurs="0" maxOccurs="unbounded"/>
  173. <xs:element ref="COMMAND" minOccurs="0" maxOccurs="unbounded"/>
  174. <xs:element ref="FILTER" minOccurs="0" maxOccurs="unbounded"/>
  175. <xs:element ref="ACTION" minOccurs="0" maxOccurs="unbounded"/>
  176. <xs:element ref="PARAM" minOccurs="0" maxOccurs="unbounded"/>
  177. <xs:element ref="ENTRY" minOccurs="0" maxOccurs="unbounded"/>
  178. </xs:choice>
  179. </xs:group>
  180. <xs:complexType name="entry_t">
  181. <!-- Any order of tags and any number -->
  182. <xs:sequence>
  183. <xs:group ref="entry_group_t" minOccurs="0" maxOccurs="unbounded"/>
  184. </xs:sequence>
  185. <xs:attribute name="name" type="xs:string" use="required"/>
  186. <xs:attribute name="help" type="xs:string" use="optional"/>
  187. <xs:attribute name="container" type="xs:boolean" use="optional" default="false"/>
  188. <xs:attribute name="mode" type="entry_mode_t" use="optional" default="switch"/>
  189. <xs:attribute name="purpose" type="entry_purpose_t" use="optional" default="common"/>
  190. <xs:attribute name="min" type="xs:string" use="optional" default="1"/>
  191. <xs:attribute name="max" type="xs:string" use="optional" default="1"/>
  192. <xs:attribute name="ptype" type="xs:string" use="optional"/>
  193. <xs:attribute name="ref" type="xs:string" use="optional"/>
  194. <xs:attribute name="value" type="xs:string" use="optional"/>
  195. <xs:attribute name="restore" type="xs:boolean" use="optional" default="false"/>
  196. <xs:attribute name="order" type="xs:boolean" use="optional" default="false"/>
  197. <xs:attribute name="filter" type="xs:boolean" use="optional" default="false"/>
  198. </xs:complexType>
  199. <!--
  200. *******************************************************
  201. * <PTYPE> is used to define the syntax for a parameter type.
  202. *
  203. * name="<string>" - A textual name for this type. This name can be used to
  204. * reference this type within a PARAM's ptype attribute.
  205. *
  206. * help="<string>" - Help string.
  207. *
  208. ********************************************************
  209. -->
  210. <xs:complexType name="ptype_t">
  211. <xs:sequence>
  212. <xs:element ref="ACTION" minOccurs="0" maxOccurs="unbounded"/>
  213. <xs:element ref="ENTRY" minOccurs="0" maxOccurs="unbounded"/>
  214. </xs:sequence>
  215. <xs:attribute name="name" type="xs:string" use="required"/>
  216. <xs:attribute name="help" type="xs:string" use="required"/>
  217. </xs:complexType>
  218. <!--
  219. *******************************************************
  220. * <VIEW> defines the contents of a specific CLI view.
  221. *
  222. * name - a textual name for the view
  223. *
  224. * prompt - a textual definition of the prompt to be
  225. * used whilst in this view.
  226. * NB. The prompt may contain environment
  227. * or dynamic variables which are expanded
  228. * before display.
  229. *
  230. * [access] - access rights
  231. *
  232. ********************************************************
  233. -->
  234. <xs:complexType name="view_t">
  235. <xs:sequence>
  236. <xs:element ref="NSPACE" minOccurs="0" maxOccurs="unbounded"/>
  237. <xs:element ref="COMMAND" minOccurs="0" maxOccurs="unbounded"/>
  238. <xs:element ref="HOTKEY" minOccurs="0" maxOccurs="unbounded"/>
  239. <xs:element ref="ENTRY" minOccurs="0" maxOccurs="unbounded"/>
  240. </xs:sequence>
  241. <xs:attribute name="name" type="xs:string" use="required"/>
  242. <xs:attribute name="prompt" type="xs:string" use="optional"/>
  243. <xs:attribute name="access" type="xs:string" use="optional"/>
  244. </xs:complexType>
  245. <!--
  246. *******************************************************
  247. * <STARTUP> is used to define what happens when the CLI
  248. * is started. Any text held in a <DETAIL> sub-element will
  249. * be used as banner text, then any defined <ACTION> will be
  250. * executed. This action may provide Message Of The Day (MOTD)
  251. * type behaviour.
  252. *
  253. * view - defines the view which will be transitioned to, on
  254. * successful execution of any <ACTION> tag.
  255. *
  256. * [viewid] - defined the new value of the ${VIEWID} variable to
  257. * be used if a transition to a new view occurs.
  258. *
  259. * [default_shebang] - The default shebang for all commands.
  260. *
  261. * [timeout] - The idle timeout. The clish will exit if user
  262. * have not press any key while this timeout.
  263. *
  264. * [lock] - The same as lock for COMMAND tag.
  265. *
  266. * [interrupt] - The same as interrupt for COMMAND tag.
  267. *
  268. * [default_plugin] - Use (or don't use) default plugin.
  269. * It can be true or false.
  270. ********************************************************
  271. -->
  272. <xs:complexType name="startup_t">
  273. <xs:sequence>
  274. <xs:element ref="ACTION" minOccurs="0" maxOccurs="unbounded"/>
  275. </xs:sequence>
  276. <xs:attribute name="view" type="xs:string" use="required"/>
  277. <xs:attribute name="viewid" type="xs:string" use="optional"/>
  278. <xs:attribute name="default_shebang" type="xs:string" use="optional"/>
  279. <xs:attribute name="timeout" type="xs:string" use="optional"/>
  280. <xs:attribute name="default_plugin" type="xs:boolean" use="optional" default="true"/>
  281. </xs:complexType>
  282. <!--
  283. *******************************************************
  284. * <PARAM> This tag is used to define a parameter for a command.
  285. *
  286. * name - a textual name for this parameter.
  287. *
  288. * help - a textual string which describes the purpose of the
  289. * parameter.
  290. *
  291. * ptype - Reference to a PTYPE name. This parameter will be
  292. * validated against the syntax specified for that type.
  293. * The special value of "" indicates the parameter is a boolean flag.
  294. * The verbatim presence of the texual name on the command line
  295. * simply controls the conditional variable expansion for this
  296. * parameter.
  297. *
  298. * [mode] - Parameter mode. It can be "common", "switch", "subcommand", "multi".
  299. *
  300. * [prefix] - defines the prefix for an optional parameter. A prefix
  301. * with this value on the command line will signify the presence
  302. * of an additional argument which will be validated as the
  303. * value of this parameter.
  304. *
  305. * [optional] - Specify whether parameter is optional. The allowed values
  306. * is "true" or "false". It's false by default.
  307. *
  308. * [order] - Used only together with "optional=true" field.
  309. * If order="true" then user can't enter previously declared
  310. * optional parameters after current validated parameter.
  311. * The allowed values is "true" or "false". It's false by default.
  312. *
  313. * [default] - defines a default value for a parameter. Any parameters
  314. * at the end of command line which have default values need
  315. * not explicitly be entered.
  316. *
  317. * [value] - defines the user's value for subcommand. If this option
  318. * is defined the entered parameter will be compared to this
  319. * value instead the "name" field. If this field is defined
  320. * the mode of PARAM will be forced to "subcommand". The
  321. * feature is implemented to support subcommands with the
  322. * same names.
  323. *
  324. * [hidden] - define the visibility of the parameter while ${__line}
  325. * and ${__params} auto variables expanding. The allowed values
  326. * is "true" and "false".
  327. *
  328. * [test] - define the condition (see the description of 'test'
  329. * utility) to process this parameter.
  330. *
  331. * [access] - access rights
  332. *
  333. ********************************************************
  334. -->
  335. <xs:group name="param_group_t">
  336. <xs:choice>
  337. <xs:element ref="PARAM"/>
  338. <xs:element ref="ENTRY"/>
  339. </xs:choice>
  340. </xs:group>
  341. <xs:complexType name="param_t">
  342. <!-- Any order of tags and any number -->
  343. <xs:sequence>
  344. <xs:group ref="param_group_t" minOccurs="0" maxOccurs="unbounded"/>
  345. </xs:sequence>
  346. <xs:attribute name="name" type="xs:string" use="required"/>
  347. <xs:attribute name="help" type="xs:string" use="required"/>
  348. <xs:attribute name="ptype" type="xs:string" use="required"/>
  349. <xs:attribute name="mode" type="entry_mode_t" use="optional" default="sequence"/>
  350. <xs:attribute name="order" type="xs:boolean" use="optional" default="false"/>
  351. <xs:attribute name="value" type="xs:string" use="optional"/>
  352. </xs:complexType>
  353. <!--
  354. ********************************************************
  355. * <ACTION> specifies the action to be taken for
  356. * a command.
  357. *
  358. * In addition the optional 'sym' attribute can specify
  359. * the name of an internal command which will be invoked
  360. * to handle script.
  361. *
  362. * [sym="<symbol>"] - specify the name of an internally registered
  363. * function. The content of the ACTION tag is
  364. * taken as the arguments to this builtin function.
  365. *
  366. * [lock="<name>"] - Named lock. It will use special lockfile while
  367. * action execution.
  368. *
  369. * [interrupt="true/false"] - The boolean field that specify that action can be
  370. * be interrupted by Ctrl^C. Default is false. Ignored for non-interactive
  371. * actions.
  372. *
  373. * [interactive="true/false"] - Is action interactive.
  374. *
  375. * [exec_on="fail/success/always/never"] - ACTION's execution depends on
  376. * return code of previous elements of ACTION chain. If the
  377. * condition is not met then ACTION will not be executed. The "always"
  378. * value means that ACTION will be always executed and chain return
  379. * code will be ignored. Default is "success".
  380. *
  381. * [update_retcode="true/false"] - The chain return value can be updated
  382. * by current ACTION's return code or ACTION's return code can be ignored.
  383. * Default is "true".
  384. *
  385. * [permanent="true/false"] - The klish can be invoked with dry-run option. In
  386. * this case all ACTIONs will be not actually executed but will always
  387. * return success. But some actions like navigation is necessary to be
  388. * executed in any case. Permanent flag will inform engine to always
  389. * execute ACTION.
  390. *
  391. * [sync="true/false"] - Common behaviour is to fork() process before ACTION
  392. * execution. But ACTION may be executed in-place (without fork()) if sync
  393. * flag is set to true. It's not recommended to use sync ACTIONs widely.
  394. * It's usefull for small fast functions only.
  395. *
  396. ********************************************************
  397. -->
  398. <xs:simpleType name="action_cond_t">
  399. <xs:restriction base="xs:string">
  400. <xs:enumeration value="fail"/>
  401. <xs:enumeration value="success"/>
  402. <xs:enumeration value="always"/>
  403. <xs:enumeration value="never"/>
  404. </xs:restriction>
  405. </xs:simpleType>
  406. <xs:complexType name="action_t">
  407. <xs:simpleContent>
  408. <xs:extension base="xs:string">
  409. <xs:attribute name="sym" type="xs:string" use="optional"/>
  410. <xs:attribute name="lock" type="xs:string" use="optional"/>
  411. <xs:attribute name="interrupt" type="xs:boolean" use="optional" default="false"/>
  412. <xs:attribute name="interactive" type="xs:boolean" use="optional" default="false"/>
  413. <xs:attribute name="exec_on" type="action_cond_t" use="optional" default="success"/>
  414. <xs:attribute name="update_retcode" type="xs:boolean" use="optional" default="true"/>
  415. <xs:attribute name="permanent" type="xs:boolean" use="optional" default="false"/>
  416. <xs:attribute name="sync" type="xs:boolean" use="optional" default="false"/>
  417. </xs:extension>
  418. </xs:simpleContent>
  419. </xs:complexType>
  420. <!--
  421. *******************************************************
  422. * <COMMAND> is used to define a command within the CLI.
  423. *
  424. * name="<string>" - A textual name for this command. (This may contain
  425. * spaces e.g. "display acl")
  426. *
  427. * help="<string>" - Help for command.
  428. *
  429. * [view] - defines the view which will be transitioned to, on
  430. * successful execution of any <ACTION> tag. By default the
  431. * current view stays in scope.
  432. *
  433. * [viewid] - defined the new value of the ${VIEWID} variable to
  434. * be used if a transition to a new view occurs. By default
  435. * the viewid will retain it's current value.
  436. *
  437. * [access] - defines the user group/level to which execution of this
  438. * command is restricted. By default there is no restriction.
  439. * The exact interpretation of this field is dependant on the
  440. * client of libclish but for example the clish and tclish
  441. * applications map this to the UNIX user groups.
  442. *
  443. * [escape_chars] - defines the characters which will be escaped (e.g. \$) before
  444. * being expanded as a variable. By default the following
  445. * characters will be escaped `|$<>&()#
  446. *
  447. * [args] - defines a parameter name to be used to gather the rest of the
  448. * command line after the formally defined parameters
  449. * (PARAM elements). The formatting of this parameter is a raw
  450. * string containing as many words as there are on the rest of the
  451. * command line.
  452. *
  453. * [args_help] - a textual string which describes the purpose of the 'args'
  454. * parameter. If the "args" attribute is given then this MUST be
  455. * given also.
  456. *
  457. ********************************************************
  458. -->
  459. <xs:complexType name="command_t">
  460. <xs:sequence>
  461. <!-- Any order of PARAM tags and any number -->
  462. <xs:group ref="param_group_t" minOccurs="0" maxOccurs="unbounded"/>
  463. <xs:element ref="ACTION" minOccurs="0" maxOccurs="unbounded"/>
  464. <xs:element ref="COMMAND" minOccurs="0" maxOccurs="unbounded"/>
  465. </xs:sequence>
  466. <xs:attribute name="name" type="xs:string" use="required"/>
  467. <xs:attribute name="help" type="xs:string" use="required"/>
  468. <xs:attribute name="ref" type="xs:string" use="optional"/>
  469. <xs:attribute name="view" type="xs:string" use="optional"/>
  470. <xs:attribute name="viewid" type="xs:string" use="optional"/>
  471. <xs:attribute name="access" type="xs:string" use="optional"/>
  472. <xs:attribute name="args" type="xs:string" use="optional"/>
  473. <xs:attribute name="args_help" type="xs:string" use="optional"/>
  474. <xs:attribute name="escape_chars" type="xs:string" use="optional"/>
  475. </xs:complexType>
  476. <!--
  477. ********************************************************
  478. * <OVERVIEW> specifies a textual description of the shell.
  479. *
  480. * This should provide instructions about key bindings and
  481. * escape sequences which can be used in the CLI.
  482. *
  483. ********************************************************
  484. -->
  485. <xs:simpleType name="overview_t">
  486. <xs:restriction base="xs:string">
  487. <xs:whiteSpace value="preserve"/>
  488. </xs:restriction>
  489. </xs:simpleType>
  490. <!--
  491. ********************************************************
  492. * <DETAIL> specifies a textual description.
  493. *
  494. * This may be used within the scope of a <COMMAND>
  495. * element, in which case it would typically contain
  496. * detailed usage instructions including examples.
  497. *
  498. * This may also be used within the scope of a <STARTUP>
  499. * element, in which case the text is used as the banner
  500. * details which are displayed on shell startup. This is
  501. * shown before any specified <ACTION> is executed.
  502. *
  503. * This text may also be used in the production of user manuals.
  504. ********************************************************
  505. -->
  506. <xs:simpleType name="detail_t">
  507. <xs:restriction base="xs:string">
  508. <xs:whiteSpace value="preserve"/>
  509. </xs:restriction>
  510. </xs:simpleType>
  511. <!--
  512. *******************************************************
  513. * <NSPACE> import commands from specific view to current view.
  514. *
  515. * ref - the view to import commands from
  516. *
  517. * [prefix] - the prefix for imported commands
  518. *
  519. * [prefix_help] - the help for namespace prefix
  520. *
  521. * [help] - a boolean flag to use imported
  522. * commands while help
  523. *
  524. * [completion] - a boolean flag to use imported
  525. * commands while completion
  526. *
  527. * [context_help] - a boolean flag to use imported
  528. * commands while context help
  529. *
  530. * [inherit] - a boolean flag to inherit nested
  531. * namespace commands recursively
  532. *
  533. * [access] - access rights
  534. *
  535. ********************************************************
  536. -->
  537. <xs:complexType name="nspace_t">
  538. <xs:attribute name="ref" type="xs:string" use="required"/>
  539. <xs:attribute name="prefix" type="xs:string" use="optional"/>
  540. <xs:attribute name="prefix_help" type="xs:string" use="optional"/>
  541. <xs:attribute name="help" type="xs:boolean" use="optional" default="false"/>
  542. <xs:attribute name="completion" type="xs:boolean" use="optional" default="true"/>
  543. <xs:attribute name="context_help" type="xs:boolean" use="optional" default="false"/>
  544. <xs:attribute name="inherit" type="xs:boolean" use="optional" default="true"/>
  545. <xs:attribute name="access" type="xs:string" use="optional"/>
  546. </xs:complexType>
  547. <!--
  548. *******************************************************
  549. * <VAR> Specify the variable.
  550. *
  551. *
  552. *
  553. ********************************************************
  554. -->
  555. <xs:complexType name="var_t">
  556. <xs:sequence>
  557. <xs:element ref="ACTION" minOccurs="0" maxOccurs="unbounded"/>
  558. </xs:sequence>
  559. <xs:attribute name="name" type="xs:string" use="required"/>
  560. <xs:attribute name="help" type="xs:string" use="optional"/>
  561. <xs:attribute name="value" type="xs:string" use="optional"/>
  562. <xs:attribute name="dynamic" type="xs:boolean" use="optional" default="false"/>
  563. </xs:complexType>
  564. <!--
  565. *******************************************************
  566. * <WATCHDOG> is used to recover system after errors.
  567. *
  568. ********************************************************
  569. -->
  570. <xs:complexType name="wdog_t">
  571. <xs:sequence>
  572. <xs:element ref="ACTION" minOccurs="1" maxOccurs="unbounded"/>
  573. </xs:sequence>
  574. </xs:complexType>
  575. <!--
  576. *******************************************************
  577. * <HOTKEY> is used to define hotkey actions
  578. *
  579. ********************************************************
  580. -->
  581. <xs:complexType name="hotkey_t">
  582. <xs:attribute name="key" type="xs:string" use="required"/>
  583. <xs:attribute name="cmd" type="xs:string" use="required"/>
  584. </xs:complexType>
  585. <!--
  586. *******************************************************
  587. * <HOOK> is used to redefine internal hooks
  588. *
  589. * name - The name of internal hook (init, fini, access, log).
  590. *
  591. * [builtin] - specify the name of an internally registered
  592. * function.
  593. *
  594. ********************************************************
  595. -->
  596. <xs:simpleType name="hook_list_e">
  597. <xs:restriction base="xs:string">
  598. <xs:enumeration value="init"/>
  599. <xs:enumeration value="fini"/>
  600. <xs:enumeration value="access"/>
  601. <xs:enumeration value="log"/>
  602. </xs:restriction>
  603. </xs:simpleType>
  604. <xs:complexType name="hook_t">
  605. <xs:attribute name="name" type="hook_list_e"/>
  606. <xs:attribute name="builtin" type="xs:string" use="optional"/>
  607. </xs:complexType>
  608. </xs:schema>