step2.rnc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # This file is part of the DITA Open Toolkit project.
  2. #
  3. # Copyright 2013 Jarno Elovirta
  4. #
  5. # See the accompanying LICENSE file for applicable license.
  6. datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
  7. dita = element dita {
  8. debug,
  9. xmllang,
  10. attribute dir { "ltr" | "rtl" },
  11. (section | block | \text)+
  12. }
  13. ## Used for <section> and <example>. This can nest any of the following elements.
  14. section = element section {
  15. debug,
  16. xmllang,
  17. sectiontitle?,
  18. (block | \text)*
  19. }
  20. ## Used for the titles of <section> and <example>. This will nest the <text> element.
  21. sectiontitle = element sectiontitle {
  22. debug,
  23. xmllang,
  24. \text+
  25. }
  26. ## All other block-like elements. The reason section does not use <block>
  27. ## is that it maps well to troff-style sections that use the .SH macro
  28. ## for highlighting and indenting. This can nest any number of <block>
  29. ## or <text> elements. Attributes set lead-in text (such as list item numbers
  30. ## that must appear before the list item text), as well as indent values.
  31. ## Other attributes are described below.
  32. block = element block {
  33. debug?,
  34. style,
  35. xmllang,
  36. attribute xml:space { "preserve" | "default" }?,
  37. attribute leadin {text}?,
  38. attribute indent { xsd:int }?,
  39. attribute position {text}?,
  40. attribute compact { "yes" | "no" }?,
  41. (section | block | \text)+
  42. }
  43. ## All text nodes and phrases. This can include text or additional <text> elements.
  44. ## Text will be wrapped, with the width determined by the LINELENGTH parameter.
  45. ## Formatters such as troff may reflow the text as needed. Line breaks should only
  46. ## be forced in pre-formatted text, or between blocks.
  47. \text = element text {
  48. debug?,
  49. style,
  50. xmllang,
  51. (attribute scope {"external"}?,
  52. attribute href {xsd:anyURI}?,
  53. attribute format{text}?)?,
  54. (\text+ | text)
  55. }
  56. xmllang = (
  57. attribute xml:lang {text}?
  58. )
  59. style = (
  60. attribute style {text}?
  61. )
  62. debug = (
  63. attribute xtrf {text},
  64. attribute xtrc {text}
  65. )
  66. start = dita