tblDeclMod.xsd 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- ============================================================= -->
  3. <!-- HEADER -->
  4. <!-- ============================================================= -->
  5. <!-- MODULE: XML EXCHANGE TABLE MODEL DECLARATION MODULE -->
  6. <!-- VERSION: 1.1 -->
  7. <!-- DATE: November 2006 -->
  8. <!-- -->
  9. <!-- ============================================================= -->
  10. <!-- ============================================================= -->
  11. <!-- SYSTEM: Darwin Information Typing Architecture (DITA) -->
  12. <!-- -->
  13. <!-- PURPOSE: W3C XML Schema to describe DITA Tables -->
  14. <!-- -->
  15. <!-- ORIGINAL CREATION DATE: -->
  16. <!-- Derived from OASIS Exchange Table Model base -->
  17. <!-- -->
  18. <!-- (C) Copyright OASIS-Open.org 2005, 2006 -->
  19. <!-- (C) Copyright IBM Corporation 2001, 2004. -->
  20. <!-- All Rights Reserved. -->
  21. <!-- -->
  22. <!-- UPDATES: -->
  23. <!-- 2005.11.15 EAS: Corrected definition for entry element -->
  24. <!-- ============================================================= -->
  25. <!-- XML EXCHANGE TABLE MODEL DECLARATION MODULE -->
  26. <!-- OASIS DITA 1.0 notes:
  27. The Exchange Table Model replaces the original CALS-based model
  28. used in development versions of the DITA definition.
  29. This set of declarations defines the XML version of the Exchange
  30. Table Model as adapted for OASIS DITA version 1.0.
  31. The base for the DITA version of the Exchange Table Model is
  32. defined at http://www.oasis-open.org/specs/tm9901.htm .
  33. The DITA version specifically extends this model with these DITA-
  34. specific content and attribute adaptations to the DITA processing
  35. requirements:
  36. STRUCTURE:
  37. Introduce the DITA-unique <desc> element (optional after <title>); this element
  38. enables more consistent presentation of both figures and tables.
  39. ATTRIBUTES:
  40. For the <table> element, add:
  41. %univ-atts; which consists of:
  42. %select-atts; [for selection, conditional processing]
  43. %id-atts; [for conref and linking]
  44. @translate + @xml:lang) [for NLS processing support]
  45. %global-atts; (@xtrf + @xtrc) [for tracing and messaging support in processors]
  46. @class [for specialization support]
  47. @outputclass [for role designation (ie, styles, future migrations)]
  48. @rowheader [for accessibility support in processing]
  49. %display-atts; which consists of:
  50. @scale [for presentational equivalence with other scaled exhibits: fig, pre, lines, simpletable]
  51. @frame (already part of table)
  52. @pgwide (already part of table, same intent as original @expanse)
  53. For <tgroup>, <thead>, <tbody>, and <row>, add:
  54. %univ-atts;
  55. %global-atts;
  56. @class
  57. @outputclass [for role designation (ie, styles, future migrations)]
  58. For <entry>, add:
  59. %id-atts;
  60. %global-atts
  61. @class
  62. @outputclass [for role designation (ie, styles, future migrations)]
  63. @rev [for indication of revised content for flag-based processing]
  64. -->
  65. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
  66. <xs:element name="table">
  67. <xs:annotation>
  68. <xs:documentation>
  69. The &lt;<keyword>table</keyword>> element organizes arbitrarily
  70. complex relationships of tabular information. This standard table markup allows
  71. column or row spanning and table captions or descriptions. A optional title
  72. allowed inside the table element provides a caption to describe the table.
  73. See <ph><xref href="simpletable.xml">simpletable</xref></ph> for a simplified
  74. table model that can be specialized to represent more regular relationships
  75. of data.
  76. </xs:documentation>
  77. </xs:annotation>
  78. <xs:complexType>
  79. <xs:complexContent>
  80. <xs:extension base="table.class">
  81. <xs:attribute ref="class" default="- topic/table "/>
  82. </xs:extension>
  83. </xs:complexContent>
  84. </xs:complexType>
  85. </xs:element>
  86. <xs:complexType name="table.class">
  87. <xs:sequence>
  88. <xs:sequence minOccurs="0">
  89. <xs:group ref="title" minOccurs="0"/>
  90. <xs:group ref="desc" minOccurs="0"/>
  91. </xs:sequence>
  92. <xs:group ref="tgroup" maxOccurs="unbounded"/>
  93. </xs:sequence>
  94. <xs:attributeGroup ref="colrowsep-atts"/>
  95. <xs:attribute name="pgwide" type="xs:string"/>
  96. <xs:attribute name="scale" type="scale-atts.class"/>
  97. <xs:attribute name="frame" type="frame-att.class"/>
  98. <xs:attribute name="rowheader" type="rowheader-att.class"/>
  99. <xs:attribute name="outputclass" type="xs:string"/>
  100. <xs:attributeGroup ref="univ-atts"/>
  101. <xs:attributeGroup ref="global-atts"/>
  102. </xs:complexType>
  103. <xs:simpleType name="rowheader-att.class">
  104. <xs:restriction base="xs:string">
  105. <xs:enumeration value="firstcol"/>
  106. <xs:enumeration value="norowheader"/>
  107. <xs:enumeration value="-dita-use-conref-target"/>
  108. </xs:restriction>
  109. </xs:simpleType>
  110. <xs:element name="tgroup">
  111. <xs:annotation>
  112. <xs:documentation>
  113. The &lt;<keyword>tgroup</keyword>> element in a table contains
  114. column, row, spanning, header and footer specifications, and the body (&lt;<keyword>tbody</keyword>>)
  115. of the table.
  116. </xs:documentation>
  117. </xs:annotation>
  118. <xs:complexType>
  119. <xs:complexContent>
  120. <xs:extension base="tgroup.class">
  121. <xs:attribute ref="class" default="- topic/tgroup "/>
  122. </xs:extension>
  123. </xs:complexContent>
  124. </xs:complexType>
  125. </xs:element>
  126. <xs:complexType name="tgroup.class">
  127. <xs:sequence>
  128. <xs:group ref="colspec" minOccurs="0" maxOccurs="unbounded"/>
  129. <xs:group ref="thead" minOccurs="0"/>
  130. <xs:group ref="tbody"/>
  131. </xs:sequence>
  132. <xs:attribute name="cols" type="xs:NMTOKEN" use="required"/>
  133. <xs:attributeGroup ref="colrowsep-atts"/>
  134. <xs:attribute name="align" type="align-att.class"/>
  135. <xs:attribute name="outputclass" type="xs:string"/>
  136. <xs:attributeGroup ref="univ-atts"/>
  137. <xs:attributeGroup ref="global-atts"/>
  138. </xs:complexType>
  139. <xs:attributeGroup name="colrowsep-atts">
  140. <xs:attribute name="colsep" type="xs:string"/>
  141. <xs:attribute name="rowsep" type="xs:string"/>
  142. </xs:attributeGroup>
  143. <xs:element name="colspec">
  144. <xs:annotation>
  145. <xs:documentation>
  146. The &lt;<keyword>colspec</keyword>> element contains a column specification
  147. for a table, including assigning a column name and number, cell content alignment,
  148. and column width.
  149. </xs:documentation>
  150. </xs:annotation>
  151. <xs:complexType>
  152. <xs:complexContent>
  153. <xs:extension base="colspec.class">
  154. <xs:attribute ref="class" default="- topic/colspec "/>
  155. </xs:extension>
  156. </xs:complexContent>
  157. </xs:complexType>
  158. </xs:element>
  159. <xs:complexType name="colspec.class">
  160. <xs:attribute name="colnum" type="xs:NMTOKEN"/>
  161. <xs:attribute name="colname" type="xs:NMTOKEN"/>
  162. <xs:attribute name="align" type="align-att.class"/>
  163. <xs:attribute name="colwidth" type="xs:string"/>
  164. <xs:attributeGroup ref="colrowsep-atts"/>
  165. <xs:attribute name="char" type="xs:string"/>
  166. <xs:attribute name="charoff" type="xs:NMTOKEN"/>
  167. <xs:attribute name="base" type="xs:string" />
  168. <xs:attributeGroup ref="base-attribute-extensions"/>
  169. <xs:attributeGroup ref="id-atts"/>
  170. <xs:attributeGroup ref="localization-atts"/>
  171. <xs:attributeGroup ref="global-atts"/>
  172. </xs:complexType>
  173. <xs:element name="thead">
  174. <xs:annotation>
  175. <xs:documentation>
  176. The table header (&lt;<keyword>thead</keyword>>) element precedes
  177. the table body (&lt;<keyword>tbody</keyword>>) element in a complex table.
  178. </xs:documentation>
  179. </xs:annotation>
  180. <xs:complexType>
  181. <xs:complexContent>
  182. <xs:extension base="thead.class">
  183. <xs:attribute ref="class" default="- topic/thead "/>
  184. </xs:extension>
  185. </xs:complexContent>
  186. </xs:complexType>
  187. </xs:element>
  188. <xs:complexType name="thead.class">
  189. <xs:sequence>
  190. <xs:group ref="row" maxOccurs="unbounded"/>
  191. </xs:sequence>
  192. <xs:attribute name="valign" type="valign-att.class"/>
  193. <xs:attribute name="outputclass" type="xs:string"/>
  194. <xs:attributeGroup ref="univ-atts"/>
  195. <xs:attributeGroup ref="global-atts"/>
  196. </xs:complexType>
  197. <xs:element name="tbody">
  198. <xs:annotation>
  199. <xs:documentation>
  200. The &lt;<keyword>tbody</keyword>> element contains the rows in
  201. a table.
  202. </xs:documentation>
  203. </xs:annotation>
  204. <xs:complexType>
  205. <xs:complexContent>
  206. <xs:extension base="tbody.class">
  207. <xs:attribute ref="class" default="- topic/tbody "/>
  208. </xs:extension>
  209. </xs:complexContent>
  210. </xs:complexType>
  211. </xs:element>
  212. <xs:complexType name="tbody.class">
  213. <xs:choice>
  214. <xs:group ref="row" maxOccurs="unbounded"/>
  215. </xs:choice>
  216. <xs:attribute name="valign" type="valign-att.class"/>
  217. <xs:attribute name="outputclass" type="xs:string"/>
  218. <xs:attributeGroup ref="univ-atts"/>
  219. <xs:attributeGroup ref="global-atts"/>
  220. </xs:complexType>
  221. <xs:element name="row">
  222. <xs:annotation>
  223. <xs:documentation>The &lt;<keyword>row</keyword>> element contains a single row in
  224. a table &lt;<keyword>tgroup</keyword>>.
  225. </xs:documentation>
  226. </xs:annotation>
  227. <xs:complexType>
  228. <xs:complexContent>
  229. <xs:extension base="row.class">
  230. <xs:attribute ref="class" default="- topic/row "/>
  231. </xs:extension>
  232. </xs:complexContent>
  233. </xs:complexType>
  234. </xs:element>
  235. <xs:complexType name="row.class">
  236. <xs:choice>
  237. <xs:group ref="entry" maxOccurs="unbounded"/>
  238. </xs:choice>
  239. <xs:attribute name="rowsep" type="xs:string"/>
  240. <xs:attribute name="valign" type="valign-att.class"/>
  241. <xs:attribute name="outputclass" type="xs:string"/>
  242. <xs:attributeGroup ref="univ-atts"/>
  243. <xs:attributeGroup ref="global-atts"/>
  244. </xs:complexType>
  245. <xs:element name="entry">
  246. <xs:annotation>
  247. <xs:documentation>The &lt;<keyword>entry</keyword>> element defines a single cell
  248. in a table.
  249. </xs:documentation>
  250. </xs:annotation>
  251. <xs:complexType mixed="true">
  252. <xs:complexContent>
  253. <xs:extension base="entry.class">
  254. <xs:attribute ref="class" default="- topic/entry "/>
  255. </xs:extension>
  256. </xs:complexContent>
  257. </xs:complexType>
  258. </xs:element>
  259. <xs:complexType name="entry.class" mixed="true">
  260. <xs:choice minOccurs="0" maxOccurs="unbounded">
  261. <xs:group ref="tblcell.cnt"/>
  262. </xs:choice>
  263. <xs:attribute name="namest" type="xs:NMTOKEN"/>
  264. <xs:attribute name="nameend" type="xs:NMTOKEN"/>
  265. <xs:attribute name="spanname" type="xs:string"/>
  266. <xs:attribute name="colname" type="xs:NMTOKEN"/>
  267. <xs:attribute name="morerows" type="xs:NMTOKEN"/>
  268. <xs:attribute name="char" type="xs:string"/>
  269. <xs:attribute name="charoff" type="xs:NMTOKEN"/>
  270. <xs:attributeGroup ref="colrowsep-atts"/>
  271. <xs:attribute name="align" type="align-att.class"/>
  272. <xs:attribute name="valign" type="valign-att.class"/>
  273. <xs:attribute name="rev" type="xs:string"/>
  274. <xs:attribute name="outputclass" type="xs:string"/>
  275. <xs:attribute name="base" type="xs:string" />
  276. <xs:attributeGroup ref="base-attribute-extensions"/>
  277. <xs:attributeGroup ref="id-atts"/>
  278. <xs:attributeGroup ref="localization-atts"/>
  279. <xs:attributeGroup ref="global-atts"/>
  280. <!-- added DITA attributes -->
  281. </xs:complexType>
  282. <xs:simpleType name="align-att.class">
  283. <xs:restriction base="xs:string">
  284. <xs:enumeration value="left"/>
  285. <xs:enumeration value="right"/>
  286. <xs:enumeration value="center"/>
  287. <xs:enumeration value="justify"/>
  288. <xs:enumeration value="-dita-use-conref-target"/>
  289. </xs:restriction>
  290. </xs:simpleType>
  291. <xs:simpleType name="valign-att.class">
  292. <xs:restriction base="xs:string">
  293. <xs:enumeration value="top"/>
  294. <xs:enumeration value="middle"/>
  295. <xs:enumeration value="bottom"/>
  296. <xs:enumeration value="-dita-use-conref-target"/>
  297. </xs:restriction>
  298. </xs:simpleType>
  299. </xs:schema>