OpenDocument-schema-v1.3+libreoffice.rnc 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892
  1. # Open Document Format for Office Applications (OpenDocument) Version 1.3
  2. # OASIS Standard, In progress
  3. # Relax-NG Schema
  4. # Source: https://tools.oasis-open.org/version-control/svn/office/
  5. # Copyright (c) OASIS Open 2002-2015. All Rights Reserved.
  6. #
  7. # All capitalized terms in the following text have the meanings assigned to them
  8. # in the OASIS Intellectual Property Rights Policy (the "OASIS IPR Policy"). The
  9. # full Policy may be found at the OASIS website.
  10. #
  11. # This document and translations of it may be copied and furnished to others, and
  12. # derivative works that comment on or otherwise explain it or assist in its
  13. # implementation may be prepared, copied, published, and distributed, in whole or
  14. # in part, without restriction of any kind, provided that the above copyright
  15. # notice and this section are included on all such copies and derivative works.
  16. # However, this document itself may not be modified in any way, including by
  17. # removing the copyright notice or references to OASIS, except as needed for the
  18. # purpose of developing any document or deliverable produced by an OASIS
  19. # Technical Committee (in which case the rules applicable to copyrights, as set
  20. # forth in the OASIS IPR Policy, must be followed) or as required to translate it
  21. # into languages other than English.
  22. #
  23. # The limited permissions granted above are perpetual and will not be revoked by
  24. # OASIS or its successors or assigns.
  25. #
  26. # This document and the information contained herein is provided on an "AS IS"
  27. # basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
  28. # LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT
  29. # INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
  30. # FITNESS FOR A PARTICULAR PURPOSE.
  31. namespace anim = "urn:oasis:names:tc:opendocument:xmlns:animation:1.0"
  32. namespace calcext =
  33. "urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
  34. namespace chart = "urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
  35. namespace chartooo = "http://openoffice.org/2010/chart"
  36. namespace config = "urn:oasis:names:tc:opendocument:xmlns:config:1.0"
  37. namespace css3t = "http://www.w3.org/TR/css3-text/"
  38. namespace db = "urn:oasis:names:tc:opendocument:xmlns:database:1.0"
  39. namespace dc = "http://purl.org/dc/elements/1.1/"
  40. namespace dr3d = "urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
  41. namespace draw = "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
  42. namespace drawooo = "http://openoffice.org/2010/draw"
  43. namespace field =
  44. "urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0"
  45. namespace fo =
  46. "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
  47. namespace form = "urn:oasis:names:tc:opendocument:xmlns:form:1.0"
  48. namespace grddl = "http://www.w3.org/2003/g/data-view#"
  49. namespace loext =
  50. "urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
  51. namespace math = "http://www.w3.org/1998/Math/MathML"
  52. namespace meta = "urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
  53. namespace number = "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
  54. namespace office = "urn:oasis:names:tc:opendocument:xmlns:office:1.0"
  55. namespace officeooo = "http://openoffice.org/2009/office"
  56. namespace presentation =
  57. "urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
  58. namespace rng = "http://relaxng.org/ns/structure/1.0"
  59. namespace script = "urn:oasis:names:tc:opendocument:xmlns:script:1.0"
  60. namespace smil =
  61. "urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0"
  62. namespace style = "urn:oasis:names:tc:opendocument:xmlns:style:1.0"
  63. namespace svg =
  64. "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
  65. namespace table = "urn:oasis:names:tc:opendocument:xmlns:table:1.0"
  66. namespace tableooo = "http://openoffice.org/2009/table"
  67. namespace text = "urn:oasis:names:tc:opendocument:xmlns:text:1.0"
  68. namespace xforms = "http://www.w3.org/2002/xforms"
  69. namespace xhtml = "http://www.w3.org/1999/xhtml"
  70. namespace xlink = "http://www.w3.org/1999/xlink"
  71. include "OpenDocument-schema-v1.3.rnc" {
  72. office-document-common-attrs =
  73. attribute office:version {
  74. # FIXME remove this hack once we write 1.3
  75. "1.3" | "1.2"
  76. }
  77. & attribute grddl:transformation {
  78. list { anyIRI* }
  79. }?
  80. style-graphic-properties-attlist =
  81. attribute draw:stroke { "none" | "dash" | "solid" }?
  82. & attribute draw:stroke-dash { styleNameRef }?
  83. & attribute draw:stroke-dash-names { styleNameRefs }?
  84. & attribute svg:stroke-width { length }?
  85. & attribute svg:stroke-color { color }?
  86. & attribute draw:marker-start { styleNameRef }?
  87. & attribute draw:marker-end { styleNameRef }?
  88. & attribute draw:marker-start-width { length }?
  89. & attribute draw:marker-end-width { length }?
  90. & attribute draw:marker-start-center { boolean }?
  91. & attribute draw:marker-end-center { boolean }?
  92. & attribute svg:stroke-opacity {
  93. xsd:double { minInclusive = "0" maxInclusive = "1" }
  94. | zeroToHundredPercent
  95. }?
  96. & attribute draw:stroke-linejoin {
  97. "miter" | "round" | "bevel" | "middle" | "none"
  98. }?
  99. & attribute svg:stroke-linecap { "butt" | "square" | "round" }?
  100. & attribute draw:symbol-color { color }?
  101. & attribute text:animation {
  102. "none" | "scroll" | "alternate" | "slide"
  103. }?
  104. & attribute text:animation-direction {
  105. "left" | "right" | "up" | "down"
  106. }?
  107. & attribute text:animation-start-inside { boolean }?
  108. & attribute text:animation-stop-inside { boolean }?
  109. & attribute text:animation-repeat { nonNegativeInteger }?
  110. & attribute text:animation-delay { duration }?
  111. & attribute text:animation-steps { length }?
  112. & attribute draw:auto-grow-width { boolean }?
  113. & attribute draw:auto-grow-height { boolean }?
  114. & # FIXME remove this once the export bug is fixed
  115. attribute draw:fit-to-size {
  116. "true" | "false" | "all" | "shrink-to-fit"
  117. }?
  118. & attribute draw:fit-to-contour { boolean }?
  119. & attribute draw:textarea-vertical-align {
  120. "top" | "middle" | "bottom" | "justify"
  121. }?
  122. & attribute draw:textarea-horizontal-align {
  123. "left" | "center" | "right" | "justify"
  124. }?
  125. & attribute fo:wrap-option { "no-wrap" | "wrap" }?
  126. & attribute style:shrink-to-fit { boolean }?
  127. & attribute draw:color-mode {
  128. "greyscale" | "mono" | "watermark" | "standard"
  129. }?
  130. & attribute draw:color-inversion { boolean }?
  131. & attribute draw:luminance { signedZeroToHundredPercent }
  132. # https://issues.oasis-open.org/browse/OFFICE-3821
  133. ?
  134. & attribute draw:contrast { percent }?
  135. & attribute draw:gamma { percent }?
  136. & attribute draw:red { signedZeroToHundredPercent }?
  137. & attribute draw:green { signedZeroToHundredPercent }?
  138. & attribute draw:blue { signedZeroToHundredPercent }?
  139. & attribute draw:image-opacity { zeroToHundredPercent }?
  140. & attribute draw:shadow { "visible" | "hidden" }?
  141. & attribute draw:shadow-offset-x { length }?
  142. & attribute draw:shadow-offset-y { length }?
  143. & attribute draw:shadow-color { color }?
  144. & attribute draw:shadow-opacity { zeroToHundredPercent }?
  145. & # TODO: no proposal for loext:shadow-blur
  146. attribute loext:shadow-blur { length }?
  147. & attribute draw:start-line-spacing-horizontal { distance }?
  148. & attribute draw:start-line-spacing-vertical { distance }?
  149. & attribute draw:end-line-spacing-horizontal { distance }?
  150. & attribute draw:end-line-spacing-vertical { distance }?
  151. & attribute draw:line-distance { distance }?
  152. & attribute draw:guide-overhang { length }?
  153. & attribute draw:guide-distance { distance }?
  154. & attribute draw:start-guide { length }?
  155. & attribute draw:end-guide { length }?
  156. & attribute draw:placing { "below" | "above" }?
  157. & attribute draw:parallel { boolean }?
  158. & attribute draw:measure-align {
  159. "automatic" | "left-outside" | "inside" | "right-outside"
  160. }?
  161. & attribute draw:measure-vertical-align {
  162. "automatic" | "above" | "below" | "center"
  163. }?
  164. & attribute draw:unit {
  165. "automatic"
  166. | "mm"
  167. | "cm"
  168. | "m"
  169. | "km"
  170. | "pt"
  171. | "pc"
  172. | "inch"
  173. | "ft"
  174. | "mi"
  175. }?
  176. & attribute draw:show-unit { boolean }?
  177. & attribute draw:decimal-places { nonNegativeInteger }?
  178. & attribute draw:caption-type {
  179. "straight-line" | "angled-line" | "angled-connector-line"
  180. }?
  181. & attribute draw:caption-angle-type { "fixed" | "free" }?
  182. & attribute draw:caption-angle { angle }?
  183. & attribute draw:caption-gap { distance }?
  184. & attribute draw:caption-escape-direction {
  185. "horizontal" | "vertical" | "auto"
  186. }?
  187. & attribute draw:caption-escape { length | percent }?
  188. & attribute draw:caption-line-length { length }?
  189. & attribute draw:caption-fit-line-length { boolean }?
  190. & attribute dr3d:horizontal-segments { nonNegativeInteger }?
  191. & attribute dr3d:vertical-segments { nonNegativeInteger }?
  192. & attribute dr3d:edge-rounding { percent }?
  193. & attribute dr3d:edge-rounding-mode { "correct" | "attractive" }?
  194. & attribute dr3d:back-scale { percent }?
  195. & attribute dr3d:depth { length }?
  196. & attribute dr3d:backface-culling { "enabled" | "disabled" }?
  197. & attribute dr3d:end-angle { angle }?
  198. & attribute dr3d:close-front { boolean }?
  199. & attribute dr3d:close-back { boolean }?
  200. & attribute dr3d:lighting-mode { "standard" | "double-sided" }?
  201. & attribute dr3d:normals-kind { "object" | "flat" | "sphere" }?
  202. & attribute dr3d:normals-direction { "normal" | "inverse" }?
  203. & attribute dr3d:texture-generation-mode-x {
  204. "object" | "parallel" | "sphere"
  205. }?
  206. & attribute dr3d:texture-generation-mode-y {
  207. "object" | "parallel" | "sphere"
  208. }?
  209. & attribute dr3d:texture-kind {
  210. "luminance" | "intensity" | "color"
  211. }?
  212. & attribute dr3d:texture-filter { "enabled" | "disabled" }?
  213. & attribute dr3d:texture-mode { "replace" | "modulate" | "blend" }?
  214. & attribute dr3d:ambient-color { color }?
  215. & attribute dr3d:emissive-color { color }?
  216. & attribute dr3d:specular-color { color }?
  217. & attribute dr3d:diffuse-color { color }?
  218. & attribute dr3d:shininess { percent }?
  219. & attribute dr3d:shadow { "visible" | "hidden" }?
  220. & common-draw-rel-size-attlist
  221. & attribute fo:min-width { length | percent }?
  222. & attribute fo:min-height { length | percent }?
  223. & attribute fo:max-height { length | percent }?
  224. & attribute fo:max-width { length | percent }?
  225. & common-horizontal-margin-attlist
  226. & common-vertical-margin-attlist
  227. & common-margin-attlist
  228. & attribute style:print-content { boolean }?
  229. & attribute style:protect {
  230. "none"
  231. | list { ("content" | "position" | "size")+ }
  232. }?
  233. & attribute style:horizontal-pos {
  234. "left"
  235. | "center"
  236. | "right"
  237. | "from-left"
  238. | "inside"
  239. | "outside"
  240. | "from-inside"
  241. }?
  242. & attribute svg:x { coordinate }?
  243. & attribute style:horizontal-rel {
  244. "page"
  245. | "page-content"
  246. | "page-start-margin"
  247. | "page-end-margin"
  248. | "frame"
  249. | "frame-content"
  250. | "frame-start-margin"
  251. | "frame-end-margin"
  252. | "paragraph"
  253. | "paragraph-content"
  254. | "paragraph-start-margin"
  255. | "paragraph-end-margin"
  256. | "char"
  257. }?
  258. & common-vertical-pos-attlist
  259. & common-vertical-rel-attlist
  260. & common-text-anchor-attlist
  261. & common-border-attlist
  262. & common-border-line-width-attlist
  263. & common-padding-attlist
  264. & common-shadow-attlist
  265. & common-background-color-attlist
  266. & common-background-transparency-attlist
  267. & common-editable-attlist
  268. & attribute style:wrap {
  269. "none"
  270. | "left"
  271. | "right"
  272. | "parallel"
  273. | "dynamic"
  274. | "run-through"
  275. | "biggest"
  276. }?
  277. & attribute style:wrap-dynamic-threshold { nonNegativeLength }?
  278. & attribute style:number-wrapped-paragraphs {
  279. "no-limit" | positiveInteger
  280. }?
  281. & attribute style:wrap-contour { boolean }?
  282. & attribute style:wrap-contour-mode { "full" | "outside" }?
  283. & attribute style:run-through { "foreground" | "background" }?
  284. & attribute style:flow-with-text { boolean }?
  285. & attribute style:overflow-behavior {
  286. "clip" | "auto-create-new-frame"
  287. }?
  288. & attribute style:mirror {
  289. "none"
  290. | "vertical"
  291. | horizontal-mirror
  292. | list { "vertical", horizontal-mirror }
  293. | list { horizontal-mirror, "vertical" }
  294. }?
  295. & attribute fo:clip { "auto" | clipShape }?
  296. & attribute draw:wrap-influence-on-position {
  297. "iterative" | "once-concurrent" | "once-successive"
  298. }?
  299. & common-writing-mode-attlist
  300. & attribute draw:frame-display-scrollbar { boolean }?
  301. & attribute draw:frame-display-border { boolean }?
  302. & attribute draw:frame-margin-horizontal { nonNegativePixelLength }?
  303. & attribute draw:frame-margin-vertical { nonNegativePixelLength }?
  304. & attribute draw:visible-area-left { nonNegativeLength }?
  305. & attribute draw:visible-area-top { nonNegativeLength }?
  306. & attribute draw:visible-area-width { positiveLength }?
  307. & attribute draw:visible-area-height { positiveLength }?
  308. & attribute draw:draw-aspect {
  309. "content" | "thumbnail" | "icon" | "print-view"
  310. }?
  311. & attribute draw:ole-draw-aspect { nonNegativeInteger }?
  312. & # https://issues.oasis-open.org/browse/OFFICE-4047
  313. attribute loext:allow-overlap { boolean }?
  314. & # TODO: no proposal for loext:glow*
  315. attribute loext:glow-radius { length }?
  316. & attribute loext:glow-color { color }?
  317. & attribute loext:glow-transparency { zeroToHundredPercent }?
  318. & # TODO: no proposal for loext:softedge-radius
  319. attribute loext:softedge-radius { length }?
  320. draw-text =
  321. (text-p
  322. | text-list
  323. | # https://issues.oasis-open.org/browse/OFFICE-3761
  324. loext-table)*
  325. office-annotation-attlist &=
  326. attribute office:display { boolean }?
  327. & common-office-annotation-name-attlist?
  328. & attribute loext:resolved { boolean }?
  329. style-style-content =
  330. (attribute style:family { "text" },
  331. style-text-properties?)
  332. | (attribute style:family { "paragraph" },
  333. # TODO no proposal
  334. loext-graphic-properties?,
  335. style-paragraph-properties?,
  336. style-text-properties?)
  337. | (attribute style:family { "section" },
  338. style-section-properties?)
  339. | (attribute style:family { "ruby" },
  340. style-ruby-properties?)
  341. | (attribute style:family { "table" },
  342. style-table-properties?)
  343. | (attribute style:family { "table-column" },
  344. style-table-column-properties?)
  345. | (attribute style:family { "table-row" },
  346. style-table-row-properties?)
  347. | (attribute style:family { "table-cell" },
  348. # TODO no proposal
  349. loext-graphic-properties?,
  350. style-table-cell-properties?,
  351. style-paragraph-properties?,
  352. style-text-properties?)
  353. | (attribute style:family { "graphic" | "presentation" },
  354. style-graphic-properties?,
  355. style-paragraph-properties?,
  356. style-text-properties?)
  357. | (attribute style:family { "drawing-page" },
  358. style-drawing-page-properties?)
  359. | (attribute style:family { "chart" },
  360. style-chart-properties?,
  361. style-graphic-properties?,
  362. style-paragraph-properties?,
  363. style-text-properties?)
  364. table-table-template =
  365. element table:table-template {
  366. table-table-template-attlist,
  367. table-first-row?,
  368. table-last-row?,
  369. table-first-column?,
  370. table-last-column?,
  371. table-body,
  372. table-even-rows?,
  373. table-odd-rows?,
  374. table-even-columns?,
  375. table-odd-columns?,
  376. table-background?,
  377. # TODO no proposal
  378. table-first-row-even-column?,
  379. table-last-row-even-column?,
  380. table-first-row-end-column?,
  381. table-first-row-start-column?,
  382. table-last-row-end-column?,
  383. table-last-row-start-column?
  384. }
  385. draw-frame =
  386. element draw:frame {
  387. common-draw-shape-with-text-and-styles-attlist,
  388. common-draw-position-attlist,
  389. common-draw-rel-size-attlist,
  390. common-draw-caption-id-attlist,
  391. presentation-shape-attlist,
  392. draw-frame-attlist,
  393. (draw-text-box
  394. | draw-image
  395. | draw-object
  396. | draw-object-ole
  397. | draw-applet
  398. | draw-floating-frame
  399. | draw-plugin
  400. | table-table)*,
  401. office-event-listeners?,
  402. draw-glue-point*,
  403. draw-image-map?,
  404. svg-title?,
  405. svg-desc?,
  406. (draw-contour-polygon | draw-contour-path)?,
  407. # TODO no proposal
  408. loext-signatureline?,
  409. loext-qrcode?
  410. }
  411. common-value-and-type-attlist =
  412. (attribute office:value-type { "float" },
  413. attribute calcext:value-type { "float" }?,
  414. attribute office:value { double })
  415. | (attribute office:value-type { "percentage" },
  416. attribute calcext:value-type { "percentage" }?,
  417. attribute office:value { double })
  418. | (attribute office:value-type { "currency" },
  419. attribute calcext:value-type { "currency" }?,
  420. attribute office:value { double },
  421. attribute office:currency { \string }?)
  422. | (attribute office:value-type { "date" },
  423. attribute calcext:value-type { "date" }?,
  424. attribute office:date-value { dateOrDateTime })
  425. | (attribute office:value-type { "time" },
  426. attribute calcext:value-type { "time" }?,
  427. attribute office:time-value { duration })
  428. | (attribute office:value-type { "boolean" },
  429. attribute calcext:value-type { "boolean" }?,
  430. attribute office:boolean-value { boolean })
  431. | (attribute office:value-type { "string" },
  432. # OFFICE-3759
  433. attribute calcext:value-type { "string" | "error" }?,
  434. attribute office:string-value { \string }?)
  435. chart-axis =
  436. element chart:axis {
  437. chart-axis-attlist,
  438. # OFFICE-2119
  439. ((attribute chartooo:axis-type { "auto" },
  440. chartooo-date-scale?)
  441. | (attribute chartooo:axis-type { "date" },
  442. chartooo-date-scale)
  443. | attribute chartooo:axis-type { "text" })?,
  444. chart-title?,
  445. chart-categories?,
  446. chart-grid*
  447. }
  448. table-table =
  449. element table:table {
  450. table-table-attlist,
  451. table-title?,
  452. table-desc?,
  453. # TODO add to proposal, OFFICE-2112
  454. table-table-protection?,
  455. table-table-source?,
  456. office-dde-source?,
  457. table-scenario?,
  458. office-forms?,
  459. table-shapes?,
  460. table-columns-and-groups,
  461. table-rows-and-groups,
  462. table-named-expressions?,
  463. # TODO no proposal, this is wild guessing, OFFICE-3785
  464. element calcext:conditional-formats {
  465. element calcext:conditional-format {
  466. attribute calcext:target-range-address { cellRangeAddress },
  467. (element calcext:condition {
  468. attribute calcext:apply-style-name { styleNameRef },
  469. attribute calcext:value { \string },
  470. attribute calcext:base-cell-address { cellAddress }
  471. }+
  472. | element calcext:data-bar {
  473. attribute calcext:max-length { \string },
  474. attribute calcext:negative-color { color },
  475. attribute calcext:positive-color { color },
  476. attribute calcext:axis-color { color },
  477. attribute calcext:axis-position { "middle" }?,
  478. element calcext:formatting-entry {
  479. attribute calcext:value { \string },
  480. attribute calcext:type {
  481. "auto-minimum"
  482. | "auto-maximum"
  483. | "minimum"
  484. | "maximum"
  485. | "percent"
  486. | "percentile"
  487. | "number"
  488. | "formula"
  489. }
  490. },
  491. element calcext:formatting-entry {
  492. attribute calcext:value { \string },
  493. attribute calcext:type {
  494. "auto-minimum"
  495. | "auto-maximum"
  496. | "minimum"
  497. | "maximum"
  498. | "percent"
  499. | "percentile"
  500. | "number"
  501. | "formula"
  502. }
  503. }
  504. }
  505. | element calcext:color-scale {
  506. element calcext:color-scale-entry {
  507. attribute calcext:value { \string },
  508. attribute calcext:type {
  509. "minimum"
  510. | "maximum"
  511. | "percent"
  512. | "percentile"
  513. | "number"
  514. | "formula"
  515. },
  516. attribute calcext:color { color }
  517. },
  518. element calcext:color-scale-entry {
  519. attribute calcext:value { \string },
  520. attribute calcext:type {
  521. "minimum"
  522. | "maximum"
  523. | "percent"
  524. | "percentile"
  525. | "number"
  526. | "formula"
  527. },
  528. attribute calcext:color { color }
  529. },
  530. element calcext:color-scale-entry {
  531. attribute calcext:value { \string },
  532. attribute calcext:type {
  533. "minimum"
  534. | "maximum"
  535. | "percent"
  536. | "percentile"
  537. | "number"
  538. | "formula"
  539. },
  540. attribute calcext:color { color }
  541. }?
  542. })
  543. }+
  544. }?
  545. }
  546. # TODO no proposal
  547. draw-object =
  548. element draw:object {
  549. draw-object-attlist,
  550. loext-text,
  551. (common-draw-data-attlist | office-document | math-math)
  552. }
  553. draw-object-ole =
  554. element draw:object-ole {
  555. draw-object-ole-attlist,
  556. loext-text,
  557. (common-draw-data-attlist | office-binary-data)
  558. }
  559. # FIXME: one test exports 250 here, which is probably a bug
  560. fontWeight =
  561. "normal"
  562. | "bold"
  563. | "100"
  564. | "200"
  565. | "250"
  566. | "300"
  567. | "400"
  568. | "500"
  569. | "600"
  570. | "700"
  571. | "800"
  572. | "900"
  573. }
  574. # TODO no proposal
  575. loext-p =
  576. element loext:p { paragraph-attrs, paragraph-content-or-hyperlink* }
  577. loext-text = (loext-p | text-list | loext-table)*
  578. # OFFICE-2119
  579. chartooo-date-scale =
  580. element chartooo:date-scale {
  581. attribute chart:base-time-unit { chart-time-unit }?
  582. & (attribute chart:major-interval-value { positiveInteger },
  583. attribute chart:major-interval-unit { chart-time-unit })?
  584. & (attribute chart:minor-interval-value { positiveInteger },
  585. attribute chart:minor-interval-unit { chart-time-unit })?
  586. }
  587. chart-time-unit = "days" | "months" | "years"
  588. # TODO no proposal
  589. loext-signatureline =
  590. element loext:signatureline {
  591. attribute loext:id { \string },
  592. attribute loext:suggested-signer-name { \string },
  593. attribute loext:suggested-signer-title { \string },
  594. attribute loext:suggested-signer-email { \string },
  595. attribute loext:signing-instructions { \string },
  596. attribute loext:show-sign-date { boolean },
  597. attribute loext:can-add-comment { boolean }
  598. }
  599. loext-qrcode =
  600. element loext:qrcode {
  601. attribute office:string-value { \string },
  602. attribute loext:qrcode-errorcorrection {
  603. "low" | "medium" | "quartile" | "high"
  604. },
  605. attribute loext:qrcode-border { nonNegativeInteger }
  606. }
  607. # https://issues.oasis-open.org/browse/OFFICE-3761
  608. loext-table =
  609. element loext:table {
  610. table-table-attlist,
  611. table-title?,
  612. table-desc?,
  613. table-table-source?,
  614. office-dde-source?,
  615. table-scenario?,
  616. office-forms?,
  617. table-shapes?,
  618. loext-columns-and-groups,
  619. loext-rows-and-groups,
  620. table-named-expressions?
  621. }
  622. loext-rows-and-groups = (table-table-row-group | loext-rows-no-group)+
  623. loext-rows-no-group =
  624. (loext-rows, (table-table-header-rows, loext-rows?)?)
  625. | (table-table-header-rows, loext-rows?)
  626. loext-rows =
  627. table-table-rows | (text-soft-page-break?, loext-table-row)+
  628. loext-table-row =
  629. element loext:table-row {
  630. table-table-row-attlist,
  631. (loext-table-cell | loext-covered-table-cell)+
  632. }
  633. loext-table-cell =
  634. element loext:table-cell {
  635. table-table-cell-attlist,
  636. table-table-cell-attlist-extra,
  637. table-table-cell-content
  638. }
  639. loext-covered-table-cell =
  640. element loext:covered-table-cell {
  641. table-table-cell-attlist, table-table-cell-content
  642. }
  643. loext-columns-and-groups =
  644. (table-table-column-group | loext-columns-no-group)+
  645. loext-columns-no-group =
  646. (loext-columns, (table-table-header-columns, loext-columns?)?)
  647. | (table-table-header-columns, loext-columns?)
  648. loext-columns = loext-table-columns | loext-table-column+
  649. loext-table-columns =
  650. element loext:table-columns { loext-table-column+ }
  651. loext-table-column =
  652. element loext:table-column { table-table-column-attlist, empty }
  653. loext-graphic-properties =
  654. element loext:graphic-properties {
  655. style-graphic-properties-content-strict
  656. }
  657. table-first-row-even-column =
  658. element loext:first-row-even-column {
  659. common-table-template-attlist, empty
  660. }
  661. table-last-row-even-column =
  662. element loext:last-row-even-column {
  663. common-table-template-attlist, empty
  664. }
  665. table-first-row-end-column =
  666. element loext:first-row-end-column {
  667. common-table-template-attlist, empty
  668. }
  669. table-first-row-start-column =
  670. element loext:first-row-start-column {
  671. common-table-template-attlist, empty
  672. }
  673. table-last-row-end-column =
  674. element loext:last-row-end-column {
  675. common-table-template-attlist, empty
  676. }
  677. table-last-row-start-column =
  678. element loext:last-row-start-column {
  679. common-table-template-attlist, empty
  680. }
  681. common-draw-rel-size-attlist &=
  682. # OFFICE-3854
  683. attribute loext:rel-width-rel {
  684. "page"
  685. | [
  686. # TODO layout-environment ?
  687. ]
  688. "paragraph"
  689. }?,
  690. attribute loext:rel-height-rel { "page" | "paragraph" }?
  691. common-svg-font-face-xlink-attlist &=
  692. # TODO no proposal
  693. attribute loext:font-style { fontStyle }?,
  694. attribute loext:font-weight { fontWeight }?
  695. # TODO no proposal
  696. # there's no ref-attrs so add it here
  697. text-common-ref-content &=
  698. attribute loext:reference-language { language }?
  699. style-list-level-label-alignment-attlist &=
  700. # TODO no proposal
  701. attribute loext:label-followed-by {
  702. "listtab" | "space" | "nothing" | "newline"
  703. }?
  704. style-ruby-properties-attlist &=
  705. # TODO proposal, OFFICE-3944
  706. attribute loext:ruby-position {
  707. "above" | "below" | "inter-character"
  708. }?
  709. style-text-properties-attlist &=
  710. # TODO no proposal
  711. attribute officeooo:rsid { \string }?,
  712. attribute officeooo:paragraph-rsid { \string }?,
  713. # https://issues.oasis-open.org/browse/OFFICE-4049
  714. attribute loext:opacity { zeroToHundredPercent }?
  715. style-text-properties-attlist &=
  716. # OFFICE-3843
  717. attribute loext:padding { nonNegativeLength }?,
  718. attribute loext:padding-left { nonNegativeLength }?,
  719. attribute loext:padding-right { nonNegativeLength }?,
  720. attribute loext:padding-top { nonNegativeLength }?,
  721. attribute loext:padding-bottom { nonNegativeLength }?,
  722. attribute loext:border { \string }?,
  723. attribute loext:border-left { \string }?,
  724. attribute loext:border-right { \string }?,
  725. attribute loext:border-top { \string }?,
  726. attribute loext:border-bottom { \string }?,
  727. attribute loext:shadow { shadowType }?
  728. # TODO no proposal
  729. style-chart-properties-attlist &=
  730. attribute loext:try-staggering-first { boolean }?
  731. # TODO no proposal
  732. style-chart-properties-attlist &=
  733. attribute loext:std-weight { \string }?
  734. # TODO no proposal
  735. chart-series-attlist &= attribute loext:label-string { \string }?
  736. # OFFICE-1148
  737. style-chart-properties-attlist &=
  738. attribute loext:regression-max-degree { positiveInteger }?,
  739. attribute loext:regression-force-intercept { boolean }?,
  740. attribute loext:regression-intercept-value { double }?,
  741. attribute loext:regression-name { \string }?,
  742. attribute loext:regression-period { \string }?,
  743. attribute loext:regression-extrapolate-forward { \string }?,
  744. attribute loext:regression-extrapolate-backward { \string }?
  745. # TODO no proposal
  746. table-data-pilot-field-attlist &=
  747. attribute tableooo:display-name { \string }?
  748. # TODO no proposal, 9009663d
  749. chart-chart-attlist &= attribute loext:data-pilot-source { \string }?
  750. # OFFICE-2112, TODO half of this missing in proposal
  751. table-table-protection =
  752. element loext:table-protection {
  753. attribute loext:select-protected-cells { boolean }?,
  754. attribute loext:select-unprotected-cells { boolean }?,
  755. attribute loext:insert-columns { boolean }?,
  756. attribute loext:insert-rows { boolean }?,
  757. attribute loext:delete-columns { boolean }?,
  758. attribute loext:delete-rows { boolean }?
  759. }
  760. office-spreadsheet-attlist &=
  761. attribute loext:protection-key-digest-algorithm-2 { anyURI }?
  762. table-table-attlist &=
  763. attribute loext:protection-key-digest-algorithm-2 { anyURI }?
  764. # https://issues.oasis-open.org/browse/OFFICE-2317
  765. vertJustifyValues = "auto" | "distribute"
  766. common-text-justify =
  767. attribute css3t:text-justify { vertJustifyValues }?
  768. style-vertical-justify =
  769. attribute loext:vertical-justify { vertJustifyValues }?,
  770. attribute style:vertical-justify { vertJustifyValues }?
  771. style-paragraph-properties-attlist &=
  772. (common-text-justify, style-vertical-justify)?
  773. style-table-cell-properties-attlist &=
  774. (common-text-justify, style-vertical-justify)?
  775. number-fraction-attlist &=
  776. # OFFICE-3695
  777. # TODO no proposal, 1544a26ac9f7dd60605dd21e9cbe29d490aafdce
  778. attribute loext:max-numerator-digits { positiveInteger }?
  779. # TODO no proposal
  780. table-data-pilot-level-attlist &=
  781. attribute calcext:repeat-item-labels { boolean }?
  782. # TODO no proposal
  783. draw-enhanced-geometry-attlist &=
  784. attribute drawooo:sub-view-size { \string }?,
  785. attribute drawooo:enhanced-path { \string }?
  786. # TODO no proposal
  787. draw-custom-shape-attlist &= common-draw-rel-size-attlist
  788. # TODO no proposal
  789. style-page-layout-properties-attlist &=
  790. style-graphic-fill-properties-attlist
  791. style-header-footer-properties-attlist &=
  792. style-graphic-fill-properties-attlist
  793. # TODO no proposal
  794. text-index-entry-tab-stop-attrs &= attribute style:with-tab { boolean }?
  795. # TODO no proposal
  796. style-text-properties-attlist &=
  797. attribute loext:char-shading-value { \string }?
  798. # TODO no proposal
  799. text-bookmark-start-attlist &=
  800. (attribute loext:hidden { boolean },
  801. attribute loext:condition { \string }?)?
  802. # TODO no proposal; see 7a5d79f2297a43d0a854e304b0792164272edfe0
  803. # FIXME this is almost certainly incomplete: need to figure out which elements can have this and which named pattern can be extended with it to get exactly these elements
  804. form-checkbox-attlist &= attribute form:input-required { boolean }?
  805. # https://issues.oasis-open.org/browse/OFFICE-4030
  806. common-writing-mode-attlist &= attribute loext:writing-mode { "bt-lr" }?
  807. # https://issues.oasis-open.org/browse/OFFICE-4073
  808. common-vertical-rel-attlist &=
  809. attribute loext:vertical-rel {
  810. "page-content-top" | "page-content-bottom"
  811. }?
  812. # https://issues.oasis-open.org/browse/OFFICE-4105
  813. style-page-layout-properties-attlist &=
  814. attribute loext:margin-gutter { length }?
  815. # just a test-case for user-defined attributes, move along, nothing to see here...
  816. style-table-cell-properties-attlist &= attribute proName { \string }?
  817. # TODO no proposal
  818. chart-data-point-attlist &=
  819. attribute loext:custom-label-field { \string }?
  820. # TODO no proposal
  821. style-text-properties-attlist &=
  822. attribute loext:hyphenation-no-caps { boolean }?
  823. # TODO no proposal
  824. chart-data-point-attlist &=
  825. (attribute loext:custom-label-pos-x { double },
  826. attribute loext:custom-label-pos-y { double })?
  827. # TODO no proposal
  828. chart-legend-attlist &= attribute loext:overlay { boolean }?
  829. # https://issues.oasis-open.org/browse/OFFICE-3936
  830. style-chart-properties-attlist &=
  831. attribute loext:major-origin { double }?
  832. # TODO no proposal
  833. text-index-entry-chapter-attrs &=
  834. attribute loext:outline-content-visible { boolean }?
  835. # https://issues.oasis-open.org/browse/OFFICE-2096
  836. paragraph-content |=
  837. element field:fieldmark-start {
  838. attribute text:name { \string },
  839. attribute field:type {
  840. # TODO <rng:ref name="namespacedToken"/>
  841. \string
  842. },
  843. element field:param {
  844. attribute field:name { \string },
  845. attribute field:value { \string }
  846. }*
  847. }
  848. paragraph-content |= element field:fieldmark-end { empty }
  849. paragraph-content |=
  850. element field:fieldmark {
  851. attribute text:name { \string },
  852. attribute field:type {
  853. # TODO <rng:ref name="namespacedToken"/>
  854. \string
  855. },
  856. element field:param {
  857. attribute field:name { \string },
  858. attribute field:value { \string }
  859. }*
  860. }
  861. # TODO no proposal
  862. animation-element |=
  863. element loext:animatePhysics {
  864. common-anim-target-attlist,
  865. common-timing-attlist,
  866. animate-physics-attlist
  867. }
  868. animate-physics-attlist =
  869. # default value: 0
  870. attribute loext:velocity-x { double }?,
  871. # default value: 0
  872. attribute loext:velocity-y { double }?,
  873. # default value: 0.1
  874. attribute loext:bounciness {
  875. xsd:double { minInclusive = "0" maxInclusive = "1" }
  876. }?,
  877. # default value: 1
  878. attribute loext:density {
  879. xsd:double { minInclusive = "0" }
  880. }?
  881. # TODO no proposal
  882. style-chart-properties-attlist &=
  883. attribute loext:custom-leader-lines { boolean }?
  884. # TODO no proposal
  885. style-chart-properties-attlist &=
  886. attribute loext:external-data { \string }?