aboutsummaryrefslogtreecommitdiff
path: root/CommonMark.dtd
blob: 9b3deaf53520a5b7ac9634cf7f6c2164ae659e3f (plain)
  1. <!-- DTD for CommonMark xml export format -->
  2. <!ENTITY % block
  3. 'block_quote|list|code_block|html|paragraph|header|hrule'>
  4. <!ENTITY % inline
  5. 'text|softbreak|linebreak|code|inline_html|emph|strong|link|image'>
  6. <!ELEMENT document (%block;)*>
  7. <!-- block elements -->
  8. <!ELEMENT block_quote (%block;)*>
  9. <!ELEMENT list (item)+>
  10. <!ATTLIST list
  11. type (bullet|ordered) #REQUIRED
  12. start CDATA #IMPLIED
  13. tight (true|false) #REQUIRED
  14. delimiter (period|paren) #IMPLIED>
  15. <!ELEMENT item (%block;)*>
  16. <!ELEMENT code_block (#PCDATA)>
  17. <!ATTLIST code_block
  18. xml:space CDATA #FIXED "preserve"
  19. info CDATA #IMPLIED>
  20. <!ELEMENT html (#PCDATA)>
  21. <!ATTLIST html
  22. xml:space CDATA #FIXED "preserve">
  23. <!ELEMENT paragraph (%inline;)*>
  24. <!ELEMENT header (%inline;)*>
  25. <!ATTLIST header
  26. level (1|2|3|4|5|6) #REQUIRED>
  27. <!ELEMENT hrule EMPTY>
  28. <!-- inline elements -->
  29. <!ELEMENT text (#PCDATA)>
  30. <!ELEMENT softbreak EMPTY>
  31. <!ELEMENT linebreak EMPTY>
  32. <!ELEMENT code (#PCDATA)>
  33. <!ATTLIST code
  34. xml:space CDATA #FIXED "preserve">
  35. <!ELEMENT inline_html (#PCDATA)>
  36. <!ATTLIST inline_html
  37. xml:space CDATA #FIXED "preserve">
  38. <!ELEMENT emph (%inline;)*>
  39. <!ELEMENT strong (%inline;)*>
  40. <!ELEMENT link (%inline;)*>
  41. <!ATTLIST link
  42. url CDATA #REQUIRED
  43. title CDATA #IMPLIED>
  44. <!ELEMENT image (%inline;)*>
  45. <!ATTLIST image
  46. url CDATA #REQUIRED
  47. title CDATA #IMPLIED>
  48. <!-- all elements can have a sourcepos attribute -->
  49. <!ATTLIST ANY sourcepos CDATA #IMPLIED>