step2.rnc 1.8 KB

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