klish.xsd 23 KB

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