programming.rng 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. This file is part of DocBook V5.0
  4. Copyright 1992-2008 HaL Computer Systems, Inc.,
  5. O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
  6. Corporation, Norman Walsh, Sun Microsystems, Inc., and the
  7. Organization for the Advancement of Structured Information
  8. Standards (OASIS).
  9. Release: $Id: pool.rnc 7466 2007-09-27 14:03:55Z nwalsh $
  10. Permission to use, copy, modify and distribute the DocBook schema
  11. and its accompanying documentation for any purpose and without fee
  12. is hereby granted in perpetuity, provided that the above copyright
  13. notice and this paragraph appear in all copies. The copyright
  14. holders make no representation about the suitability of the schema
  15. for any purpose. It is provided "as is" without expressed or implied
  16. warranty.
  17. If you modify the DocBook schema in any way, label your schema as a
  18. variant of DocBook. See the reference documentation
  19. (http://docbook.org/tdg5/en/html/ch05.html#s-notdocbook)
  20. for more information.
  21. Please direct all questions, bug reports, or suggestions for changes
  22. to the docbook@lists.oasis-open.org mailing list. For more
  23. information, see http://www.oasis-open.org/docbook/.
  24. ======================================================================
  25. -->
  26. <grammar ns="http://docbook.org/ns/docbook" xmlns:db="http://docbook.org/ns/docbook" xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns:ctrl="http://nwalsh.com/xmlns/schema-control/" xmlns="http://relaxng.org/ns/structure/1.0">
  27. <start combine="choice">
  28. <choice>
  29. <ref name="db.synopsis.blocks"/>
  30. <ref name="db.funcsynopsisinfo"/>
  31. <ref name="db.classsynopsisinfo"/>
  32. </choice>
  33. </start>
  34. <define name="db.domain.inlines" combine="choice">
  35. <ref name="db.programming.inlines"/>
  36. </define>
  37. <define name="db.nopara.blocks" combine="choice">
  38. <ref name="db.synopsis.blocks"/>
  39. </define>
  40. <define name="db.cover.contentmodel" combine="choice">
  41. <ref name="db.synopsis.blocks"/>
  42. </define>
  43. <define name="db.verbatim.blocks" combine="choice">
  44. <choice>
  45. <ref name="db.programlisting"/>
  46. <ref name="db.synopsis"/>
  47. </choice>
  48. </define>
  49. <define name="db.programming.inlines">
  50. <choice>
  51. <ref name="db.function"/>
  52. <ref name="db.parameter"/>
  53. <ref name="db.varname"/>
  54. <ref name="db.returnvalue"/>
  55. <ref name="db.type"/>
  56. <ref name="db.classname"/>
  57. <ref name="db.exceptionname"/>
  58. <ref name="db.interfacename"/>
  59. <ref name="db.methodname"/>
  60. <ref name="db.modifier"/>
  61. <ref name="db.initializer"/>
  62. <ref name="db.oo.inlines"/>
  63. </choice>
  64. </define>
  65. <define name="db.oo.inlines">
  66. <choice>
  67. <ref name="db.ooclass"/>
  68. <ref name="db.ooexception"/>
  69. <ref name="db.oointerface"/>
  70. </choice>
  71. </define>
  72. <define name="db.synopsis.blocks">
  73. <choice>
  74. <ref name="db.funcsynopsis"/>
  75. <ref name="db.classsynopsis"/>
  76. <ref name="db.methodsynopsis"/>
  77. <ref name="db.constructorsynopsis"/>
  78. <ref name="db.destructorsynopsis"/>
  79. <ref name="db.fieldsynopsis"/>
  80. </choice>
  81. </define>
  82. <!-- ====================================================================== -->
  83. <div>
  84. <db:refname>synopsis</db:refname>
  85. <db:refpurpose>A general-purpose element for representing the syntax of commands or functions</db:refpurpose>
  86. <define name="db.synopsis.role.attribute">
  87. <attribute name="role"/>
  88. </define>
  89. <define name="db.synopsis.label.attribute">
  90. <ref name="db.label.attribute"/>
  91. </define>
  92. <define name="db.synopsis.attlist">
  93. <interleave>
  94. <optional>
  95. <ref name="db.synopsis.role.attribute"/>
  96. </optional>
  97. <ref name="db.common.attributes"/>
  98. <ref name="db.common.linking.attributes"/>
  99. <ref name="db.verbatim.attributes"/>
  100. <optional>
  101. <ref name="db.synopsis.label.attribute"/>
  102. </optional>
  103. </interleave>
  104. </define>
  105. <define name="db.synopsis">
  106. <element name="synopsis">
  107. <ref name="db.synopsis.attlist"/>
  108. <ref name="db.verbatim.contentmodel"/>
  109. </element>
  110. </define>
  111. </div>
  112. <!-- ====================================================================== -->
  113. <div>
  114. <db:refname>funcsynopsis</db:refname>
  115. <db:refpurpose>The syntax summary for a function definition</db:refpurpose>
  116. <define name="db.funcsynopsis.role.attribute">
  117. <attribute name="role"/>
  118. </define>
  119. <define name="db.funcsynopsis.attlist">
  120. <interleave>
  121. <optional>
  122. <ref name="db.funcsynopsis.role.attribute"/>
  123. </optional>
  124. <ref name="db.common.attributes"/>
  125. <ref name="db.common.linking.attributes"/>
  126. <optional>
  127. <ref name="db.language.attribute"/>
  128. </optional>
  129. </interleave>
  130. </define>
  131. <define name="db.funcsynopsis.info">
  132. <ref name="db._info.title.forbidden"/>
  133. </define>
  134. <define name="db.funcsynopsis">
  135. <element name="funcsynopsis">
  136. <ref name="db.funcsynopsis.attlist"/>
  137. <ref name="db.funcsynopsis.info"/>
  138. <oneOrMore>
  139. <choice>
  140. <ref name="db.funcsynopsisinfo"/>
  141. <ref name="db.funcprototype"/>
  142. </choice>
  143. </oneOrMore>
  144. </element>
  145. </define>
  146. </div>
  147. <!-- ====================================================================== -->
  148. <div>
  149. <db:refname>funcsynopsisinfo</db:refname>
  150. <db:refpurpose>Information supplementing the funcdefs of a funcsynopsis</db:refpurpose>
  151. <define name="db.funcsynopsisinfo.role.attribute">
  152. <attribute name="role"/>
  153. </define>
  154. <define name="db.funcsynopsisinfo.attlist">
  155. <interleave>
  156. <optional>
  157. <ref name="db.funcsynopsisinfo.role.attribute"/>
  158. </optional>
  159. <ref name="db.common.attributes"/>
  160. <ref name="db.common.linking.attributes"/>
  161. <ref name="db.verbatim.attributes"/>
  162. </interleave>
  163. </define>
  164. <define name="db.funcsynopsisinfo">
  165. <element name="funcsynopsisinfo">
  166. <ref name="db.funcsynopsisinfo.attlist"/>
  167. <ref name="db.verbatim.contentmodel"/>
  168. </element>
  169. </define>
  170. </div>
  171. <!-- ====================================================================== -->
  172. <div>
  173. <db:refname>funcprototype</db:refname>
  174. <db:refpurpose>The prototype of a function</db:refpurpose>
  175. <define name="db.funcprototype.role.attribute">
  176. <attribute name="role"/>
  177. </define>
  178. <define name="db.funcprototype.attlist">
  179. <interleave>
  180. <optional>
  181. <ref name="db.funcprototype.role.attribute"/>
  182. </optional>
  183. <ref name="db.common.attributes"/>
  184. <ref name="db.common.linking.attributes"/>
  185. </interleave>
  186. </define>
  187. <define name="db.funcprototype">
  188. <element name="funcprototype">
  189. <ref name="db.funcprototype.attlist"/>
  190. <zeroOrMore>
  191. <ref name="db.modifier"/>
  192. </zeroOrMore>
  193. <ref name="db.funcdef"/>
  194. <choice>
  195. <ref name="db.void"/>
  196. <ref name="db.varargs"/>
  197. <group>
  198. <oneOrMore>
  199. <choice>
  200. <ref name="db.paramdef"/>
  201. <ref name="db.group.paramdef"/>
  202. </choice>
  203. </oneOrMore>
  204. <optional>
  205. <ref name="db.varargs"/>
  206. </optional>
  207. </group>
  208. </choice>
  209. <zeroOrMore>
  210. <ref name="db.modifier"/>
  211. </zeroOrMore>
  212. </element>
  213. </define>
  214. </div>
  215. <!-- ====================================================================== -->
  216. <div>
  217. <db:refname>funcdef</db:refname>
  218. <db:refpurpose>A function (subroutine) name and its return type</db:refpurpose>
  219. <define name="db.funcdef.role.attribute">
  220. <attribute name="role"/>
  221. </define>
  222. <define name="db.funcdef.attlist">
  223. <interleave>
  224. <optional>
  225. <ref name="db.funcdef.role.attribute"/>
  226. </optional>
  227. <ref name="db.common.attributes"/>
  228. <ref name="db.common.linking.attributes"/>
  229. </interleave>
  230. </define>
  231. <define name="db.funcdef">
  232. <element name="funcdef">
  233. <ref name="db.funcdef.attlist"/>
  234. <zeroOrMore>
  235. <choice>
  236. <ref name="db._text"/>
  237. <ref name="db.type"/>
  238. <ref name="db.function"/>
  239. </choice>
  240. </zeroOrMore>
  241. </element>
  242. </define>
  243. </div>
  244. <!-- ====================================================================== -->
  245. <div>
  246. <db:refname>function</db:refname>
  247. <db:refpurpose>The name of a function or subroutine, as in a programming language</db:refpurpose>
  248. <define name="db.function.role.attribute">
  249. <attribute name="role"/>
  250. </define>
  251. <define name="db.function.attlist">
  252. <interleave>
  253. <optional>
  254. <ref name="db.function.role.attribute"/>
  255. </optional>
  256. <ref name="db.common.attributes"/>
  257. <ref name="db.common.linking.attributes"/>
  258. </interleave>
  259. </define>
  260. <define name="db.function">
  261. <element name="function">
  262. <ref name="db.function.attlist"/>
  263. <ref name="db._text"/>
  264. </element>
  265. </define>
  266. </div>
  267. <!-- ====================================================================== -->
  268. <div>
  269. <db:refname>void</db:refname>
  270. <db:refpurpose>An empty element in a function synopsis indicating that the function in question takes no arguments</db:refpurpose>
  271. <define name="db.void.role.attribute">
  272. <attribute name="role"/>
  273. </define>
  274. <define name="db.void.attlist">
  275. <interleave>
  276. <optional>
  277. <ref name="db.void.role.attribute"/>
  278. </optional>
  279. <ref name="db.common.attributes"/>
  280. <ref name="db.common.linking.attributes"/>
  281. </interleave>
  282. </define>
  283. <define name="db.void">
  284. <element name="void">
  285. <ref name="db.void.attlist"/>
  286. <empty/>
  287. </element>
  288. </define>
  289. </div>
  290. <!-- ====================================================================== -->
  291. <div>
  292. <db:refname>varargs</db:refname>
  293. <db:refpurpose>An empty element in a function synopsis indicating a variable number of arguments</db:refpurpose>
  294. <define name="db.varargs.role.attribute">
  295. <attribute name="role"/>
  296. </define>
  297. <define name="db.varargs.attlist">
  298. <interleave>
  299. <optional>
  300. <ref name="db.varargs.role.attribute"/>
  301. </optional>
  302. <ref name="db.common.attributes"/>
  303. <ref name="db.common.linking.attributes"/>
  304. </interleave>
  305. </define>
  306. <define name="db.varargs">
  307. <element name="varargs">
  308. <ref name="db.varargs.attlist"/>
  309. <empty/>
  310. </element>
  311. </define>
  312. </div>
  313. <!-- ====================================================================== -->
  314. <div>
  315. <db:refname>group</db:refname>
  316. <db:refpurpose>A group of parameters</db:refpurpose>
  317. <define name="db.group.paramdef.role.attribute">
  318. <attribute name="role"/>
  319. </define>
  320. <define name="db.group.paramdef.choice.attribute">
  321. <ref name="db.choice.opt.attribute"/>
  322. </define>
  323. <define name="db.group.paramdef.attlist">
  324. <interleave>
  325. <optional>
  326. <ref name="db.group.paramdef.role.attribute"/>
  327. </optional>
  328. <ref name="db.common.attributes"/>
  329. <ref name="db.common.linking.attributes"/>
  330. <optional>
  331. <ref name="db.group.paramdef.choice.attribute"/>
  332. </optional>
  333. </interleave>
  334. </define>
  335. <define name="db.group.paramdef">
  336. <element name="group">
  337. <ref name="db.group.paramdef.attlist"/>
  338. <oneOrMore>
  339. <choice>
  340. <ref name="db.paramdef"/>
  341. <ref name="db.group.paramdef"/>
  342. </choice>
  343. </oneOrMore>
  344. </element>
  345. </define>
  346. </div>
  347. <!-- ====================================================================== -->
  348. <div>
  349. <db:refname>paramdef</db:refname>
  350. <db:refpurpose>Information about a function parameter in a programming language</db:refpurpose>
  351. <define name="db.paramdef.role.attribute">
  352. <attribute name="role"/>
  353. </define>
  354. <define name="db.paramdef.choice.enumeration">
  355. <choice>
  356. <value>opt</value>
  357. <a:documentation>Formatted to indicate that it is optional.</a:documentation>
  358. <value>req</value>
  359. <a:documentation>Formatted to indicate that it is required.</a:documentation>
  360. </choice>
  361. </define>
  362. <define name="db.paramdef.choice.attribute">
  363. <attribute name="choice" a:defaultValue="opt">
  364. <db:refpurpose>Indicates optionality.</db:refpurpose>
  365. <ref name="db.paramdef.choice.enumeration"/>
  366. </attribute>
  367. </define>
  368. <define name="db.paramdef.attlist">
  369. <interleave>
  370. <optional>
  371. <ref name="db.paramdef.role.attribute"/>
  372. </optional>
  373. <ref name="db.common.attributes"/>
  374. <ref name="db.common.linking.attributes"/>
  375. <optional>
  376. <ref name="db.paramdef.choice.attribute"/>
  377. </optional>
  378. </interleave>
  379. </define>
  380. <define name="db.paramdef">
  381. <element name="paramdef">
  382. <ref name="db.paramdef.attlist"/>
  383. <zeroOrMore>
  384. <choice>
  385. <ref name="db._text"/>
  386. <ref name="db.initializer"/>
  387. <ref name="db.type"/>
  388. <ref name="db.parameter"/>
  389. <ref name="db.funcparams"/>
  390. </choice>
  391. </zeroOrMore>
  392. </element>
  393. </define>
  394. </div>
  395. <!-- ====================================================================== -->
  396. <div>
  397. <db:refname>funcparams</db:refname>
  398. <db:refpurpose>Parameters for a function referenced through a function pointer in a synopsis</db:refpurpose>
  399. <define name="db.funcparams.role.attribute">
  400. <attribute name="role"/>
  401. </define>
  402. <define name="db.funcparams.attlist">
  403. <interleave>
  404. <optional>
  405. <ref name="db.funcparams.role.attribute"/>
  406. </optional>
  407. <ref name="db.common.attributes"/>
  408. <ref name="db.common.linking.attributes"/>
  409. </interleave>
  410. </define>
  411. <define name="db.funcparams">
  412. <element name="funcparams">
  413. <ref name="db.funcparams.attlist"/>
  414. <ref name="db._text"/>
  415. </element>
  416. </define>
  417. </div>
  418. <!-- ====================================================================== -->
  419. <div>
  420. <db:refname>classsynopsis</db:refname>
  421. <db:refpurpose>The syntax summary for a class definition</db:refpurpose>
  422. <define name="db.classsynopsis.role.attribute">
  423. <attribute name="role"/>
  424. </define>
  425. <define name="db.classsynopsis.class.enumeration">
  426. <choice>
  427. <value>class</value>
  428. <a:documentation>This is the synopsis of a class</a:documentation>
  429. <value>interface</value>
  430. <a:documentation>This is the synopsis of an interface</a:documentation>
  431. </choice>
  432. </define>
  433. <define name="db.classsynopsis.class.attribute">
  434. <attribute name="class">
  435. <db:refpurpose>Specifies the nature of the synopsis</db:refpurpose>
  436. <ref name="db.classsynopsis.class.enumeration"/>
  437. </attribute>
  438. </define>
  439. <define name="db.classsynopsis.attlist">
  440. <interleave>
  441. <optional>
  442. <ref name="db.classsynopsis.role.attribute"/>
  443. </optional>
  444. <ref name="db.common.attributes"/>
  445. <ref name="db.common.linking.attributes"/>
  446. <optional>
  447. <ref name="db.language.attribute"/>
  448. </optional>
  449. <optional>
  450. <ref name="db.classsynopsis.class.attribute"/>
  451. </optional>
  452. </interleave>
  453. </define>
  454. <define name="db.classsynopsis">
  455. <element name="classsynopsis">
  456. <ref name="db.classsynopsis.attlist"/>
  457. <oneOrMore>
  458. <ref name="db.oo.inlines"/>
  459. </oneOrMore>
  460. <zeroOrMore>
  461. <choice>
  462. <ref name="db.classsynopsisinfo"/>
  463. <ref name="db.methodsynopsis"/>
  464. <ref name="db.constructorsynopsis"/>
  465. <ref name="db.destructorsynopsis"/>
  466. <ref name="db.fieldsynopsis"/>
  467. </choice>
  468. </zeroOrMore>
  469. </element>
  470. </define>
  471. </div>
  472. <!-- ====================================================================== -->
  473. <div>
  474. <db:refname>classsynopsisinfo</db:refname>
  475. <db:refpurpose>Information supplementing the contents of a classsynopsis</db:refpurpose>
  476. <define name="db.classsynopsisinfo.role.attribute">
  477. <attribute name="role"/>
  478. </define>
  479. <define name="db.classsynopsisinfo.attlist">
  480. <interleave>
  481. <optional>
  482. <ref name="db.classsynopsisinfo.role.attribute"/>
  483. </optional>
  484. <ref name="db.common.attributes"/>
  485. <ref name="db.common.linking.attributes"/>
  486. <ref name="db.verbatim.attributes"/>
  487. </interleave>
  488. </define>
  489. <define name="db.classsynopsisinfo">
  490. <element name="classsynopsisinfo">
  491. <ref name="db.classsynopsisinfo.attlist"/>
  492. <ref name="db.verbatim.contentmodel"/>
  493. </element>
  494. </define>
  495. </div>
  496. <!-- ====================================================================== -->
  497. <div>
  498. <db:refname>ooclass</db:refname>
  499. <db:refpurpose>A class in an object-oriented programming language</db:refpurpose>
  500. <define name="db.ooclass.role.attribute">
  501. <attribute name="role"/>
  502. </define>
  503. <define name="db.ooclass.attlist">
  504. <interleave>
  505. <optional>
  506. <ref name="db.ooclass.role.attribute"/>
  507. </optional>
  508. <ref name="db.common.attributes"/>
  509. <ref name="db.common.linking.attributes"/>
  510. </interleave>
  511. </define>
  512. <define name="db.ooclass">
  513. <element name="ooclass">
  514. <ref name="db.ooclass.attlist"/>
  515. <zeroOrMore>
  516. <choice>
  517. <ref name="db.package"/>
  518. <ref name="db.modifier"/>
  519. </choice>
  520. </zeroOrMore>
  521. <ref name="db.classname"/>
  522. </element>
  523. </define>
  524. </div>
  525. <!-- ====================================================================== -->
  526. <div>
  527. <db:refname>oointerface</db:refname>
  528. <db:refpurpose>An interface in an object-oriented programming language</db:refpurpose>
  529. <define name="db.oointerface.role.attribute">
  530. <attribute name="role"/>
  531. </define>
  532. <define name="db.oointerface.attlist">
  533. <interleave>
  534. <optional>
  535. <ref name="db.oointerface.role.attribute"/>
  536. </optional>
  537. <ref name="db.common.attributes"/>
  538. <ref name="db.common.linking.attributes"/>
  539. </interleave>
  540. </define>
  541. <define name="db.oointerface">
  542. <element name="oointerface">
  543. <ref name="db.oointerface.attlist"/>
  544. <zeroOrMore>
  545. <choice>
  546. <ref name="db.package"/>
  547. <ref name="db.modifier"/>
  548. </choice>
  549. </zeroOrMore>
  550. <ref name="db.interfacename"/>
  551. </element>
  552. </define>
  553. </div>
  554. <!-- ====================================================================== -->
  555. <div>
  556. <db:refname>ooexception</db:refname>
  557. <db:refpurpose>An exception in an object-oriented programming language</db:refpurpose>
  558. <define name="db.ooexception.role.attribute">
  559. <attribute name="role"/>
  560. </define>
  561. <define name="db.ooexception.attlist">
  562. <interleave>
  563. <optional>
  564. <ref name="db.ooexception.role.attribute"/>
  565. </optional>
  566. <ref name="db.common.attributes"/>
  567. <ref name="db.common.linking.attributes"/>
  568. </interleave>
  569. </define>
  570. <define name="db.ooexception">
  571. <element name="ooexception">
  572. <ref name="db.ooexception.attlist"/>
  573. <zeroOrMore>
  574. <choice>
  575. <ref name="db.package"/>
  576. <ref name="db.modifier"/>
  577. </choice>
  578. </zeroOrMore>
  579. <ref name="db.exceptionname"/>
  580. </element>
  581. </define>
  582. </div>
  583. <!-- ====================================================================== -->
  584. <define name="db.modifier.xml.space.attribute">
  585. <attribute name="xml:space">
  586. <db:refpurpose>Can be used to indicate that whitespace in the modifier should be preserved (for multi-line annotations, for example).</db:refpurpose>
  587. <value>preserve</value>
  588. <a:documentation>Extra whitespace and line breaks must be preserved.</a:documentation>
  589. <!--
  590. Ideally the definition of xml:space used on modifier would be
  591. different from the definition used on the verbatim elements. The
  592. verbatim elements forbid the use of xml:space="default" which
  593. wouldn't be a problem on modifier. But doing that causes the
  594. generated XSD schemas to be broken so I'm just reusing the existing
  595. definition for now. It won't be backwards incompatible to fix this
  596. problem in the future.
  597. | ## Extra whitespace and line breaks are not preserved.
  598. "default"
  599. -->
  600. </attribute>
  601. </define>
  602. <div>
  603. <db:refname>modifier</db:refname>
  604. <db:refpurpose>Modifiers in a synopsis</db:refpurpose>
  605. <define name="db.modifier.role.attribute">
  606. <attribute name="role"/>
  607. </define>
  608. <define name="db.modifier.attlist">
  609. <interleave>
  610. <optional>
  611. <ref name="db.modifier.xml.space.attribute"/>
  612. </optional>
  613. <optional>
  614. <ref name="db.modifier.role.attribute"/>
  615. </optional>
  616. <ref name="db.common.attributes"/>
  617. <ref name="db.common.linking.attributes"/>
  618. </interleave>
  619. </define>
  620. <define name="db.modifier">
  621. <element name="modifier">
  622. <ref name="db.modifier.attlist"/>
  623. <ref name="db._text"/>
  624. </element>
  625. </define>
  626. </div>
  627. <!-- ====================================================================== -->
  628. <div>
  629. <db:refname>interfacename</db:refname>
  630. <db:refpurpose>The name of an interface</db:refpurpose>
  631. <define name="db.interfacename.role.attribute">
  632. <attribute name="role"/>
  633. </define>
  634. <define name="db.interfacename.attlist">
  635. <interleave>
  636. <optional>
  637. <ref name="db.interfacename.role.attribute"/>
  638. </optional>
  639. <ref name="db.common.attributes"/>
  640. <ref name="db.common.linking.attributes"/>
  641. </interleave>
  642. </define>
  643. <define name="db.interfacename">
  644. <element name="interfacename">
  645. <ref name="db.interfacename.attlist"/>
  646. <ref name="db._text"/>
  647. </element>
  648. </define>
  649. </div>
  650. <!-- ====================================================================== -->
  651. <div>
  652. <db:refname>exceptionname</db:refname>
  653. <db:refpurpose>The name of an exception</db:refpurpose>
  654. <define name="db.exceptionname.role.attribute">
  655. <attribute name="role"/>
  656. </define>
  657. <define name="db.exceptionname.attlist">
  658. <interleave>
  659. <optional>
  660. <ref name="db.exceptionname.role.attribute"/>
  661. </optional>
  662. <ref name="db.common.attributes"/>
  663. <ref name="db.common.linking.attributes"/>
  664. </interleave>
  665. </define>
  666. <define name="db.exceptionname">
  667. <element name="exceptionname">
  668. <ref name="db.exceptionname.attlist"/>
  669. <ref name="db._text"/>
  670. </element>
  671. </define>
  672. </div>
  673. <!-- ====================================================================== -->
  674. <div>
  675. <db:refname>fieldsynopsis</db:refname>
  676. <db:refpurpose>The name of a field in a class definition</db:refpurpose>
  677. <define name="db.fieldsynopsis.role.attribute">
  678. <attribute name="role"/>
  679. </define>
  680. <define name="db.fieldsynopsis.attlist">
  681. <interleave>
  682. <optional>
  683. <ref name="db.fieldsynopsis.role.attribute"/>
  684. </optional>
  685. <ref name="db.common.attributes"/>
  686. <ref name="db.common.linking.attributes"/>
  687. <optional>
  688. <ref name="db.language.attribute"/>
  689. </optional>
  690. </interleave>
  691. </define>
  692. <define name="db.fieldsynopsis">
  693. <element name="fieldsynopsis">
  694. <ref name="db.fieldsynopsis.attlist"/>
  695. <zeroOrMore>
  696. <ref name="db.modifier"/>
  697. </zeroOrMore>
  698. <optional>
  699. <ref name="db.type"/>
  700. </optional>
  701. <ref name="db.varname"/>
  702. <optional>
  703. <ref name="db.initializer"/>
  704. </optional>
  705. </element>
  706. </define>
  707. </div>
  708. <!-- ====================================================================== -->
  709. <div>
  710. <db:refname>initializer</db:refname>
  711. <db:refpurpose>The initializer for a fieldsynopsis</db:refpurpose>
  712. <define name="db.initializer.role.attribute">
  713. <attribute name="role"/>
  714. </define>
  715. <define name="db.initializer.attlist">
  716. <interleave>
  717. <optional>
  718. <ref name="db.initializer.role.attribute"/>
  719. </optional>
  720. <ref name="db.common.attributes"/>
  721. <ref name="db.common.linking.attributes"/>
  722. </interleave>
  723. </define>
  724. <define name="db.initializer.inlines">
  725. <ref name="db._text"/>
  726. </define>
  727. <define name="db.initializer">
  728. <element name="initializer">
  729. <ref name="db.initializer.attlist"/>
  730. <zeroOrMore>
  731. <ref name="db.initializer.inlines"/>
  732. </zeroOrMore>
  733. </element>
  734. </define>
  735. </div>
  736. <!-- ====================================================================== -->
  737. <div>
  738. <db:refname>constructorsynopsis</db:refname>
  739. <db:refpurpose>A syntax summary for a constructor</db:refpurpose>
  740. <define name="db.constructorsynopsis.role.attribute">
  741. <attribute name="role"/>
  742. </define>
  743. <define name="db.constructorsynopsis.attlist">
  744. <interleave>
  745. <optional>
  746. <ref name="db.constructorsynopsis.role.attribute"/>
  747. </optional>
  748. <ref name="db.common.attributes"/>
  749. <ref name="db.common.linking.attributes"/>
  750. <optional>
  751. <ref name="db.language.attribute"/>
  752. </optional>
  753. </interleave>
  754. </define>
  755. <define name="db.constructorsynopsis">
  756. <element name="constructorsynopsis">
  757. <ref name="db.constructorsynopsis.attlist"/>
  758. <zeroOrMore>
  759. <ref name="db.modifier"/>
  760. </zeroOrMore>
  761. <optional>
  762. <ref name="db.methodname"/>
  763. </optional>
  764. <choice>
  765. <oneOrMore>
  766. <choice>
  767. <ref name="db.methodparam"/>
  768. <ref name="db.group.methodparam"/>
  769. </choice>
  770. </oneOrMore>
  771. <optional>
  772. <ref name="db.void"/>
  773. </optional>
  774. </choice>
  775. <zeroOrMore>
  776. <ref name="db.exceptionname"/>
  777. </zeroOrMore>
  778. </element>
  779. </define>
  780. </div>
  781. <!-- ====================================================================== -->
  782. <div>
  783. <db:refname>destructorsynopsis</db:refname>
  784. <db:refpurpose>A syntax summary for a destructor</db:refpurpose>
  785. <define name="db.destructorsynopsis.role.attribute">
  786. <attribute name="role"/>
  787. </define>
  788. <define name="db.destructorsynopsis.attlist">
  789. <interleave>
  790. <optional>
  791. <ref name="db.destructorsynopsis.role.attribute"/>
  792. </optional>
  793. <ref name="db.common.attributes"/>
  794. <ref name="db.common.linking.attributes"/>
  795. <optional>
  796. <ref name="db.language.attribute"/>
  797. </optional>
  798. </interleave>
  799. </define>
  800. <define name="db.destructorsynopsis">
  801. <element name="destructorsynopsis">
  802. <ref name="db.destructorsynopsis.attlist"/>
  803. <zeroOrMore>
  804. <ref name="db.modifier"/>
  805. </zeroOrMore>
  806. <optional>
  807. <ref name="db.methodname"/>
  808. </optional>
  809. <choice>
  810. <oneOrMore>
  811. <choice>
  812. <ref name="db.methodparam"/>
  813. <ref name="db.group.methodparam"/>
  814. </choice>
  815. </oneOrMore>
  816. <optional>
  817. <ref name="db.void"/>
  818. </optional>
  819. </choice>
  820. <zeroOrMore>
  821. <ref name="db.exceptionname"/>
  822. </zeroOrMore>
  823. </element>
  824. </define>
  825. </div>
  826. <!-- ====================================================================== -->
  827. <div>
  828. <db:refname>methodsynopsis</db:refname>
  829. <db:refpurpose>A syntax summary for a method</db:refpurpose>
  830. <define name="db.methodsynopsis.role.attribute">
  831. <attribute name="role"/>
  832. </define>
  833. <define name="db.methodsynopsis.attlist">
  834. <interleave>
  835. <optional>
  836. <ref name="db.methodsynopsis.role.attribute"/>
  837. </optional>
  838. <ref name="db.common.attributes"/>
  839. <ref name="db.common.linking.attributes"/>
  840. <optional>
  841. <ref name="db.language.attribute"/>
  842. </optional>
  843. </interleave>
  844. </define>
  845. <define name="db.methodsynopsis">
  846. <element name="methodsynopsis">
  847. <ref name="db.methodsynopsis.attlist"/>
  848. <zeroOrMore>
  849. <ref name="db.modifier"/>
  850. </zeroOrMore>
  851. <optional>
  852. <choice>
  853. <ref name="db.type"/>
  854. <ref name="db.void"/>
  855. </choice>
  856. </optional>
  857. <ref name="db.methodname"/>
  858. <choice>
  859. <oneOrMore>
  860. <choice>
  861. <ref name="db.methodparam"/>
  862. <ref name="db.group.methodparam"/>
  863. </choice>
  864. </oneOrMore>
  865. <ref name="db.void"/>
  866. </choice>
  867. <zeroOrMore>
  868. <ref name="db.exceptionname"/>
  869. </zeroOrMore>
  870. <zeroOrMore>
  871. <ref name="db.modifier"/>
  872. </zeroOrMore>
  873. </element>
  874. </define>
  875. </div>
  876. <!-- ====================================================================== -->
  877. <div>
  878. <db:refname>methodname</db:refname>
  879. <db:refpurpose>The name of a method</db:refpurpose>
  880. <define name="db.methodname.role.attribute">
  881. <attribute name="role"/>
  882. </define>
  883. <define name="db.methodname.attlist">
  884. <interleave>
  885. <optional>
  886. <ref name="db.methodname.role.attribute"/>
  887. </optional>
  888. <ref name="db.common.attributes"/>
  889. <ref name="db.common.linking.attributes"/>
  890. </interleave>
  891. </define>
  892. <define name="db.methodname">
  893. <element name="methodname">
  894. <ref name="db.methodname.attlist"/>
  895. <ref name="db._text"/>
  896. </element>
  897. </define>
  898. </div>
  899. <!-- ====================================================================== -->
  900. <div>
  901. <db:refname>methodparam</db:refname>
  902. <db:refpurpose>Parameters to a method</db:refpurpose>
  903. <define name="db.methodparam.role.attribute">
  904. <attribute name="role"/>
  905. </define>
  906. <define name="db.methodparam.rep.attribute">
  907. <ref name="db.rep.attribute"/>
  908. </define>
  909. <define name="db.methodparam.choice.attribute">
  910. <ref name="db.choice.req.attribute"/>
  911. </define>
  912. <define name="db.methodparam.attlist">
  913. <interleave>
  914. <optional>
  915. <ref name="db.methodparam.role.attribute"/>
  916. </optional>
  917. <ref name="db.common.attributes"/>
  918. <ref name="db.common.linking.attributes"/>
  919. <optional>
  920. <ref name="db.methodparam.rep.attribute"/>
  921. </optional>
  922. <optional>
  923. <ref name="db.methodparam.choice.attribute"/>
  924. </optional>
  925. </interleave>
  926. </define>
  927. <define name="db.methodparam">
  928. <element name="methodparam">
  929. <ref name="db.methodparam.attlist"/>
  930. <zeroOrMore>
  931. <ref name="db.modifier"/>
  932. </zeroOrMore>
  933. <optional>
  934. <ref name="db.type"/>
  935. </optional>
  936. <choice>
  937. <group>
  938. <zeroOrMore>
  939. <ref name="db.modifier"/>
  940. </zeroOrMore>
  941. <ref name="db.parameter"/>
  942. <optional>
  943. <ref name="db.initializer"/>
  944. </optional>
  945. </group>
  946. <ref name="db.funcparams"/>
  947. </choice>
  948. <zeroOrMore>
  949. <ref name="db.modifier"/>
  950. </zeroOrMore>
  951. </element>
  952. </define>
  953. </div>
  954. <!-- ====================================================================== -->
  955. <div>
  956. <db:refname>group</db:refname>
  957. <db:refpurpose>A group of method parameters</db:refpurpose>
  958. <define name="db.group.methodparam.role.attribute">
  959. <attribute name="role"/>
  960. </define>
  961. <define name="db.group.methodparam.choice.attribute">
  962. <ref name="db.choice.opt.attribute"/>
  963. </define>
  964. <define name="db.group.methodparam.attlist">
  965. <interleave>
  966. <optional>
  967. <ref name="db.group.methodparam.role.attribute"/>
  968. </optional>
  969. <ref name="db.common.attributes"/>
  970. <ref name="db.common.linking.attributes"/>
  971. <optional>
  972. <ref name="db.group.methodparam.choice.attribute"/>
  973. </optional>
  974. </interleave>
  975. </define>
  976. <define name="db.group.methodparam">
  977. <element name="group">
  978. <ref name="db.group.methodparam.attlist"/>
  979. <oneOrMore>
  980. <choice>
  981. <ref name="db.methodparam"/>
  982. <ref name="db.group.methodparam"/>
  983. </choice>
  984. </oneOrMore>
  985. </element>
  986. </define>
  987. </div>
  988. <!-- ====================================================================== -->
  989. <div>
  990. <db:refname>varname</db:refname>
  991. <db:refpurpose>The name of a variable</db:refpurpose>
  992. <define name="db.varname.role.attribute">
  993. <attribute name="role"/>
  994. </define>
  995. <define name="db.varname.attlist">
  996. <interleave>
  997. <optional>
  998. <ref name="db.varname.role.attribute"/>
  999. </optional>
  1000. <ref name="db.common.attributes"/>
  1001. <ref name="db.common.linking.attributes"/>
  1002. </interleave>
  1003. </define>
  1004. <define name="db.varname">
  1005. <element name="varname">
  1006. <ref name="db.varname.attlist"/>
  1007. <ref name="db._text"/>
  1008. </element>
  1009. </define>
  1010. </div>
  1011. <!-- ====================================================================== -->
  1012. <div>
  1013. <db:refname>returnvalue</db:refname>
  1014. <db:refpurpose>The value returned by a function</db:refpurpose>
  1015. <define name="db.returnvalue.role.attribute">
  1016. <attribute name="role"/>
  1017. </define>
  1018. <define name="db.returnvalue.attlist">
  1019. <interleave>
  1020. <optional>
  1021. <ref name="db.returnvalue.role.attribute"/>
  1022. </optional>
  1023. <ref name="db.common.attributes"/>
  1024. <ref name="db.common.linking.attributes"/>
  1025. </interleave>
  1026. </define>
  1027. <define name="db.returnvalue">
  1028. <element name="returnvalue">
  1029. <ref name="db.returnvalue.attlist"/>
  1030. <ref name="db._text"/>
  1031. </element>
  1032. </define>
  1033. </div>
  1034. <!-- ====================================================================== -->
  1035. <div>
  1036. <db:refname>type</db:refname>
  1037. <db:refpurpose>The classification of a value</db:refpurpose>
  1038. <define name="db.type.role.attribute">
  1039. <attribute name="role"/>
  1040. </define>
  1041. <define name="db.type.attlist">
  1042. <interleave>
  1043. <optional>
  1044. <ref name="db.type.role.attribute"/>
  1045. </optional>
  1046. <ref name="db.common.attributes"/>
  1047. <ref name="db.common.linking.attributes"/>
  1048. </interleave>
  1049. </define>
  1050. <define name="db.type">
  1051. <element name="type">
  1052. <ref name="db.type.attlist"/>
  1053. <ref name="db._text"/>
  1054. </element>
  1055. </define>
  1056. </div>
  1057. <!-- ====================================================================== -->
  1058. <div>
  1059. <db:refname>classname</db:refname>
  1060. <db:refpurpose>The name of a class, in the object-oriented programming sense</db:refpurpose>
  1061. <define name="db.classname.role.attribute">
  1062. <attribute name="role"/>
  1063. </define>
  1064. <define name="db.classname.attlist">
  1065. <interleave>
  1066. <optional>
  1067. <ref name="db.classname.role.attribute"/>
  1068. </optional>
  1069. <ref name="db.common.attributes"/>
  1070. <ref name="db.common.linking.attributes"/>
  1071. </interleave>
  1072. </define>
  1073. <define name="db.classname">
  1074. <element name="classname">
  1075. <ref name="db.classname.attlist"/>
  1076. <ref name="db._text"/>
  1077. </element>
  1078. </define>
  1079. </div>
  1080. <!-- ====================================================================== -->
  1081. <div>
  1082. <db:refname>programlisting</db:refname>
  1083. <db:refpurpose>A literal listing of all or part of a program</db:refpurpose>
  1084. <define name="db.programlisting.role.attribute">
  1085. <attribute name="role"/>
  1086. </define>
  1087. <define name="db.programlisting.width.attribute">
  1088. <ref name="db.width.characters.attribute"/>
  1089. </define>
  1090. <define name="db.programlisting.attlist">
  1091. <interleave>
  1092. <optional>
  1093. <ref name="db.programlisting.role.attribute"/>
  1094. </optional>
  1095. <ref name="db.common.attributes"/>
  1096. <ref name="db.common.linking.attributes"/>
  1097. <ref name="db.verbatim.attributes"/>
  1098. <optional>
  1099. <ref name="db.programlisting.width.attribute"/>
  1100. </optional>
  1101. </interleave>
  1102. </define>
  1103. <define name="db.programlisting">
  1104. <element name="programlisting">
  1105. <ref name="db.programlisting.attlist"/>
  1106. <ref name="db.verbatim.contentmodel"/>
  1107. </element>
  1108. </define>
  1109. </div>
  1110. </grammar>