You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep.xsd 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!--
  3. Copyright (c) 1999 - 2017 XMPP Standards Foundation
  4. Permission is hereby granted, free of charge, to any person obtaining a copy
  5. of this software and associated documentation files (the "Software"), to deal
  6. in the Software without restriction, including without limitation the rights
  7. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. copies of the Software, and to permit persons to whom the Software is
  9. furnished to do so, subject to the following conditions:
  10. The above copyright notice and this permission notice shall be included in
  11. all copies or substantial portions of the Software.
  12. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  13. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  14. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  15. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  16. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  17. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  18. THE SOFTWARE.
  19. -->
  20. <xs:schema
  21. xmlns:xs='http://www.w3.org/2001/XMLSchema'
  22. targetNamespace='http://www.xmpp.org/extensions'
  23. xmlns='http://www.xmpp.org/extensions'
  24. elementFormDefault='qualified'>
  25. <xs:element name='xep'>
  26. <xs:annotation>
  27. <xs:documentation>
  28. This schema defines the document format for XMPP Extension
  29. Protocols (XEPs). For further information about XEPs, visit:
  30. http://www.xmpp.org/extensions/
  31. The canonical URL for this schema is:
  32. http://www.xmpp.org/extensions/xep.xsd
  33. </xs:documentation>
  34. </xs:annotation>
  35. <xs:complexType>
  36. <xs:sequence>
  37. <xs:element ref='header'/>
  38. <xs:element ref='section1' maxOccurs='unbounded'/>
  39. </xs:sequence>
  40. </xs:complexType>
  41. </xs:element>
  42. <xs:element name='header'>
  43. <xs:complexType>
  44. <xs:sequence>
  45. <xs:element name='title' type='xs:string'/>
  46. <xs:element name='abstract' type='xs:string'/>
  47. <xs:element ref='legal'/>
  48. <xs:element name='number' type='xs:byte'/>
  49. <xs:element ref='status'/>
  50. <xs:element name='lastcall' minOccurs='0' type='xs:string'/>
  51. <xs:element name='interim' minOccurs='0' type='empty'/>
  52. <xs:element ref='type'/>
  53. <xs:element name='sig' type='xs:string'/>
  54. <xs:element name='approver' type='xs:string'/>
  55. <xs:element ref='dependencies'/>
  56. <xs:element ref='supersedes'/>
  57. <xs:element ref='supersededby'/>
  58. <xs:element name='shortname' type='xs:NCName'/>
  59. <xs:element ref='schemaloc' minOccurs='0' maxOccurs='unbounded'/>
  60. <xs:element name='registry' minOccurs='0' type='empty'/>
  61. <xs:element name='discuss' minOccurs='0' type='xs:string'/>
  62. <xs:element name='expires' minOccurs='0' type='xs:string'/>
  63. <xs:element ref='author' minOccurs='1' maxOccurs='unbounded'/>
  64. <xs:element ref='revision' minOccurs='1' maxOccurs='unbounded'/>
  65. <xs:element ref='councilnote' minOccurs='0'/>
  66. </xs:sequence>
  67. </xs:complexType>
  68. </xs:element>
  69. <xs:element name='legal'>
  70. <xs:complexType>
  71. <xs:sequence>
  72. <xs:element name='copyright' type='markup'/>
  73. <xs:element name='permissions' type='markup'/>
  74. <xs:element name='warranty' type='markup'/>
  75. <xs:element name='liability' type='markup'/>
  76. <xs:element name='conformance' type='markup'/>
  77. </xs:sequence>
  78. </xs:complexType>
  79. </xs:element>
  80. <xs:element name='status'>
  81. <xs:simpleType>
  82. <xs:restriction base='xs:NCName'>
  83. <xs:enumeration value='Active'/>
  84. <xs:enumeration value='Deferred'/>
  85. <xs:enumeration value='Deprecated'/>
  86. <xs:enumeration value='Draft'/>
  87. <xs:enumeration value='Experimental'/>
  88. <xs:enumeration value='Final'/>
  89. <xs:enumeration value='Obsolete'/>
  90. <xs:enumeration value='Proposed'/>
  91. <xs:enumeration value='ProtoXEP'/>
  92. <xs:enumeration value='Rejected'/>
  93. <xs:enumeration value='Retracted'/>
  94. </xs:restriction>
  95. </xs:simpleType>
  96. </xs:element>
  97. <xs:element name='type'>
  98. <xs:simpleType>
  99. <xs:restriction base='xs:string'>
  100. <xs:enumeration value='Historical'/>
  101. <xs:enumeration value='Humorous'/>
  102. <xs:enumeration value='Informational'/>
  103. <xs:enumeration value='Organizational'/>
  104. <xs:enumeration value='Standards Track'/>
  105. </xs:restriction>
  106. </xs:simpleType>
  107. </xs:element>
  108. <xs:element name='dependencies'>
  109. <xs:complexType>
  110. <xs:sequence minOccurs='0' maxOccurs='unbounded'>
  111. <xs:element name='spec' type='xs:string'/>
  112. </xs:sequence>
  113. </xs:complexType>
  114. </xs:element>
  115. <xs:element name='supersedes'>
  116. <xs:complexType>
  117. <xs:sequence>
  118. <xs:element name='spec' type='xs:string'/>
  119. </xs:sequence>
  120. </xs:complexType>
  121. </xs:element>
  122. <xs:element name='supersededby'>
  123. <xs:complexType>
  124. <xs:sequence>
  125. <xs:element name='spec' type='xs:string'/>
  126. </xs:sequence>
  127. </xs:complexType>
  128. </xs:element>
  129. <xs:element name='schemaloc'>
  130. <xs:complexType>
  131. <xs:sequence>
  132. <xs:element name='ns' type='xs:string' minOccurs='0'/>
  133. <xs:element name='url' type='xs:string'/>
  134. </xs:sequence>
  135. </xs:complexType>
  136. </xs:element>
  137. <xs:element name='author'>
  138. <xs:complexType>
  139. <xs:sequence>
  140. <xs:element name='firstname' type='xs:string'/>
  141. <xs:element name='surname' type='xs:string'/>
  142. <xs:element name='authornote' type='empty' minOccurs='0'/>
  143. <xs:element name='org' type='xs:string' minOccurs='0'/>
  144. <xs:element name='email' type='xs:string' minOccurs='0'/>
  145. <xs:element name='jid' type='xs:string' minOccurs='0'/>
  146. <xs:element name='uri' type='xs:string' minOccurs='0'/>
  147. </xs:sequence>
  148. </xs:complexType>
  149. </xs:element>
  150. <xs:element name='revision'>
  151. <xs:complexType>
  152. <xs:sequence>
  153. <xs:element name='version' type='xs:string'/>
  154. <xs:element name='date' type='xs:dateTime'/>
  155. <xs:element name='initials' type='xs:NCName'/>
  156. <xs:element ref='remark'/>
  157. </xs:sequence>
  158. </xs:complexType>
  159. </xs:element>
  160. <xs:element name='councilnote'>
  161. <xs:complexType>
  162. <xs:choice maxOccurs='unbounded'>
  163. <xs:element ref='code' minOccurs='0' maxOccurs='unbounded'/>
  164. <xs:element ref='div' minOccurs='0' maxOccurs='unbounded'/>
  165. <xs:element ref='dl' minOccurs='0' maxOccurs='unbounded'/>
  166. <xs:element ref='example' minOccurs='0' maxOccurs='unbounded'/>
  167. <xs:element ref='ol' minOccurs='0' maxOccurs='unbounded'/>
  168. <xs:element ref='p' minOccurs='0' maxOccurs='unbounded'/>
  169. <xs:element ref='table' minOccurs='0' maxOccurs='unbounded'/>
  170. <xs:element ref='ul' minOccurs='0' maxOccurs='unbounded'/>
  171. </xs:choice>
  172. </xs:complexType>
  173. </xs:element>
  174. <xs:element name='remark'>
  175. <xs:complexType>
  176. <xs:choice>
  177. <xs:element ref='p' minOccurs='0' maxOccurs='1'/>
  178. <xs:element ref='ul' minOccurs='0' maxOccurs='1'/>
  179. </xs:choice>
  180. </xs:complexType>
  181. </xs:element>
  182. <xs:element name='section1'>
  183. <xs:complexType>
  184. <xs:choice maxOccurs='unbounded'>
  185. <xs:element ref='code' minOccurs='0' maxOccurs='unbounded'/>
  186. <xs:element ref='div' minOccurs='0' maxOccurs='unbounded'/>
  187. <xs:element ref='dl' minOccurs='0' maxOccurs='unbounded'/>
  188. <xs:element ref='example' minOccurs='0' maxOccurs='unbounded'/>
  189. <xs:element ref='ol' minOccurs='0' maxOccurs='unbounded'/>
  190. <xs:element ref='p' minOccurs='0' maxOccurs='unbounded'/>
  191. <xs:element ref='section2' minOccurs='0' maxOccurs='unbounded'/>
  192. <xs:element ref='table' minOccurs='0' maxOccurs='unbounded'/>
  193. <xs:element ref='ul' minOccurs='0' maxOccurs='unbounded'/>
  194. </xs:choice>
  195. <xs:attribute name='topic' type='xs:string' use='required'/>
  196. <xs:attribute name='anchor' type='xs:string' use='optional'/>
  197. </xs:complexType>
  198. </xs:element>
  199. <xs:element name='section2'>
  200. <xs:complexType>
  201. <xs:choice maxOccurs='unbounded'>
  202. <xs:element ref='code' minOccurs='0' maxOccurs='unbounded'/>
  203. <xs:element ref='div' minOccurs='0' maxOccurs='unbounded'/>
  204. <xs:element ref='dl' minOccurs='0' maxOccurs='unbounded'/>
  205. <xs:element ref='example' minOccurs='0' maxOccurs='unbounded'/>
  206. <xs:element ref='ol' minOccurs='0' maxOccurs='unbounded'/>
  207. <xs:element ref='p' minOccurs='0' maxOccurs='unbounded'/>
  208. <xs:element ref='section3' minOccurs='0' maxOccurs='unbounded'/>
  209. <xs:element ref='table' minOccurs='0' maxOccurs='unbounded'/>
  210. <xs:element ref='ul' minOccurs='0' maxOccurs='unbounded'/>
  211. </xs:choice>
  212. <xs:attribute name='topic' type='xs:string' use='required'/>
  213. <xs:attribute name='anchor' type='xs:string' use='optional'/>
  214. </xs:complexType>
  215. </xs:element>
  216. <xs:element name='section3'>
  217. <xs:complexType>
  218. <xs:choice maxOccurs='unbounded'>
  219. <xs:element ref='code' minOccurs='0' maxOccurs='unbounded'/>
  220. <xs:element ref='div' minOccurs='0' maxOccurs='unbounded'/>
  221. <xs:element ref='dl' minOccurs='0' maxOccurs='unbounded'/>
  222. <xs:element ref='example' minOccurs='0' maxOccurs='unbounded'/>
  223. <xs:element ref='ol' minOccurs='0' maxOccurs='unbounded'/>
  224. <xs:element ref='p' minOccurs='0' maxOccurs='unbounded'/>
  225. <xs:element ref='section4' minOccurs='0' maxOccurs='unbounded'/>
  226. <xs:element ref='table' minOccurs='0' maxOccurs='unbounded'/>
  227. <xs:element ref='ul' minOccurs='0' maxOccurs='unbounded'/>
  228. </xs:choice>
  229. <xs:attribute name='topic' type='xs:string' use='required'/>
  230. <xs:attribute name='anchor' type='xs:string' use='optional'/>
  231. </xs:complexType>
  232. </xs:element>
  233. <xs:element name='section4'>
  234. <xs:complexType>
  235. <xs:choice maxOccurs='unbounded'>
  236. <xs:element ref='code' minOccurs='0' maxOccurs='unbounded'/>
  237. <xs:element ref='div' minOccurs='0' maxOccurs='unbounded'/>
  238. <xs:element ref='dl' minOccurs='0' maxOccurs='unbounded'/>
  239. <xs:element ref='example' minOccurs='0' maxOccurs='unbounded'/>
  240. <xs:element ref='ol' minOccurs='0' maxOccurs='unbounded'/>
  241. <xs:element ref='p' minOccurs='0' maxOccurs='unbounded'/>
  242. <xs:element ref='table' minOccurs='0' maxOccurs='unbounded'/>
  243. <xs:element ref='ul' minOccurs='0' maxOccurs='unbounded'/>
  244. </xs:choice>
  245. <xs:attribute name='topic' type='xs:string' use='required'/>
  246. <xs:attribute name='anchor' type='xs:string' use='optional'/>
  247. </xs:complexType>
  248. </xs:element>
  249. <xs:element name='div'>
  250. <xs:complexType>
  251. <xs:choice maxOccurs='unbounded'>
  252. <xs:element ref='div' minOccurs='0' maxOccurs='unbounded'/>
  253. <xs:element ref='p' minOccurs='0' maxOccurs='unbounded'/>
  254. <xs:element ref='example' minOccurs='0' maxOccurs='unbounded'/>
  255. <xs:element ref='code' minOccurs='0' maxOccurs='unbounded'/>
  256. <xs:element ref='ul' minOccurs='0' maxOccurs='unbounded'/>
  257. <xs:element ref='ol' minOccurs='0' maxOccurs='unbounded'/>
  258. </xs:choice>
  259. <xs:attribute name='class' type='xs:string' use='optional'/>
  260. <xs:attribute name='style' type='xs:string' use='optional'/>
  261. </xs:complexType>
  262. </xs:element>
  263. <xs:element name='p' type='markup'/>
  264. <xs:element name='ul'>
  265. <xs:complexType>
  266. <xs:sequence>
  267. <xs:element ref='li' minOccurs='1' maxOccurs='unbounded'/>
  268. </xs:sequence>
  269. <xs:attribute name='class' type='xs:string' use='optional'/>
  270. <xs:attribute name='style' type='xs:string' use='optional'/>
  271. </xs:complexType>
  272. </xs:element>
  273. <xs:element name='ol'>
  274. <xs:complexType>
  275. <xs:sequence>
  276. <xs:element ref='li' minOccurs='1' maxOccurs='unbounded'/>
  277. </xs:sequence>
  278. <xs:attribute name='class' type='xs:string' use='optional'/>
  279. <xs:attribute name='start' type='xs:byte' use='optional'/>
  280. <xs:attribute name='style' type='xs:string' use='optional'/>
  281. </xs:complexType>
  282. </xs:element>
  283. <xs:element name='li' type='markup'/>
  284. <xs:element name='dl'>
  285. <xs:complexType>
  286. <xs:sequence>
  287. <xs:element ref='di' minOccurs='1' maxOccurs='unbounded'/>
  288. </xs:sequence>
  289. </xs:complexType>
  290. </xs:element>
  291. <xs:element name='di'>
  292. <xs:complexType>
  293. <xs:sequence>
  294. <xs:element ref='dt' minOccurs='1' maxOccurs='1'/>
  295. <xs:element ref='dd' minOccurs='1' maxOccurs='1'/>
  296. </xs:sequence>
  297. </xs:complexType>
  298. </xs:element>
  299. <xs:element name='dt' type='xs:string'/>
  300. <xs:element name='dd' type='markup'/>
  301. <xs:element name='img'>
  302. <xs:complexType>
  303. <xs:simpleContent>
  304. <xs:extension base='empty'>
  305. <xs:attribute name='source' use='required'/>
  306. </xs:extension>
  307. </xs:simpleContent>
  308. </xs:complexType>
  309. </xs:element>
  310. <xs:element name='link'>
  311. <xs:complexType>
  312. <xs:simpleContent>
  313. <xs:extension base='xs:string'>
  314. <xs:attribute name='url' use='required'/>
  315. </xs:extension>
  316. </xs:simpleContent>
  317. </xs:complexType>
  318. </xs:element>
  319. <xs:element name='note' type='markup'/>
  320. <xs:element name='example'>
  321. <xs:complexType>
  322. <xs:simpleContent>
  323. <xs:extension base='xs:string'>
  324. <xs:attribute name='caption' use='optional'/>
  325. </xs:extension>
  326. </xs:simpleContent>
  327. </xs:complexType>
  328. </xs:element>
  329. <xs:element name='code'>
  330. <xs:complexType>
  331. <xs:simpleContent>
  332. <xs:extension base='xs:string'>
  333. <xs:attribute name='caption' use='optional'/>
  334. </xs:extension>
  335. </xs:simpleContent>
  336. </xs:complexType>
  337. </xs:element>
  338. <xs:element name='table'>
  339. <xs:complexType>
  340. <xs:sequence>
  341. <xs:element ref='tr' minOccurs='1' maxOccurs='unbounded'/>
  342. </xs:sequence>
  343. <xs:attribute name='caption' type='xs:string' use='optional'/>
  344. </xs:complexType>
  345. </xs:element>
  346. <xs:element name='tr'>
  347. <xs:complexType>
  348. <xs:choice>
  349. <xs:element ref='th' minOccurs='0' maxOccurs='unbounded'/>
  350. <xs:element ref='td' minOccurs='0' maxOccurs='unbounded'/>
  351. </xs:choice>
  352. </xs:complexType>
  353. </xs:element>
  354. <xs:element name='th'>
  355. <xs:complexType>
  356. <xs:simpleContent>
  357. <xs:extension base='xs:string'>
  358. <xs:attribute name='colspan' use='optional'/>
  359. <xs:attribute name='rowspan' use='optional'/>
  360. </xs:extension>
  361. </xs:simpleContent>
  362. </xs:complexType>
  363. </xs:element>
  364. <xs:element name='td'>
  365. <xs:complexType>
  366. <xs:simpleContent>
  367. <xs:extension base='xs:string'>
  368. <xs:attribute name='colspan' use='optional'/>
  369. <xs:attribute name='rowspan' use='optional'/>
  370. </xs:extension>
  371. </xs:simpleContent>
  372. </xs:complexType>
  373. </xs:element>
  374. <xs:complexType name='markup' mixed='true'>
  375. <xs:choice minOccurs='0' maxOccurs='unbounded'>
  376. <xs:element name='br' type='empty'/>
  377. <xs:element name='cite' type='xs:token'/>
  378. <xs:element name='dfn' type='xs:token'/>
  379. <xs:element name='em' type='xs:token'/>
  380. <xs:element ref='img'/>
  381. <xs:element ref='link'/>
  382. <xs:element ref='note'/>
  383. <xs:element name='span' type='xs:token'/>
  384. <xs:element name='strong' type='xs:token'/>
  385. <xs:element name='tt' type='xs:token'/>
  386. </xs:choice>
  387. <xs:attribute name='class' type='xs:string' use='optional'/>
  388. <xs:attribute name='style' type='xs:string' use='optional'/>
  389. </xs:complexType>
  390. <xs:simpleType name='empty'>
  391. <xs:restriction base='xs:string'>
  392. <xs:enumeration value=''/>
  393. </xs:restriction>
  394. </xs:simpleType>
  395. </xs:schema>