clish.xsd 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623
  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. * [timeout] - The idle timeout. The clish will exit if user
  199. * have not press any key while this timeout.
  200. *
  201. * [lock] - The same as lock for COMMAND tag.
  202. *
  203. * [interrupt] - The same as interrupt for COMMAND tag.
  204. *
  205. * [default_plugin] - Use (or don't use) default plugin.
  206. * It can be true or false.
  207. ********************************************************
  208. -->
  209. <xs:complexType name="startup_t">
  210. <xs:sequence>
  211. <xs:element ref="DETAIL" minOccurs="0"/>
  212. <xs:element ref="ACTION" minOccurs="0"/>
  213. </xs:sequence>
  214. <xs:attribute name="view" type="xs:string" use="required"/>
  215. <xs:attribute name="viewid" type="xs:string" use="optional"/>
  216. <xs:attribute name="default_shebang" type="xs:string" use="optional"/>
  217. <xs:attribute name="timeout" type="xs:string" use="optional"/>
  218. <xs:attribute name="default_plugin" type="bool_t" use="optional" default="true"/>
  219. <!-- legacy --> <xs:attribute name="lock" type="bool_t" use="optional" default="true"/>
  220. <!-- legacy --> <xs:attribute name="interrupt" type="bool_t" use="optional" default="false"/>
  221. </xs:complexType>
  222. <!--
  223. *******************************************************
  224. * <COMMAND> is used to define a command within the CLI.
  225. *
  226. * name - a textual name for this command. (This may contain
  227. * spaces e.g. "display acl")
  228. *
  229. * help - a textual string which describes the purpose of the
  230. * command.
  231. *
  232. * [view] - defines the view which will be transitioned to, on
  233. * successful execution of any <ACTION> tag. By default the
  234. * current view stays in scope.
  235. *
  236. * [viewid] - defined the new value of the ${VIEWID} variable to
  237. * be used if a transition to a new view occurs. By default
  238. * the viewid will retain it's current value.
  239. *
  240. * [access] - defines the user group/level to which execution of this
  241. * command is restricted. By default there is no restriction.
  242. * The exact interpretation of this field is dependant on the
  243. * client of libclish but for example the clish and tclish
  244. * applications map this to the UNIX user groups.
  245. *
  246. * [escape_chars] - defines the characters which will be escaped (e.g. \$) before
  247. * being expanded as a variable. By default the following
  248. * characters will be escaped `|$<>&()#
  249. *
  250. * [args] - defines a parameter name to be used to gather the rest of the
  251. * command line after the formally defined parameters
  252. * (PARAM elements). The formatting of this parameter is a raw
  253. * string containing as many words as there are on the rest of the
  254. * command line.
  255. *
  256. * [args_help] - a textual string which describes the purpose of the 'args'
  257. * parameter. If the "args" attribute is given then this MUST be
  258. * given also.
  259. *
  260. * [lock] - !legacy! the boolean field that specify to lock lockfile while
  261. * command execution or not. Default is true. Will be used in a case
  262. * when klish was built with LEGACY macro. The attribute is moved
  263. to ACTION tag.
  264. *
  265. * [interrupt] - !legacy! the boolean field that specify that action can be
  266. * be interrupted by Ctrl^C. Will be used in a case
  267. * when klish was built with LEGACY macro. The attribute is moved
  268. * to ACTION tag.
  269. *
  270. ********************************************************
  271. -->
  272. <xs:complexType name="command_t">
  273. <xs:sequence>
  274. <xs:element ref="DETAIL" minOccurs="0"/>
  275. <xs:element ref="PARAM" minOccurs="0" maxOccurs="unbounded"/>
  276. <xs:element ref="CONFIG" minOccurs="0"/>
  277. <xs:element ref="ACTION" minOccurs="0"/>
  278. </xs:sequence>
  279. <xs:attributeGroup ref="menu_item_g"/>
  280. <xs:attribute name="ref" type="xs:string" use="optional"/>
  281. <xs:attribute name="view" type="xs:string" use="optional"/>
  282. <xs:attribute name="viewid" type="xs:string" use="optional"/>
  283. <xs:attribute name="access" type="xs:string" use="optional"/>
  284. <xs:attribute name="args" type="xs:string" use="optional"/>
  285. <xs:attribute name="args_help" type="xs:string" use="optional"/>
  286. <xs:attribute name="escape_chars" type="xs:string" use="optional"/>
  287. <!-- legacy --> <xs:attribute name="lock" type="bool_t" use="optional" default="true"/>
  288. <!-- legacy --> <xs:attribute name="interrupt" type="bool_t" use="optional" default="false"/>
  289. </xs:complexType>
  290. <!--
  291. *******************************************************
  292. * <PARAM> This tag is used to define a parameter for a command.
  293. *
  294. * name - a textual name for this parameter.
  295. *
  296. * help - a textual string which describes the purpose of the
  297. * parameter.
  298. *
  299. * ptype - Reference to a PTYPE name. This parameter will be
  300. * validated against the syntax specified for that type.
  301. * The special value of "" indicates the parameter is a boolean flag.
  302. * The verbatim presence of the texual name on the command line
  303. * simply controls the conditional variable expansion for this
  304. * parameter.
  305. *
  306. * [mode] - Parameter mode. It can be "common", "switch" or "subcommand".
  307. *
  308. * [prefix] - defines the prefix for an optional parameter. A prefix
  309. * with this value on the command line will signify the presence
  310. * of an additional argument which will be validated as the
  311. * value of this parameter.
  312. *
  313. * [optional] - Specify whether parameter is optional. The allowed values
  314. * is "true" or "false". It's false by default.
  315. *
  316. * [order] - Used only together with "optional=true" field.
  317. * If order="true" then user can't enter previously declared
  318. * optional parameters after current validated parameter.
  319. * The allowed values is "true" or "false". It's false by default.
  320. *
  321. * [default] - defines a default value for a parameter. Any parameters
  322. * at the end of command line which have default values need
  323. * not explicitly be entered.
  324. *
  325. * [value] - defines the user's value for subcommand. If this option
  326. * is defined the entered parameter will be compared to this
  327. * value instead the "name" field. If this field is defined
  328. * the mode of PARAM will be forced to "subcommand". The
  329. * feature is implemented to support subcommands with the
  330. * same names.
  331. *
  332. * [hidden] - define the visibility of the parameter while ${__line}
  333. * and ${__params} auto variables expanding. The allowed values
  334. * is "true" and "false".
  335. *
  336. * [test] - define the condition (see the description of 'test'
  337. * utility) to process this parameter.
  338. *
  339. * [access] - access rights
  340. *
  341. ********************************************************
  342. -->
  343. <xs:simpleType name="param_mode_t">
  344. <xs:restriction base="xs:string">
  345. <xs:enumeration value="common"/>
  346. <xs:enumeration value="switch"/>
  347. <xs:enumeration value="subcommand"/>
  348. </xs:restriction>
  349. </xs:simpleType>
  350. <xs:complexType name="param_t">
  351. <xs:sequence>
  352. <xs:element ref="PARAM" minOccurs="0" maxOccurs="unbounded"/>
  353. </xs:sequence>
  354. <xs:attributeGroup ref="menu_item_g"/>
  355. <xs:attribute name="ptype" type="xs:string" use="required"/>
  356. <xs:attribute name="default" type="xs:string" use="optional"/>
  357. <xs:attribute name="prefix" type="xs:string" use="optional"/>
  358. <xs:attribute name="mode" type="param_mode_t" use="optional" default="common"/>
  359. <xs:attribute name="optional" type="bool_t" use="optional" default="false"/>
  360. <xs:attribute name="order" type="bool_t" use="optional" default="false"/>
  361. <xs:attribute name="value" type="xs:string" use="optional"/>
  362. <xs:attribute name="hidden" type="bool_t" use="optional" default="false"/>
  363. <xs:attribute name="test" type="xs:string" use="optional"/>
  364. <xs:attribute name="completion" type="xs:string" use="optional"/>
  365. <xs:attribute name="access" type="xs:string" use="optional"/>
  366. </xs:complexType>
  367. <!--
  368. ********************************************************
  369. * <ACTION> specifies the action to be taken for
  370. * a command.
  371. *
  372. * The textual contents of the tag are variable expanded
  373. * (environment, dynamic and parameter) the the resulting
  374. * text is interpreted by the client's script interpreter.
  375. *
  376. * In addition the optional 'builtin' attribute can specify
  377. * the name of an internal command which will be invoked
  378. * instead of the client's script handler.
  379. *
  380. * NB. for security reasons any special shell characters
  381. * (e.g. $|<>`) are escaped before evaluation.
  382. *
  383. * [builtin] - specify the name of an internally registered
  384. * function. The content of the ACTION tag is
  385. * taken as the arguments to this builtin function.
  386. *
  387. * [shebang] - specify the programm to execute the action
  388. * script.
  389. *
  390. * [lock="true/false"] - the boolean field that specify to lock lockfile while
  391. * action execution or not. Default is true. In a case the
  392. * LEGACY macro is specified while klish building the
  393. * value of this field is inherited from COMMAND tag (if
  394. * lock is not specified in ACTION).
  395. *
  396. * [interrupt="true/false"] - the boolean field that specify that action can be
  397. * be interrupted by Ctrl^C. Default is false. In a case the
  398. * LEGACY macro is specified while klish building the
  399. * value of this field is inherited from COMMAND tag (if
  400. * attr is not specified in ACTION).
  401. *
  402. * [interactive="true/false"] - specify is action interactive. The
  403. * interactive ACTIONs can't be used with piped ("|") output.
  404. *
  405. ********************************************************
  406. -->
  407. <xs:complexType name="action_t">
  408. <xs:simpleContent>
  409. <xs:extension base="xs:string">
  410. <xs:attribute name="builtin" type="xs:string" use="optional"/>
  411. <xs:attribute name="shebang" type="xs:string" use="optional"/>
  412. <xs:attribute name="lock" type="bool_t" use="optional" default="true"/>
  413. <xs:attribute name="interrupt" type="bool_t" use="optional" default="false"/>
  414. <xs:attribute name="interactive" type="bool_t" use="optional" default="false"/>
  415. </xs:extension>
  416. </xs:simpleContent>
  417. </xs:complexType>
  418. <!--
  419. ********************************************************
  420. * <OVERVIEW> specifies a textual description of the shell.
  421. *
  422. * This should provide instructions about key bindings and
  423. * escape sequences which can be used in the CLI.
  424. *
  425. ********************************************************
  426. -->
  427. <xs:simpleType name="overview_t">
  428. <xs:restriction base="xs:string">
  429. <xs:whiteSpace value="preserve"/>
  430. </xs:restriction>
  431. </xs:simpleType>
  432. <!--
  433. ********************************************************
  434. * <DETAIL> specifies a textual description.
  435. *
  436. * This may be used within the scope of a <COMMAND>
  437. * element, in which case it would typically contain
  438. * detailed usage instructions including examples.
  439. *
  440. * This may also be used within the scope of a <STARTUP>
  441. * element, in which case the text is used as the banner
  442. * details which are displayed on shell startup. This is
  443. * shown before any specified <ACTION> is executed.
  444. *
  445. * This text may also be used in the production of user manuals.
  446. ********************************************************
  447. -->
  448. <xs:simpleType name="detail_t">
  449. <xs:restriction base="xs:string">
  450. <xs:whiteSpace value="preserve"/>
  451. </xs:restriction>
  452. </xs:simpleType>
  453. <!--
  454. *******************************************************
  455. * <NAMESPACE> import commands from specific view to current view.
  456. *
  457. * ref - the view to import commands from
  458. *
  459. * [prefix] - the prefix for imported commands
  460. *
  461. * [prefix_help] - the help for namespace prefix
  462. *
  463. * [help] - a boolean flag to use imported
  464. * commands while help
  465. *
  466. * [completion] - a boolean flag to use imported
  467. * commands while completion
  468. *
  469. * [context_help] - a boolean flag to use imported
  470. * commands while context help
  471. *
  472. * [inherit] - a boolean flag to inherit nested
  473. * namespace commands recursively
  474. *
  475. * [access] - access rights
  476. *
  477. ********************************************************
  478. -->
  479. <xs:complexType name="namespace_t">
  480. <xs:attribute name="ref" type="xs:string" use="required"/>
  481. <xs:attribute name="prefix" type="xs:string" use="optional"/>
  482. <xs:attribute name="prefix_help" type="xs:string" use="optional"/>
  483. <xs:attribute name="help" type="bool_t" use="optional" default="false"/>
  484. <xs:attribute name="completion" type="bool_t" use="optional" default="true"/>
  485. <xs:attribute name="context_help" type="bool_t" use="optional" default="false"/>
  486. <xs:attribute name="inherit" type="bool_t" use="optional" default="true"/>
  487. <xs:attribute name="access" type="xs:string" use="optional"/>
  488. </xs:complexType>
  489. <!--
  490. *******************************************************
  491. * <CONFIG> Specify the config operation.
  492. *
  493. * operation - config operation to perform
  494. *
  495. ********************************************************
  496. -->
  497. <xs:simpleType name="operation_t">
  498. <xs:restriction base="xs:string">
  499. <xs:enumeration value="none"/>
  500. <xs:enumeration value="set"/>
  501. <xs:enumeration value="unset"/>
  502. <xs:enumeration value="dump"/>
  503. </xs:restriction>
  504. </xs:simpleType>
  505. <xs:complexType name="config_t">
  506. <xs:attribute name="operation" type="operation_t" use="optional" default="set"/>
  507. <xs:attribute name="priority" type="xs:string" use="optional" default="0x7f00"/>
  508. <xs:attribute name="pattern" type="xs:string" use="optional" default="^${__cmd}"/>
  509. <xs:attribute name="file" type="xs:string" use="optional" default="startup-config"/>
  510. <xs:attribute name="splitter" type="bool_t" use="optional" default="true"/>
  511. <xs:attribute name="sequence" type="xs:string" use="optional" default="0"/>
  512. <xs:attribute name="unique" type="bool_t" use="optional" default="true"/>
  513. <xs:attribute name="depth" type="xs:string" use="optional"/>
  514. </xs:complexType>
  515. <!--
  516. *******************************************************
  517. * <VAR> Specify the variable.
  518. *
  519. *
  520. *
  521. ********************************************************
  522. -->
  523. <xs:complexType name="var_t">
  524. <xs:sequence>
  525. <xs:element ref="ACTION" minOccurs="0"/>
  526. </xs:sequence>
  527. <xs:attribute name="name" type="xs:string" use="required"/>
  528. <xs:attribute name="help" type="xs:string" use="optional"/>
  529. <xs:attribute name="value" type="xs:string" use="optional"/>
  530. <xs:attribute name="dynamic" type="bool_t" use="optional" default="false"/>
  531. </xs:complexType>
  532. <!--
  533. *******************************************************
  534. * <WATCHDOG> is used to recover system after errors.
  535. *
  536. ********************************************************
  537. -->
  538. <xs:complexType name="wdog_t">
  539. <xs:sequence>
  540. <xs:element ref="ACTION" minOccurs="1"/>
  541. </xs:sequence>
  542. </xs:complexType>
  543. <!--
  544. *******************************************************
  545. * <HOTKEY> is used to define hotkey actions
  546. *
  547. ********************************************************
  548. -->
  549. <xs:complexType name="hotkey_t">
  550. <xs:attribute name="key" type="xs:string" use="required"/>
  551. <xs:attribute name="cmd" type="xs:string" use="required"/>
  552. </xs:complexType>
  553. <!--
  554. *******************************************************
  555. * <PLUGIN> is used to dynamically load plugins
  556. *
  557. * [rtld_global] - A boolean RTLD_GLOBAL flag for dlopen()
  558. * while plugin loading. Default is "false".
  559. *
  560. ********************************************************
  561. -->
  562. <xs:complexType name="plugin_t">
  563. <xs:simpleContent>
  564. <xs:extension base="xs:string">
  565. <xs:attribute name="name" type="xs:string" use="required"/>
  566. <xs:attribute name="alias" type="xs:string" use="optional"/>
  567. <xs:attribute name="file" type="xs:string" use="optional"/>
  568. <xs:attribute name="rtld_global" type="bool_t" use="optional" default="false"/>
  569. </xs:extension>
  570. </xs:simpleContent>
  571. </xs:complexType>
  572. <!--
  573. *******************************************************
  574. * <HOOK> is used to redefine internal hooks
  575. *
  576. * name - The name of internal hook (init, fini, access, config, log).
  577. *
  578. * [builtin] - specify the name of an internally registered
  579. * function.
  580. *
  581. ********************************************************
  582. -->
  583. <xs:simpleType name="hook_list_e">
  584. <xs:restriction base="xs:string">
  585. <xs:enumeration value="init"/>
  586. <xs:enumeration value="fini"/>
  587. <xs:enumeration value="access"/>
  588. <xs:enumeration value="config"/>
  589. <xs:enumeration value="log"/>
  590. </xs:restriction>
  591. </xs:simpleType>
  592. <xs:complexType name="hook_t">
  593. <xs:attribute name="name" type="hook_list_e"/>
  594. <xs:attribute name="builtin" type="xs:string" use="optional"/>
  595. </xs:complexType>
  596. </xs:schema>