1
0

clish.xsd 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. <?xml version="1.0"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://clish.sourceforge.net/XMLSchema" targetNamespace="http://clish.sourceforge.net/XMLSchema">
  3. <!--
  4. ***********************************************************
  5. * Forward declare the main element identifiers
  6. ***********************************************************
  7. -->
  8. <xs:element name="CLISH_MODULE" type="clish_module_t"/>
  9. <xs:element name="VIEW" type="view_t"/>
  10. <xs:element name="COMMAND" type="command_t"/>
  11. <xs:element name="FILTER" type="command_t"/>
  12. <xs:element name="STARTUP" type="startup_t"/>
  13. <xs:element name="ACTION" type="action_t"/>
  14. <xs:element name="OVERVIEW" type="overview_t"/>
  15. <xs:element name="DETAIL" type="detail_t"/>
  16. <xs:element name="PTYPE" type="ptype_t"/>
  17. <xs:element name="PARAM" type="param_t"/>
  18. <xs:element name="NAMESPACE" type="namespace_t"/>
  19. <xs:element name="CONFIG" type="config_t"/>
  20. <xs:element name="VAR" type="var_t"/>
  21. <xs:element name="WATCHDOG" type="wdog_t"/>
  22. <xs:element name="HOTKEY" type="hotkey_t"/>
  23. <xs:element name="PLUGIN" type="plugin_t"/>
  24. <xs:element name="HOOK" type="hook_t"/>
  25. <!--
  26. ***********************************************************
  27. * The common simple types
  28. ***********************************************************
  29. -->
  30. <xs:simpleType name="bool_t">
  31. <xs:restriction base="xs:string">
  32. <xs:enumeration value="true"/>
  33. <xs:enumeration value="false"/>
  34. </xs:restriction>
  35. </xs:simpleType>
  36. <!--
  37. ***********************************************************
  38. * <CLISH_MODULE> is the top level container.
  39. * Any commands which are defined within this tag are global in scope
  40. * i.e. they are visible from all views.
  41. ***********************************************************
  42. -->
  43. <xs:complexType name="clish_module_t">
  44. <xs:sequence>
  45. <xs:element ref="OVERVIEW" minOccurs="0"/>
  46. <xs:element ref="STARTUP" minOccurs="0"/>
  47. <xs:element ref="PTYPE" minOccurs="0" maxOccurs="unbounded"/>
  48. <xs:element ref="COMMAND" minOccurs="0" maxOccurs="unbounded"/>
  49. <xs:element ref="VIEW" minOccurs="0" maxOccurs="unbounded"/>
  50. <xs:element ref="NAMESPACE" minOccurs="0" maxOccurs="unbounded"/>
  51. <xs:element ref="VAR" minOccurs="0" maxOccurs="unbounded"/>
  52. <xs:element ref="WATCHDOG" minOccurs="0" maxOccurs="1"/>
  53. <xs:element ref="HOTKEY" minOccurs="0" maxOccurs="unbounded"/>
  54. <xs:element ref="PLUGIN" minOccurs="0" maxOccurs="unbounded"/>
  55. <xs:element ref="HOOK" minOccurs="0" maxOccurs="unbounded"/>
  56. </xs:sequence>
  57. </xs:complexType>
  58. <!--
  59. ***********************************************************
  60. * Identify some attribute groups
  61. ***********************************************************
  62. -->
  63. <xs:attributeGroup name="menu_item_g">
  64. <xs:attribute name="name" type="xs:string" use="required"/>
  65. <xs:attribute name="help" type="xs:string" use="required"/>
  66. </xs:attributeGroup>
  67. <!--
  68. *******************************************************
  69. * <PTYPE> is used to define the syntax for a parameter type.
  70. *
  71. * name - a textual name for this type. This name can be used to
  72. * reference this type within a <PARAM? ptype attribute.
  73. *
  74. * help - a textual string which describes the syntax of this type.
  75. * When a parameter is filled out incorrectly on the CLI, this
  76. * text will be used to prompt the user to fill out the value
  77. * correctly.
  78. *
  79. * pattern - A regular expression which defines the syntax of the type.
  80. *
  81. * method - The means by which the pattern is interpreted.
  82. *
  83. * regexp [default] - A POSIX regular expression.
  84. *
  85. * integer - A numeric definition "min..max"
  86. *
  87. * select - A list of possible values.
  88. * The syntax of the string is of the form:
  89. * "valueOne(ONE) valueTwo(TWO) valueThree(THREE)"
  90. * where the text before the parethesis defines the syntax
  91. * that the user must use, and the value within the parenthesis
  92. * is the result expanded as a parameter value.
  93. *
  94. * code - The PTYPE check is handled by user-defined code.
  95. * The code can be defined by builtin func or ACTION.
  96. *
  97. * preprocess - An optional directive to process the value entered before
  98. * validating it. This can greatly simplify the regular expressions
  99. * needed to match case insensitive values.
  100. *
  101. * none [default] - do nothing
  102. *
  103. * toupper - before validation convert to uppercase.
  104. *
  105. * tolower - before validation convert to lowercase.
  106. *
  107. * completion - An optional field to define PTYPE completion. You can consider
  108. * it as a default completion for the PARAM that uses this PTYPE. If PARAM
  109. * has its own completion then PARAM's completion will be used. Else the
  110. * PTYPE's completion will be used for PARAM.
  111. *
  112. ********************************************************
  113. -->
  114. <xs:simpleType name="ptype_method_e">
  115. <xs:restriction base="xs:string">
  116. <xs:enumeration value="regexp"/>
  117. <xs:enumeration value="integer"/>
  118. <xs:enumeration value="unsignedInteger"/>
  119. <xs:enumeration value="select"/>
  120. <xs:enumeration value="choice"/>
  121. <xs:enumeration value="subcommand"/>
  122. <xs:enumeration value="code"/>
  123. </xs:restriction>
  124. </xs:simpleType>
  125. <xs:simpleType name="ptype_preprocess_e">
  126. <xs:restriction base="xs:string">
  127. <xs:enumeration value="none"/>
  128. <xs:enumeration value="toupper"/>
  129. <xs:enumeration value="tolower"/>
  130. </xs:restriction>
  131. </xs:simpleType>
  132. <xs:complexType name="ptype_t">
  133. <xs:sequence>
  134. <xs:element ref="ACTION" minOccurs="0"/>
  135. </xs:sequence>
  136. <xs:attributeGroup ref="menu_item_g"/>
  137. <xs:attribute name="pattern" type="xs:string"/>
  138. <xs:attribute name="method" type="ptype_method_e" use="optional" default="regexp"/>
  139. <xs:attribute name="preprocess" type="ptype_preprocess_e" use="optional" default="none"/>
  140. <xs:attribute name="completion" type="xs:string" use="optional"/>
  141. </xs:complexType>
  142. <!--
  143. *******************************************************
  144. * <VIEW> defines the contents of a specific CLI view.
  145. *
  146. * name - a textual name for the view
  147. *
  148. * prompt - a textual definition of the prompt to be
  149. * used whilst in this view.
  150. * NB. The prompt may contain environment
  151. * or dynamic variables which are expanded
  152. * before display.
  153. *
  154. * [depth] - a depth of nested view (uses for config).
  155. *
  156. * [restore] - restore the depth or view of commands
  157. * contained by this view
  158. *
  159. * [access] - access rights
  160. *
  161. ********************************************************
  162. -->
  163. <xs:simpleType name="restore_t">
  164. <xs:restriction base="xs:string">
  165. <xs:enumeration value="none"/>
  166. <xs:enumeration value="depth"/>
  167. <xs:enumeration value="view"/>
  168. </xs:restriction>
  169. </xs:simpleType>
  170. <xs:complexType name="view_t">
  171. <xs:sequence>
  172. <xs:element ref="NAMESPACE" minOccurs="0" maxOccurs="unbounded"/>
  173. <xs:element ref="COMMAND" minOccurs="0" maxOccurs="unbounded"/>
  174. <xs:element ref="HOTKEY" minOccurs="0" maxOccurs="unbounded"/>
  175. </xs:sequence>
  176. <xs:attribute name="name" type="xs:string" use="required"/>
  177. <xs:attribute name="prompt" type="xs:string" use="optional"/>
  178. <xs:attribute name="depth" type="xs:string" use="optional" default="0"/>
  179. <xs:attribute name="restore" type="restore_t" use="optional" default="none"/>
  180. <xs:attribute name="access" type="xs:string" use="optional"/>
  181. </xs:complexType>
  182. <!--
  183. *******************************************************
  184. * <STARTUP> is used to define what happens when the CLI
  185. * is started. Any text held in a <DETAIL> sub-element will
  186. * be used as banner text, then any defined <ACTION> will be
  187. * executed. This action may provide Message Of The Day (MOTD)
  188. * type behaviour.
  189. *
  190. * view - defines the view which will be transitioned to, on
  191. * successful execution of any <ACTION> tag.
  192. *
  193. * [viewid] - defined the new value of the ${VIEWID} variable to
  194. * be used if a transition to a new view occurs.
  195. *
  196. * [default_shebang] - The default shebang for all commands.
  197. *
  198. * [default_expand] - Expand variables in actions by default.
  199. *
  200. * [timeout] - The idle timeout. The clish will exit if user
  201. * have not press any key while this timeout.
  202. *
  203. * [lock] - The same as lock for COMMAND tag.
  204. *
  205. * [interrupt] - The same as interrupt for COMMAND tag.
  206. *
  207. * [default_plugin] - Use (or don't use) default plugin.
  208. * It can be true or false.
  209. ********************************************************
  210. -->
  211. <xs:complexType name="startup_t">
  212. <xs:sequence>
  213. <xs:element ref="DETAIL" minOccurs="0"/>
  214. <xs:element ref="ACTION" minOccurs="0"/>
  215. </xs:sequence>
  216. <xs:attribute name="view" type="xs:string" use="required"/>
  217. <xs:attribute name="viewid" type="xs:string" use="optional"/>
  218. <xs:attribute name="default_shebang" type="xs:string" use="optional"/>
  219. <xs:attribute name="default_expand" type="xs:string" use="optional"/>
  220. <xs:attribute name="timeout" type="xs:string" use="optional"/>
  221. <xs:attribute name="default_plugin" type="bool_t" use="optional" default="true"/>
  222. <!-- legacy --> <xs:attribute name="lock" type="bool_t" use="optional" default="true"/>
  223. <!-- legacy --> <xs:attribute name="interrupt" type="bool_t" use="optional" default="false"/>
  224. </xs:complexType>
  225. <!--
  226. *******************************************************
  227. * <COMMAND> is used to define a command within the CLI.
  228. *
  229. * name - a textual name for this command. (This may contain
  230. * spaces e.g. "display acl")
  231. *
  232. * help - a textual string which describes the purpose of the
  233. * command.
  234. *
  235. * [view] - defines the view which will be transitioned to, on
  236. * successful execution of any <ACTION> tag. By default the
  237. * current view stays in scope.
  238. *
  239. * [viewid] - defined the new value of the ${VIEWID} variable to
  240. * be used if a transition to a new view occurs. By default
  241. * the viewid will retain it's current value.
  242. *
  243. * [access] - defines the user group/level to which execution of this
  244. * command is restricted. By default there is no restriction.
  245. * The exact interpretation of this field is dependant on the
  246. * client of libclish but for example the clish and tclish
  247. * applications map this to the UNIX user groups.
  248. *
  249. * [escape_chars] - defines the characters which will be escaped (e.g. \$) before
  250. * being expanded as a variable. By default the following
  251. * characters will be escaped `|$<>&()#
  252. *
  253. * [args] - defines a parameter name to be used to gather the rest of the
  254. * command line after the formally defined parameters
  255. * (PARAM elements). The formatting of this parameter is a raw
  256. * string containing as many words as there are on the rest of the
  257. * command line.
  258. *
  259. * [args_help] - a textual string which describes the purpose of the 'args'
  260. * parameter. If the "args" attribute is given then this MUST be
  261. * given also.
  262. *
  263. * [lock] - !legacy! the boolean field that specify to lock lockfile while
  264. * command execution or not. Default is true. Will be used in a case
  265. * when klish was built with LEGACY macro. The attribute is moved
  266. to ACTION tag.
  267. *
  268. * [interrupt] - !legacy! the boolean field that specify that action can be
  269. * be interrupted by Ctrl^C. Will be used in a case
  270. * when klish was built with LEGACY macro. The attribute is moved
  271. * to ACTION tag.
  272. *
  273. ********************************************************
  274. -->
  275. <xs:complexType name="command_t">
  276. <xs:sequence>
  277. <xs:element ref="DETAIL" minOccurs="0"/>
  278. <xs:element ref="PARAM" minOccurs="0" maxOccurs="unbounded"/>
  279. <xs:element ref="CONFIG" minOccurs="0"/>
  280. <xs:element ref="ACTION" minOccurs="0"/>
  281. </xs:sequence>
  282. <xs:attributeGroup ref="menu_item_g"/>
  283. <xs:attribute name="ref" type="xs:string" use="optional"/>
  284. <xs:attribute name="view" type="xs:string" use="optional"/>
  285. <xs:attribute name="viewid" type="xs:string" use="optional"/>
  286. <xs:attribute name="access" type="xs:string" use="optional"/>
  287. <xs:attribute name="args" type="xs:string" use="optional"/>
  288. <xs:attribute name="args_help" type="xs:string" use="optional"/>
  289. <xs:attribute name="escape_chars" type="xs:string" use="optional"/>
  290. <!-- legacy --> <xs:attribute name="lock" type="bool_t" use="optional" default="true"/>
  291. <!-- legacy --> <xs:attribute name="interrupt" type="bool_t" use="optional" default="false"/>
  292. </xs:complexType>
  293. <!--
  294. *******************************************************
  295. * <PARAM> This tag is used to define a parameter for a command.
  296. *
  297. * name - a textual name for this parameter.
  298. *
  299. * help - a textual string which describes the purpose of the
  300. * parameter.
  301. *
  302. * ptype - Reference to a PTYPE name. This parameter will be
  303. * validated against the syntax specified for that type.
  304. * The special value of "" indicates the parameter is a boolean flag.
  305. * The verbatim presence of the texual name on the command line
  306. * simply controls the conditional variable expansion for this
  307. * parameter.
  308. *
  309. * [mode] - Parameter mode. It can be "common", "switch" or "subcommand".
  310. *
  311. * [prefix] - defines the prefix for an optional parameter. A prefix
  312. * with this value on the command line will signify the presence
  313. * of an additional argument which will be validated as the
  314. * value of this parameter.
  315. *
  316. * [optional] - Specify whether parameter is optional. The allowed values
  317. * is "true" or "false". It's false by default.
  318. *
  319. * [order] - Used only together with "optional=true" field.
  320. * If order="true" then user can't enter previously declared
  321. * optional parameters after current validated parameter.
  322. * The allowed values is "true" or "false". It's false by default.
  323. *
  324. * [default] - defines a default value for a parameter. Any parameters
  325. * at the end of command line which have default values need
  326. * not explicitly be entered.
  327. *
  328. * [value] - defines the user's value for subcommand. If this option
  329. * is defined the entered parameter will be compared to this
  330. * value instead the "name" field. If this field is defined
  331. * the mode of PARAM will be forced to "subcommand". The
  332. * feature is implemented to support subcommands with the
  333. * same names.
  334. *
  335. * [hidden] - define the visibility of the parameter while ${__line}
  336. * and ${__params} auto variables expanding. The allowed values
  337. * is "true" and "false".
  338. *
  339. * [test] - define the condition (see the description of 'test'
  340. * utility) to process this parameter.
  341. *
  342. * [access] - access rights
  343. *
  344. ********************************************************
  345. -->
  346. <xs:simpleType name="param_mode_t">
  347. <xs:restriction base="xs:string">
  348. <xs:enumeration value="common"/>
  349. <xs:enumeration value="switch"/>
  350. <xs:enumeration value="subcommand"/>
  351. </xs:restriction>
  352. </xs:simpleType>
  353. <xs:complexType name="param_t">
  354. <xs:sequence>
  355. <xs:element ref="PARAM" minOccurs="0" maxOccurs="unbounded"/>
  356. </xs:sequence>
  357. <xs:attributeGroup ref="menu_item_g"/>
  358. <xs:attribute name="ptype" type="xs:string" use="required"/>
  359. <xs:attribute name="default" type="xs:string" use="optional"/>
  360. <xs:attribute name="prefix" type="xs:string" use="optional"/>
  361. <xs:attribute name="mode" type="param_mode_t" use="optional" default="common"/>
  362. <xs:attribute name="optional" type="bool_t" use="optional" default="false"/>
  363. <xs:attribute name="order" type="bool_t" use="optional" default="false"/>
  364. <xs:attribute name="value" type="xs:string" use="optional"/>
  365. <xs:attribute name="hidden" type="bool_t" use="optional" default="false"/>
  366. <xs:attribute name="test" type="xs:string" use="optional"/>
  367. <xs:attribute name="completion" type="xs:string" use="optional"/>
  368. <xs:attribute name="access" type="xs:string" use="optional"/>
  369. </xs:complexType>
  370. <!--
  371. ********************************************************
  372. * <ACTION> specifies the action to be taken for
  373. * a command.
  374. *
  375. * The textual contents of the tag are variable expanded
  376. * (environment, dynamic and parameter) the the resulting
  377. * text is interpreted by the client's script interpreter.
  378. *
  379. * In addition the optional 'builtin' attribute can specify
  380. * the name of an internal command which will be invoked
  381. * instead of the client's script handler.
  382. *
  383. * NB. for security reasons any special shell characters
  384. * (e.g. $|<>`) are escaped before evaluation.
  385. *
  386. * [builtin] - specify the name of an internally registered
  387. * function. The content of the ACTION tag is
  388. * taken as the arguments to this builtin function.
  389. *
  390. * [shebang] - specify the programm to execute the action
  391. * script.
  392. *
  393. * [expand="true/false"] - specify expansion override.
  394. *
  395. * [lock="true/false"] - the boolean field that specify to lock lockfile while
  396. * action execution or not. Default is true. In a case the
  397. * LEGACY macro is specified while klish building the
  398. * value of this field is inherited from COMMAND tag (if
  399. * lock is not specified in ACTION).
  400. *
  401. * [interrupt="true/false"] - the boolean field that specify that action can be
  402. * be interrupted by Ctrl^C. Default is false. In a case the
  403. * LEGACY macro is specified while klish building the
  404. * value of this field is inherited from COMMAND tag (if
  405. * attr is not specified in ACTION).
  406. *
  407. * [interactive="true/false"] - specify is action interactive. The
  408. * interactive ACTIONs can't be used with piped ("|") output.
  409. *
  410. ********************************************************
  411. -->
  412. <xs:complexType name="action_t">
  413. <xs:simpleContent>
  414. <xs:extension base="xs:string">
  415. <xs:attribute name="builtin" type="xs:string" use="optional"/>
  416. <xs:attribute name="shebang" type="xs:string" use="optional"/>
  417. <xs:attribute name="expand" type="bool_t" use="optional"/>
  418. <xs:attribute name="lock" type="bool_t" use="optional" default="true"/>
  419. <xs:attribute name="interrupt" type="bool_t" use="optional" default="false"/>
  420. <xs:attribute name="interactive" type="bool_t" use="optional" default="false"/>
  421. </xs:extension>
  422. </xs:simpleContent>
  423. </xs:complexType>
  424. <!--
  425. ********************************************************
  426. * <OVERVIEW> specifies a textual description of the shell.
  427. *
  428. * This should provide instructions about key bindings and
  429. * escape sequences which can be used in the CLI.
  430. *
  431. ********************************************************
  432. -->
  433. <xs:simpleType name="overview_t">
  434. <xs:restriction base="xs:string">
  435. <xs:whiteSpace value="preserve"/>
  436. </xs:restriction>
  437. </xs:simpleType>
  438. <!--
  439. ********************************************************
  440. * <DETAIL> specifies a textual description.
  441. *
  442. * This may be used within the scope of a <COMMAND>
  443. * element, in which case it would typically contain
  444. * detailed usage instructions including examples.
  445. *
  446. * This may also be used within the scope of a <STARTUP>
  447. * element, in which case the text is used as the banner
  448. * details which are displayed on shell startup. This is
  449. * shown before any specified <ACTION> is executed.
  450. *
  451. * This text may also be used in the production of user manuals.
  452. ********************************************************
  453. -->
  454. <xs:simpleType name="detail_t">
  455. <xs:restriction base="xs:string">
  456. <xs:whiteSpace value="preserve"/>
  457. </xs:restriction>
  458. </xs:simpleType>
  459. <!--
  460. *******************************************************
  461. * <NAMESPACE> import commands from specific view to current view.
  462. *
  463. * ref - the view to import commands from
  464. *
  465. * [prefix] - the prefix for imported commands
  466. *
  467. * [prefix_help] - the help for namespace prefix
  468. *
  469. * [help] - a boolean flag to use imported
  470. * commands while help
  471. *
  472. * [completion] - a boolean flag to use imported
  473. * commands while completion
  474. *
  475. * [context_help] - a boolean flag to use imported
  476. * commands while context help
  477. *
  478. * [inherit] - a boolean flag to inherit nested
  479. * namespace commands recursively
  480. *
  481. * [access] - access rights
  482. *
  483. ********************************************************
  484. -->
  485. <xs:complexType name="namespace_t">
  486. <xs:attribute name="ref" type="xs:string" use="required"/>
  487. <xs:attribute name="prefix" type="xs:string" use="optional"/>
  488. <xs:attribute name="prefix_help" type="xs:string" use="optional"/>
  489. <xs:attribute name="help" type="bool_t" use="optional" default="false"/>
  490. <xs:attribute name="completion" type="bool_t" use="optional" default="true"/>
  491. <xs:attribute name="context_help" type="bool_t" use="optional" default="false"/>
  492. <xs:attribute name="inherit" type="bool_t" use="optional" default="true"/>
  493. <xs:attribute name="access" type="xs:string" use="optional"/>
  494. </xs:complexType>
  495. <!--
  496. *******************************************************
  497. * <CONFIG> Specify the config operation.
  498. *
  499. * operation - config operation to perform
  500. *
  501. ********************************************************
  502. -->
  503. <xs:simpleType name="operation_t">
  504. <xs:restriction base="xs:string">
  505. <xs:enumeration value="none"/>
  506. <xs:enumeration value="set"/>
  507. <xs:enumeration value="unset"/>
  508. <xs:enumeration value="dump"/>
  509. </xs:restriction>
  510. </xs:simpleType>
  511. <xs:complexType name="config_t">
  512. <xs:attribute name="operation" type="operation_t" use="optional" default="set"/>
  513. <xs:attribute name="priority" type="xs:string" use="optional" default="0x7f00"/>
  514. <xs:attribute name="pattern" type="xs:string" use="optional" default="^${__cmd}"/>
  515. <xs:attribute name="file" type="xs:string" use="optional" default="startup-config"/>
  516. <xs:attribute name="splitter" type="bool_t" use="optional" default="true"/>
  517. <xs:attribute name="sequence" type="xs:string" use="optional" default="0"/>
  518. <xs:attribute name="unique" type="bool_t" use="optional" default="true"/>
  519. <xs:attribute name="depth" type="xs:string" use="optional"/>
  520. </xs:complexType>
  521. <!--
  522. *******************************************************
  523. * <VAR> Specify the variable.
  524. *
  525. *
  526. *
  527. ********************************************************
  528. -->
  529. <xs:complexType name="var_t">
  530. <xs:sequence>
  531. <xs:element ref="ACTION" minOccurs="0"/>
  532. </xs:sequence>
  533. <xs:attribute name="name" type="xs:string" use="required"/>
  534. <xs:attribute name="help" type="xs:string" use="optional"/>
  535. <xs:attribute name="value" type="xs:string" use="optional"/>
  536. <xs:attribute name="dynamic" type="bool_t" use="optional" default="false"/>
  537. </xs:complexType>
  538. <!--
  539. *******************************************************
  540. * <WATCHDOG> is used to recover system after errors.
  541. *
  542. ********************************************************
  543. -->
  544. <xs:complexType name="wdog_t">
  545. <xs:sequence>
  546. <xs:element ref="ACTION" minOccurs="1"/>
  547. </xs:sequence>
  548. </xs:complexType>
  549. <!--
  550. *******************************************************
  551. * <HOTKEY> is used to define hotkey actions
  552. *
  553. ********************************************************
  554. -->
  555. <xs:complexType name="hotkey_t">
  556. <xs:attribute name="key" type="xs:string" use="required"/>
  557. <xs:attribute name="cmd" type="xs:string" use="required"/>
  558. </xs:complexType>
  559. <!--
  560. *******************************************************
  561. * <PLUGIN> is used to dynamically load plugins
  562. *
  563. * [rtld_global] - A boolean RTLD_GLOBAL flag for dlopen()
  564. * while plugin loading. Default is "false".
  565. *
  566. ********************************************************
  567. -->
  568. <xs:complexType name="plugin_t">
  569. <xs:simpleContent>
  570. <xs:extension base="xs:string">
  571. <xs:attribute name="name" type="xs:string" use="required"/>
  572. <xs:attribute name="alias" type="xs:string" use="optional"/>
  573. <xs:attribute name="file" type="xs:string" use="optional"/>
  574. <xs:attribute name="rtld_global" type="bool_t" use="optional" default="false"/>
  575. </xs:extension>
  576. </xs:simpleContent>
  577. </xs:complexType>
  578. <!--
  579. *******************************************************
  580. * <HOOK> is used to redefine internal hooks
  581. *
  582. * name - The name of internal hook (init, fini, access, config, log).
  583. *
  584. * [builtin] - specify the name of an internally registered
  585. * function.
  586. *
  587. ********************************************************
  588. -->
  589. <xs:simpleType name="hook_list_e">
  590. <xs:restriction base="xs:string">
  591. <xs:enumeration value="init"/>
  592. <xs:enumeration value="fini"/>
  593. <xs:enumeration value="access"/>
  594. <xs:enumeration value="config"/>
  595. <xs:enumeration value="log"/>
  596. </xs:restriction>
  597. </xs:simpleType>
  598. <xs:complexType name="hook_t">
  599. <xs:attribute name="name" type="hook_list_e"/>
  600. <xs:attribute name="builtin" type="xs:string" use="optional"/>
  601. </xs:complexType>
  602. </xs:schema>