refentry.rng 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488
  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: refentry.rnc 8931 2010-10-20 13:29:20Z 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.refentry"/>
  30. <ref name="db.refsection"/>
  31. <ref name="db.refsynopsisdiv"/>
  32. </choice>
  33. </start>
  34. <define name="db.divisions" combine="choice">
  35. <ref name="db.reference"/>
  36. </define>
  37. <define name="db.part.components" combine="choice">
  38. <choice>
  39. <ref name="db.refentry"/>
  40. <ref name="db.reference"/>
  41. </choice>
  42. </define>
  43. <define name="db.toplevel.sections" combine="choice">
  44. <oneOrMore>
  45. <ref name="db.refentry"/>
  46. </oneOrMore>
  47. </define>
  48. <define name="db.recursive.sections" combine="choice">
  49. <oneOrMore>
  50. <ref name="db.refentry"/>
  51. </oneOrMore>
  52. </define>
  53. <define name="db.toplevel.refsection">
  54. <oneOrMore>
  55. <ref name="db.refsection"/>
  56. </oneOrMore>
  57. </define>
  58. <define name="db.secondlevel.refsection">
  59. <oneOrMore>
  60. <ref name="db.refsection"/>
  61. </oneOrMore>
  62. </define>
  63. <!-- ====================================================================== -->
  64. <define name="db.reference.components">
  65. <ref name="db.refentry"/>
  66. </define>
  67. <!-- ====================================================================== -->
  68. <div>
  69. <db:refname>reference</db:refname>
  70. <db:refpurpose>A collection of reference entries</db:refpurpose>
  71. <define name="db.reference.status.attribute">
  72. <ref name="db.status.attribute"/>
  73. </define>
  74. <define name="db.reference.role.attribute">
  75. <attribute name="role"/>
  76. </define>
  77. <define name="db.reference.attlist">
  78. <interleave>
  79. <optional>
  80. <ref name="db.reference.role.attribute"/>
  81. </optional>
  82. <ref name="db.common.attributes"/>
  83. <ref name="db.common.linking.attributes"/>
  84. <optional>
  85. <ref name="db.reference.status.attribute"/>
  86. </optional>
  87. <optional>
  88. <ref name="db.label.attribute"/>
  89. </optional>
  90. </interleave>
  91. </define>
  92. <define name="db.reference.info">
  93. <ref name="db._info.title.req"/>
  94. </define>
  95. <define name="db.reference">
  96. <element name="reference">
  97. <ref name="db.reference.attlist"/>
  98. <ref name="db.reference.info"/>
  99. <optional>
  100. <ref name="db.partintro"/>
  101. </optional>
  102. <oneOrMore>
  103. <ref name="db.reference.components"/>
  104. </oneOrMore>
  105. </element>
  106. </define>
  107. </div>
  108. <!-- ====================================================================== -->
  109. <div>
  110. <db:refname>refentry</db:refname>
  111. <db:refpurpose>A reference page (originally a UNIX man-style reference page)</db:refpurpose>
  112. <define name="db.refentry.status.attribute">
  113. <ref name="db.status.attribute"/>
  114. </define>
  115. <define name="db.refentry.role.attribute">
  116. <attribute name="role"/>
  117. </define>
  118. <define name="db.refentry.attlist">
  119. <interleave>
  120. <optional>
  121. <ref name="db.refentry.role.attribute"/>
  122. </optional>
  123. <ref name="db.common.attributes"/>
  124. <ref name="db.common.linking.attributes"/>
  125. <optional>
  126. <ref name="db.refentry.status.attribute"/>
  127. </optional>
  128. <optional>
  129. <ref name="db.label.attribute"/>
  130. </optional>
  131. </interleave>
  132. </define>
  133. <define name="db.refentry.info">
  134. <ref name="db._info.title.forbidden"/>
  135. </define>
  136. <define name="db.refentry">
  137. <element name="refentry">
  138. <ref name="db.refentry.attlist"/>
  139. <zeroOrMore>
  140. <ref name="db.indexterm"/>
  141. </zeroOrMore>
  142. <ref name="db.refentry.info"/>
  143. <optional>
  144. <ref name="db.refmeta"/>
  145. </optional>
  146. <oneOrMore>
  147. <ref name="db.refnamediv"/>
  148. </oneOrMore>
  149. <optional>
  150. <ref name="db.refsynopsisdiv"/>
  151. </optional>
  152. <ref name="db.toplevel.refsection"/>
  153. </element>
  154. </define>
  155. </div>
  156. <!-- ====================================================================== -->
  157. <div>
  158. <db:refname>refmeta</db:refname>
  159. <db:refpurpose>Meta-information for a reference entry</db:refpurpose>
  160. <define name="db.refmeta.role.attribute">
  161. <attribute name="role"/>
  162. </define>
  163. <define name="db.refmeta.attlist">
  164. <interleave>
  165. <optional>
  166. <ref name="db.refmeta.role.attribute"/>
  167. </optional>
  168. <ref name="db.common.attributes"/>
  169. <ref name="db.common.linking.attributes"/>
  170. </interleave>
  171. </define>
  172. <define name="db.refmeta">
  173. <element name="refmeta">
  174. <ref name="db.refmeta.attlist"/>
  175. <zeroOrMore>
  176. <ref name="db.indexterm"/>
  177. </zeroOrMore>
  178. <ref name="db.refentrytitle"/>
  179. <optional>
  180. <ref name="db.manvolnum"/>
  181. </optional>
  182. <zeroOrMore>
  183. <ref name="db.refmiscinfo"/>
  184. </zeroOrMore>
  185. <zeroOrMore>
  186. <ref name="db.indexterm"/>
  187. </zeroOrMore>
  188. </element>
  189. </define>
  190. </div>
  191. <!-- ====================================================================== -->
  192. <ctrl:other-attribute name="db.refmiscinfo.class.attribute" enum-name="db.refmiscinfo.class-enum.attribute" other-name="db.refmiscinfo.class-other.attributes"/>
  193. <define name="db.refmiscinfo.class.enumeration">
  194. <choice>
  195. <value>source</value>
  196. <a:documentation>The name of the software product or component to which this topic applies</a:documentation>
  197. <value>version</value>
  198. <a:documentation>The version of the software product or component to which this topic applies</a:documentation>
  199. <value>manual</value>
  200. <a:documentation>The section title of the reference page (e.g., User Commands)</a:documentation>
  201. <value>sectdesc</value>
  202. <a:documentation>The section title of the reference page (believed synonymous with "manual" but in wide use)</a:documentation>
  203. <value>software</value>
  204. <a:documentation>The name of the software product or component to which this topic applies (e.g., SunOS x.y; believed synonymous with "source" but in wide use)</a:documentation>
  205. </choice>
  206. </define>
  207. <define name="db.refmiscinfo.class-enum.attribute">
  208. <optional>
  209. <attribute name="class">
  210. <db:refpurpose>Identifies the kind of miscellaneous information</db:refpurpose>
  211. <ref name="db.refmiscinfo.class.enumeration"/>
  212. </attribute>
  213. </optional>
  214. </define>
  215. <define name="db.refmiscinfo.class-other.attribute">
  216. <attribute name="otherclass">
  217. <db:refpurpose>Identifies the nature of non-standard miscellaneous information</db:refpurpose>
  218. </attribute>
  219. </define>
  220. <define name="db.refmiscinfo.class-other.attributes">
  221. <interleave>
  222. <attribute name="class">
  223. <db:refpurpose>Identifies the kind of miscellaneious information</db:refpurpose>
  224. <value>other</value>
  225. <a:documentation>Indicates that the information is some 'other' kind.</a:documentation>
  226. </attribute>
  227. <ref name="db.refmiscinfo.class-other.attribute"/>
  228. </interleave>
  229. </define>
  230. <define name="db.refmiscinfo.class.attribute">
  231. <choice>
  232. <ref name="db.refmiscinfo.class-enum.attribute"/>
  233. <ref name="db.refmiscinfo.class-other.attributes"/>
  234. </choice>
  235. </define>
  236. <!-- ====================================================================== -->
  237. <div>
  238. <db:refname>refmiscinfo</db:refname>
  239. <db:refpurpose>Meta-information for a reference entry other than the title and volume number</db:refpurpose>
  240. <define name="db.refmiscinfo.role.attribute">
  241. <attribute name="role"/>
  242. </define>
  243. <define name="db.refmiscinfo.attlist">
  244. <interleave>
  245. <optional>
  246. <ref name="db.refmiscinfo.role.attribute"/>
  247. </optional>
  248. <ref name="db.common.attributes"/>
  249. <ref name="db.common.linking.attributes"/>
  250. <optional>
  251. <ref name="db.refmiscinfo.class.attribute"/>
  252. </optional>
  253. </interleave>
  254. </define>
  255. <define name="db.refmiscinfo">
  256. <element name="refmiscinfo">
  257. <ref name="db.refmiscinfo.attlist"/>
  258. <ref name="db._text"/>
  259. </element>
  260. </define>
  261. </div>
  262. <!-- ====================================================================== -->
  263. <div>
  264. <db:refname>refnamediv</db:refname>
  265. <db:refpurpose>The name, purpose, and classification of a reference page</db:refpurpose>
  266. <define name="db.refnamediv.role.attribute">
  267. <attribute name="role"/>
  268. </define>
  269. <define name="db.refnamediv.attlist">
  270. <interleave>
  271. <optional>
  272. <ref name="db.refnamediv.role.attribute"/>
  273. </optional>
  274. <ref name="db.common.attributes"/>
  275. <ref name="db.common.linking.attributes"/>
  276. </interleave>
  277. </define>
  278. <define name="db.refnamediv">
  279. <element name="refnamediv">
  280. <ref name="db.refnamediv.attlist"/>
  281. <optional>
  282. <ref name="db.refdescriptor"/>
  283. </optional>
  284. <oneOrMore>
  285. <ref name="db.refname"/>
  286. </oneOrMore>
  287. <ref name="db.refpurpose"/>
  288. <zeroOrMore>
  289. <ref name="db.refclass"/>
  290. </zeroOrMore>
  291. </element>
  292. </define>
  293. </div>
  294. <!-- ====================================================================== -->
  295. <div>
  296. <db:refname>refdescriptor</db:refname>
  297. <db:refpurpose>A description of the topic of a reference page</db:refpurpose>
  298. <define name="db.refdescriptor.role.attribute">
  299. <attribute name="role"/>
  300. </define>
  301. <define name="db.refdescriptor.attlist">
  302. <interleave>
  303. <optional>
  304. <ref name="db.refdescriptor.role.attribute"/>
  305. </optional>
  306. <ref name="db.common.attributes"/>
  307. <ref name="db.common.linking.attributes"/>
  308. </interleave>
  309. </define>
  310. <define name="db.refdescriptor">
  311. <element name="refdescriptor">
  312. <ref name="db.refdescriptor.attlist"/>
  313. <zeroOrMore>
  314. <ref name="db.all.inlines"/>
  315. </zeroOrMore>
  316. </element>
  317. </define>
  318. </div>
  319. <!-- ====================================================================== -->
  320. <div>
  321. <db:refname>refname</db:refname>
  322. <db:refpurpose>The name of (one of) the subject(s) of a reference page</db:refpurpose>
  323. <define name="db.refname.role.attribute">
  324. <attribute name="role"/>
  325. </define>
  326. <define name="db.refname.attlist">
  327. <interleave>
  328. <optional>
  329. <ref name="db.refname.role.attribute"/>
  330. </optional>
  331. <ref name="db.common.attributes"/>
  332. <ref name="db.common.linking.attributes"/>
  333. </interleave>
  334. </define>
  335. <define name="db.refname">
  336. <element name="refname">
  337. <ref name="db.refname.attlist"/>
  338. <zeroOrMore>
  339. <ref name="db.all.inlines"/>
  340. </zeroOrMore>
  341. </element>
  342. </define>
  343. </div>
  344. <!-- ====================================================================== -->
  345. <div>
  346. <db:refname>refpurpose</db:refname>
  347. <db:refpurpose>A short (one sentence) synopsis of the topic of a reference page</db:refpurpose>
  348. <define name="db.refpurpose.role.attribute">
  349. <attribute name="role"/>
  350. </define>
  351. <define name="db.refpurpose.attlist">
  352. <interleave>
  353. <optional>
  354. <ref name="db.refpurpose.role.attribute"/>
  355. </optional>
  356. <ref name="db.common.attributes"/>
  357. <ref name="db.common.linking.attributes"/>
  358. </interleave>
  359. </define>
  360. <define name="db.refpurpose">
  361. <element name="refpurpose">
  362. <ref name="db.refpurpose.attlist"/>
  363. <zeroOrMore>
  364. <ref name="db.all.inlines"/>
  365. </zeroOrMore>
  366. </element>
  367. </define>
  368. </div>
  369. <!-- ====================================================================== -->
  370. <div>
  371. <db:refname>refclass</db:refname>
  372. <db:refpurpose>The scope or other indication of applicability of a reference entry</db:refpurpose>
  373. <define name="db.refclass.role.attribute">
  374. <attribute name="role"/>
  375. </define>
  376. <define name="db.refclass.attlist">
  377. <interleave>
  378. <optional>
  379. <ref name="db.refclass.role.attribute"/>
  380. </optional>
  381. <ref name="db.common.attributes"/>
  382. <ref name="db.common.linking.attributes"/>
  383. </interleave>
  384. </define>
  385. <define name="db.refclass">
  386. <element name="refclass">
  387. <ref name="db.refclass.attlist"/>
  388. <zeroOrMore>
  389. <choice>
  390. <text/>
  391. <ref name="db.application"/>
  392. </choice>
  393. </zeroOrMore>
  394. </element>
  395. </define>
  396. </div>
  397. <!-- ====================================================================== -->
  398. <div>
  399. <db:refname>refsynopsisdiv</db:refname>
  400. <db:refpurpose>A syntactic synopsis of the subject of the reference page</db:refpurpose>
  401. <define name="db.refsynopsisdiv.role.attribute">
  402. <attribute name="role"/>
  403. </define>
  404. <define name="db.refsynopsisdiv.attlist">
  405. <interleave>
  406. <optional>
  407. <ref name="db.refsynopsisdiv.role.attribute"/>
  408. </optional>
  409. <ref name="db.common.attributes"/>
  410. <ref name="db.common.linking.attributes"/>
  411. </interleave>
  412. </define>
  413. <define name="db.refsynopsisdiv.info">
  414. <ref name="db._info"/>
  415. </define>
  416. <define name="db.refsynopsisdiv">
  417. <element name="refsynopsisdiv">
  418. <ref name="db.refsynopsisdiv.attlist"/>
  419. <ref name="db.refsynopsisdiv.info"/>
  420. <choice>
  421. <group>
  422. <oneOrMore>
  423. <ref name="db.all.blocks"/>
  424. </oneOrMore>
  425. <optional>
  426. <ref name="db.secondlevel.refsection"/>
  427. </optional>
  428. </group>
  429. <ref name="db.secondlevel.refsection"/>
  430. </choice>
  431. </element>
  432. </define>
  433. </div>
  434. <!-- ====================================================================== -->
  435. <div>
  436. <db:refname>refsection</db:refname>
  437. <db:refpurpose>A recursive section in a refentry</db:refpurpose>
  438. <define name="db.refsection.status.attribute">
  439. <ref name="db.status.attribute"/>
  440. </define>
  441. <define name="db.refsection.role.attribute">
  442. <attribute name="role"/>
  443. </define>
  444. <define name="db.refsection.attlist">
  445. <interleave>
  446. <optional>
  447. <ref name="db.refsection.role.attribute"/>
  448. </optional>
  449. <ref name="db.common.attributes"/>
  450. <ref name="db.common.linking.attributes"/>
  451. <optional>
  452. <ref name="db.refsection.status.attribute"/>
  453. </optional>
  454. <optional>
  455. <ref name="db.label.attribute"/>
  456. </optional>
  457. </interleave>
  458. </define>
  459. <define name="db.refsection.info">
  460. <ref name="db._info.title.req"/>
  461. </define>
  462. <define name="db.refsection">
  463. <element name="refsection">
  464. <ref name="db.refsection.attlist"/>
  465. <ref name="db.refsection.info"/>
  466. <choice>
  467. <group>
  468. <oneOrMore>
  469. <ref name="db.all.blocks"/>
  470. </oneOrMore>
  471. <zeroOrMore>
  472. <ref name="db.refsection"/>
  473. </zeroOrMore>
  474. </group>
  475. <oneOrMore>
  476. <ref name="db.refsection"/>
  477. </oneOrMore>
  478. </choice>
  479. </element>
  480. </define>
  481. </div>
  482. </grammar>