document.dtd 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <!ELEMENT document (title, (annotation | chapter | TODO)*)>
  2. <!ATTLIST document
  3. xml:lang CDATA #REQUIRED
  4. version CDATA #IMPLIED
  5. status (Release | Draft) #IMPLIED>
  6. <!ENTITY % section-content "p | list | code-block | tty | note | precondition | postcondition | invariant | synopsis | TODO">
  7. <!ENTITY % text-with-markup "#PCDATA | tt | u | b | nt | link | xref | sign">
  8. <!ELEMENT chapter (title, (chapter | section | %section-content;)*)>
  9. <!ATTLIST chapter
  10. xml:id ID #REQUIRED>
  11. <!ELEMENT section (title, (%section-content;)*)>
  12. <!ELEMENT title (%text-with-markup;)*>
  13. <!ELEMENT tty (#PCDATA | nt)*>
  14. <!ELEMENT code-block (#PCDATA | nt)*>
  15. <!ATTLIST code-block
  16. lang CDATA #IMPLIED>
  17. <!ELEMENT p (%text-with-markup;)*>
  18. <!ELEMENT synopsis (prototype+, (p | precondition | postcondition | invariant | note | list)*)>
  19. <!ELEMENT prototype (#PCDATA | nt | sign)*>
  20. <!ELEMENT tt (#PCDATA | nt)*>
  21. <!ELEMENT u (#PCDATA | b | nt)*>
  22. <!ELEMENT b (#PCDATA | u | nt)*>
  23. <!ELEMENT nt (#PCDATA)>
  24. <!ELEMENT link (#PCDATA)>
  25. <!ATTLIST link
  26. href CDATA #IMPLIED>
  27. <!ELEMENT xref EMPTY>
  28. <!ATTLIST xref
  29. to IDREF #REQUIRED>
  30. <!ELEMENT list (item+)>
  31. <!ATTLIST list
  32. style (numbered | bulleted | nomarks) #REQUIRED>
  33. <!ELEMENT item (%text-with-markup; | %section-content;)*>
  34. <!ELEMENT note (%text-with-markup; | %section-content;)*>
  35. <!ELEMENT precondition (%text-with-markup; | %section-content;)*>
  36. <!ELEMENT postcondition (%text-with-markup; | %section-content;)*>
  37. <!ELEMENT invariant (%text-with-markup; | %section-content;)*>
  38. <!ELEMENT annotation (documentation*)>
  39. <!ELEMENT documentation (#PCDATA)> <!-- ANY ? -->
  40. <!ELEMENT sign (#PCDATA)>
  41. <!ELEMENT TODO (#PCDATA)>