callouts.rng 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  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: callouts.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" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  27. <start combine="choice">
  28. <choice>
  29. <ref name="db.calloutlist"/>
  30. <ref name="db.programlistingco"/>
  31. <ref name="db.screenco"/>
  32. <ref name="db.imageobjectco"/>
  33. </choice>
  34. </start>
  35. <define name="db.publishing.inlines" combine="choice">
  36. <ref name="db.coref"/>
  37. </define>
  38. <define name="db.list.blocks" combine="choice">
  39. <ref name="db.calloutlist"/>
  40. </define>
  41. <define name="db.verbatim.blocks" combine="choice">
  42. <choice>
  43. <ref name="db.programlistingco"/>
  44. <ref name="db.screenco"/>
  45. </choice>
  46. </define>
  47. <define name="db.computeroutput.inlines" combine="choice">
  48. <ref name="db.co"/>
  49. </define>
  50. <define name="db.verbatim.inlines" combine="choice">
  51. <ref name="db.co"/>
  52. </define>
  53. <define name="db.prompt.inlines" combine="choice">
  54. <ref name="db.co"/>
  55. </define>
  56. <define name="db.systemitem.inlines" combine="choice">
  57. <ref name="db.co"/>
  58. </define>
  59. <define name="db.userinput.inlines" combine="choice">
  60. <ref name="db.co"/>
  61. </define>
  62. <define name="db.replaceable.inlines" combine="choice">
  63. <ref name="db.co"/>
  64. </define>
  65. <define name="db.ubiq.inlines" combine="choice">
  66. <ref name="db.coref"/>
  67. </define>
  68. <define name="db.mediaobject.content" combine="choice">
  69. <ref name="db.imageobjectco"/>
  70. </define>
  71. <!-- ====================================================================== -->
  72. <ctrl:other-attribute name="area.units.attrib" enum-name="area.units-enum.attribute" other-name="area.units-other.attributes"/>
  73. <define name="db.area.units.enumeration">
  74. <choice>
  75. <value>calspair</value>
  76. <a:documentation>Coordinates expressed as a pair of CALS graphic coordinates.</a:documentation>
  77. <value>linecolumn</value>
  78. <a:documentation>Coordinates expressed as a line and column.</a:documentation>
  79. <value>linecolumnpair</value>
  80. <a:documentation>Coordinates expressed as a pair of lines and columns.</a:documentation>
  81. <value>linerange</value>
  82. <a:documentation>Coordinates expressed as a line range.</a:documentation>
  83. </choice>
  84. </define>
  85. <define name="db.area.units-enum.attribute">
  86. <optional>
  87. <attribute name="units">
  88. <db:refpurpose>Identifies the units used in the coords attribute. The default units vary according to the type of callout specified: <db:tag class="attvalue">calspair</db:tag>
  89. for graphics and <db:tag class="attvalue">linecolumn</db:tag>
  90. for line-oriented elements.</db:refpurpose>
  91. <ref name="db.area.units.enumeration"/>
  92. </attribute>
  93. </optional>
  94. </define>
  95. <define name="db.area.units-other.attributes">
  96. <optional>
  97. <attribute name="units">
  98. <db:refpurpose>Indicates that non-standard units are used for this <db:tag>area</db:tag>
  99. . In this case <db:tag class="attribute">otherunits</db:tag>
  100. must be specified.</db:refpurpose>
  101. <value>other</value>
  102. <a:documentation>Coordinates expressed in some non-standard units.</a:documentation>
  103. </attribute>
  104. </optional>
  105. <attribute name="otherunits">
  106. <db:refpurpose>Identifies the units used in the <db:tag class="attribute">coords</db:tag>
  107. attribute when the <db:tag class="attribute">units</db:tag>
  108. attribute is <db:quote>other</db:quote>
  109. . This attribute is forbidden otherwise.</db:refpurpose>
  110. <data type="NMTOKEN"/>
  111. </attribute>
  112. </define>
  113. <define name="db.area.units.attribute">
  114. <choice>
  115. <ref name="db.area.units-enum.attribute"/>
  116. <ref name="db.area.units-other.attributes"/>
  117. </choice>
  118. </define>
  119. <!-- ====================================================================== -->
  120. <div>
  121. <db:refname>calloutlist</db:refname>
  122. <db:refpurpose>A list of <db:tag>callout</db:tag>
  123. s</db:refpurpose>
  124. <define name="db.calloutlist.role.attribute">
  125. <attribute name="role"/>
  126. </define>
  127. <define name="db.calloutlist.attlist">
  128. <interleave>
  129. <optional>
  130. <ref name="db.calloutlist.role.attribute"/>
  131. </optional>
  132. <ref name="db.common.attributes"/>
  133. <ref name="db.common.linking.attributes"/>
  134. </interleave>
  135. </define>
  136. <define name="db.calloutlist.info">
  137. <ref name="db._info.title.only"/>
  138. </define>
  139. <define name="db.calloutlist">
  140. <element name="calloutlist">
  141. <ref name="db.calloutlist.attlist"/>
  142. <ref name="db.calloutlist.info"/>
  143. <zeroOrMore>
  144. <ref name="db.all.blocks"/>
  145. </zeroOrMore>
  146. <oneOrMore>
  147. <ref name="db.callout"/>
  148. </oneOrMore>
  149. </element>
  150. </define>
  151. </div>
  152. <!-- ====================================================================== -->
  153. <div>
  154. <db:refname>callout</db:refname>
  155. <db:refpurpose>A <db:quote>called out</db:quote>
  156. description of a marked area</db:refpurpose>
  157. <define name="db.callout.role.attribute">
  158. <attribute name="role"/>
  159. </define>
  160. <define name="db.callout.arearefs.attribute">
  161. <attribute name="arearefs">
  162. <db:refpurpose>Identifies the areas described by this callout.</db:refpurpose>
  163. <data type="IDREFS"/>
  164. </attribute>
  165. </define>
  166. <define name="db.callout.attlist">
  167. <interleave>
  168. <optional>
  169. <ref name="db.callout.role.attribute"/>
  170. </optional>
  171. <ref name="db.common.attributes"/>
  172. <ref name="db.callout.arearefs.attribute"/>
  173. </interleave>
  174. </define>
  175. <define name="db.callout">
  176. <element name="callout">
  177. <ref name="db.callout.attlist"/>
  178. <oneOrMore>
  179. <ref name="db.all.blocks"/>
  180. </oneOrMore>
  181. </element>
  182. </define>
  183. </div>
  184. <!-- ====================================================================== -->
  185. <div>
  186. <db:refname>programlistingco</db:refname>
  187. <db:refpurpose>A program listing with associated areas used in callouts</db:refpurpose>
  188. <define name="db.programlistingco.role.attribute">
  189. <attribute name="role"/>
  190. </define>
  191. <define name="db.programlistingco.attlist">
  192. <interleave>
  193. <optional>
  194. <ref name="db.programlistingco.role.attribute"/>
  195. </optional>
  196. <ref name="db.common.attributes"/>
  197. <ref name="db.common.linking.attributes"/>
  198. </interleave>
  199. </define>
  200. <define name="db.programlistingco.info">
  201. <ref name="db._info.title.forbidden"/>
  202. </define>
  203. <define name="db.programlistingco">
  204. <element name="programlistingco">
  205. <ref name="db.programlistingco.attlist"/>
  206. <ref name="db.programlistingco.info"/>
  207. <ref name="db.areaspec"/>
  208. <ref name="db.programlisting"/>
  209. <zeroOrMore>
  210. <ref name="db.calloutlist"/>
  211. </zeroOrMore>
  212. </element>
  213. </define>
  214. </div>
  215. <!-- ====================================================================== -->
  216. <div>
  217. <db:refname>areaspec</db:refname>
  218. <db:refpurpose>A collection of regions in a graphic or code example</db:refpurpose>
  219. <define name="db.areaspec.role.attribute">
  220. <attribute name="role"/>
  221. </define>
  222. <define name="db.areaspec.attlist">
  223. <interleave>
  224. <optional>
  225. <ref name="db.areaspec.role.attribute"/>
  226. </optional>
  227. <ref name="db.common.attributes"/>
  228. <ref name="db.common.linking.attributes"/>
  229. <ref name="db.area.units.attribute"/>
  230. </interleave>
  231. </define>
  232. <define name="db.areaspec">
  233. <element name="areaspec">
  234. <ref name="db.areaspec.attlist"/>
  235. <oneOrMore>
  236. <choice>
  237. <ref name="db.area"/>
  238. <ref name="db.areaset"/>
  239. </choice>
  240. </oneOrMore>
  241. </element>
  242. </define>
  243. </div>
  244. <!-- ====================================================================== -->
  245. <div>
  246. <db:refname>area</db:refname>
  247. <db:refpurpose>A region defined for a callout in a graphic or code example</db:refpurpose>
  248. <define name="db.area.role.attribute">
  249. <attribute name="role"/>
  250. </define>
  251. <define name="db.area.linkends.attribute">
  252. <attribute name="linkends">
  253. <db:refpurpose>Point to the <db:tag>callout</db:tag>
  254. s which refer to this area. (This provides bidirectional linking which may be useful in online presentation.)</db:refpurpose>
  255. <data type="IDREFS"/>
  256. </attribute>
  257. </define>
  258. <define name="db.area.label.attribute">
  259. <attribute name="label">
  260. <db:refpurpose>Specifies an identifying number or string that may be used in presentation. The area label might be drawn on top of the figure, for example, at the position indicated by the coords attribute.</db:refpurpose>
  261. </attribute>
  262. </define>
  263. <define name="db.area.coords.attribute">
  264. <attribute name="coords">
  265. <db:refpurpose>Provides the coordinates of the area. The coordinates must be interpreted using the <db:tag class="attribute">units</db:tag>
  266. specified.</db:refpurpose>
  267. </attribute>
  268. </define>
  269. <define name="db.area.attlist">
  270. <interleave>
  271. <optional>
  272. <ref name="db.area.role.attribute"/>
  273. </optional>
  274. <ref name="db.common.idreq.attributes"/>
  275. <ref name="db.area.units.attribute"/>
  276. <optional>
  277. <choice>
  278. <ref name="db.area.linkends.attribute"/>
  279. <ref name="db.href.attributes"/>
  280. </choice>
  281. </optional>
  282. <optional>
  283. <ref name="db.area.label.attribute"/>
  284. </optional>
  285. <ref name="db.area.coords.attribute"/>
  286. </interleave>
  287. </define>
  288. <define name="db.area">
  289. <element name="area">
  290. <ref name="db.area.attlist"/>
  291. <optional>
  292. <ref name="db.alt"/>
  293. </optional>
  294. </element>
  295. </define>
  296. </div>
  297. <!-- ====================================================================== -->
  298. <div>
  299. <db:refname>area</db:refname>
  300. <db:refpurpose>A region defined for a callout in a graphic or code example</db:refpurpose>
  301. <!-- The only difference is that xml:id is optional -->
  302. <define name="db.area.inareaset.attlist">
  303. <interleave>
  304. <optional>
  305. <ref name="db.area.role.attribute"/>
  306. </optional>
  307. <ref name="db.common.attributes"/>
  308. <ref name="db.area.units.attribute"/>
  309. <optional>
  310. <choice>
  311. <ref name="db.area.linkends.attribute"/>
  312. <ref name="db.href.attributes"/>
  313. </choice>
  314. </optional>
  315. <optional>
  316. <ref name="db.area.label.attribute"/>
  317. </optional>
  318. <ref name="db.area.coords.attribute"/>
  319. </interleave>
  320. </define>
  321. <define name="db.area.inareaset">
  322. <element name="area">
  323. <ref name="db.area.inareaset.attlist"/>
  324. <optional>
  325. <ref name="db.alt"/>
  326. </optional>
  327. </element>
  328. </define>
  329. </div>
  330. <!-- ====================================================================== -->
  331. <div>
  332. <db:refname>areaset</db:refname>
  333. <db:refpurpose>A set of related areas in a graphic or code example</db:refpurpose>
  334. <define name="db.areaset.role.attribute">
  335. <attribute name="role"/>
  336. </define>
  337. <define name="db.areaset.linkends.attribute">
  338. <ref name="db.linkends.attribute"/>
  339. </define>
  340. <define name="db.areaset.label.attribute">
  341. <ref name="db.label.attribute"/>
  342. </define>
  343. <define name="db.areaset.attlist">
  344. <interleave>
  345. <optional>
  346. <ref name="db.areaset.role.attribute"/>
  347. </optional>
  348. <ref name="db.common.idreq.attributes"/>
  349. <ref name="db.area.units.attribute"/>
  350. <optional>
  351. <choice>
  352. <ref name="db.areaset.linkends.attribute"/>
  353. <ref name="db.href.attributes"/>
  354. </choice>
  355. </optional>
  356. <optional>
  357. <ref name="db.areaset.label.attribute"/>
  358. </optional>
  359. </interleave>
  360. </define>
  361. <define name="db.areaset">
  362. <element name="areaset">
  363. <ref name="db.areaset.attlist"/>
  364. <oneOrMore>
  365. <ref name="db.area.inareaset"/>
  366. </oneOrMore>
  367. </element>
  368. </define>
  369. </div>
  370. <!-- ====================================================================== -->
  371. <div>
  372. <db:refname>screenco</db:refname>
  373. <db:refpurpose>A screen with associated areas used in callouts</db:refpurpose>
  374. <define name="db.screenco.role.attribute">
  375. <attribute name="role"/>
  376. </define>
  377. <define name="db.screenco.attlist">
  378. <interleave>
  379. <optional>
  380. <ref name="db.screenco.role.attribute"/>
  381. </optional>
  382. <ref name="db.common.attributes"/>
  383. <ref name="db.common.linking.attributes"/>
  384. </interleave>
  385. </define>
  386. <define name="db.screenco.info">
  387. <ref name="db._info.title.forbidden"/>
  388. </define>
  389. <define name="db.screenco">
  390. <element name="screenco">
  391. <ref name="db.screenco.attlist"/>
  392. <ref name="db.screenco.info"/>
  393. <ref name="db.areaspec"/>
  394. <ref name="db.screen"/>
  395. <zeroOrMore>
  396. <ref name="db.calloutlist"/>
  397. </zeroOrMore>
  398. </element>
  399. </define>
  400. </div>
  401. <!-- ====================================================================== -->
  402. <div>
  403. <db:refname>imageobjectco</db:refname>
  404. <db:refpurpose>A wrapper for an image object with callouts</db:refpurpose>
  405. <define name="db.imageobjectco.role.attribute">
  406. <attribute name="role"/>
  407. </define>
  408. <define name="db.imageobjectco.attlist">
  409. <interleave>
  410. <optional>
  411. <ref name="db.imageobjectco.role.attribute"/>
  412. </optional>
  413. <ref name="db.common.attributes"/>
  414. <ref name="db.common.linking.attributes"/>
  415. </interleave>
  416. </define>
  417. <define name="db.imageobjectco.info">
  418. <ref name="db._info.title.forbidden"/>
  419. </define>
  420. <define name="db.imageobjectco">
  421. <element name="imageobjectco">
  422. <ref name="db.imageobjectco.attlist"/>
  423. <ref name="db.imageobjectco.info"/>
  424. <ref name="db.areaspec"/>
  425. <oneOrMore>
  426. <ref name="db.imageobject"/>
  427. </oneOrMore>
  428. <zeroOrMore>
  429. <ref name="db.calloutlist"/>
  430. </zeroOrMore>
  431. </element>
  432. </define>
  433. </div>
  434. <!-- ====================================================================== -->
  435. <div>
  436. <db:refname>co</db:refname>
  437. <db:refpurpose>The location of a callout embedded in text</db:refpurpose>
  438. <define name="db.co.role.attribute">
  439. <attribute name="role"/>
  440. </define>
  441. <define name="db.co.linkends.attribute">
  442. <ref name="db.linkends.attribute"/>
  443. </define>
  444. <define name="db.co.label.attribute">
  445. <ref name="db.label.attribute"/>
  446. </define>
  447. <define name="db.co.attlist">
  448. <interleave>
  449. <optional>
  450. <ref name="db.co.role.attribute"/>
  451. </optional>
  452. <ref name="db.common.idreq.attributes"/>
  453. <optional>
  454. <ref name="db.co.linkends.attribute"/>
  455. </optional>
  456. <optional>
  457. <ref name="db.co.label.attribute"/>
  458. </optional>
  459. </interleave>
  460. </define>
  461. <define name="db.co">
  462. <element name="co">
  463. <ref name="db.co.attlist"/>
  464. <empty/>
  465. </element>
  466. </define>
  467. </div>
  468. <!-- ====================================================================== -->
  469. <div>
  470. <db:refname>coref</db:refname>
  471. <db:refpurpose>A cross reference to a co</db:refpurpose>
  472. <define name="db.coref.role.attribute">
  473. <attribute name="role"/>
  474. </define>
  475. <define name="db.coref.label.attribute">
  476. <ref name="db.label.attribute"/>
  477. </define>
  478. <define name="db.coref.attlist">
  479. <interleave>
  480. <optional>
  481. <ref name="db.coref.role.attribute"/>
  482. </optional>
  483. <ref name="db.common.attributes"/>
  484. <ref name="db.linkend.attribute"/>
  485. <optional>
  486. <ref name="db.coref.label.attribute"/>
  487. </optional>
  488. </interleave>
  489. </define>
  490. <define name="db.coref">
  491. <element name="coref">
  492. <ref name="db.coref.attlist"/>
  493. <empty/>
  494. </element>
  495. </define>
  496. </div>
  497. </grammar>