clish.xsd 21 KB

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