clish.xsd 23 KB

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