plugin.rnc 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # This file is part of the DITA Open Toolkit project.
  2. #
  3. # Copyright 2014 Jarno Elovirta
  4. #
  5. # See the accompanying LICENSE file for applicable license.
  6. plugin =
  7. element plugin {
  8. attribute id { xsd:NCName },
  9. attribute version { version }?,
  10. (feature | transtype | extension-point | require | metadata | template)*
  11. }
  12. feature =
  13. element feature {
  14. attribute extension { xsd:NCName },
  15. (attribute file { text }
  16. | (attribute value { text },
  17. attribute type { "file" | "text" }?))?,
  18. anyElement*
  19. }
  20. transtype =
  21. element transtype {
  22. attribute name {
  23. list { xsd:NCName+ }
  24. },
  25. attribute desc { text }?,
  26. attribute abstract { xsd:boolean }?,
  27. attribute extends {
  28. list { xsd:NCName+ }
  29. }?,
  30. param*
  31. }
  32. param =
  33. element param {
  34. attribute required { xsd:boolean }?,
  35. attribute deprecated { xsd:boolean }?,
  36. attribute name {
  37. list { xsd:NCName+ }
  38. }?,
  39. attribute desc { text }?,
  40. param.val
  41. }
  42. param.val |=
  43. attribute type { "enum" },
  44. val*
  45. param.val |=
  46. attribute type { "string" },
  47. val*
  48. param.val |= attribute type { "file" | "dir" | "uri" }
  49. val =
  50. element val {
  51. attribute desc { text }?,
  52. attribute default { xsd:boolean }?,
  53. text
  54. }
  55. extension-point =
  56. element extension-point {
  57. attribute id { xsd:NCName },
  58. attribute name { text }
  59. }
  60. require =
  61. element require {
  62. attribute plugin { xsd:NCName },
  63. attribute version { version }?,
  64. attribute importance { "required" | "optional" }?
  65. }
  66. version = text
  67. metadata =
  68. element metadata {
  69. attribute type { xsd:NCName },
  70. attribute value { text }
  71. }
  72. template =
  73. element template {
  74. attribute file { text }
  75. }
  76. anyElement =
  77. element * {
  78. (attribute * { text }
  79. | text
  80. | anyElement)*
  81. }
  82. start = plugin