klish.xsd 22 KB

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