grass-interface.dtd 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <!-- grass-interface.dtd
  2. Copyright (C) 2000-2007 by the GRASS Development Team
  3. Author: Jan-Oliver Wagner <jan intevation.de>
  4. Changes:
  5. 2007-10 by Martin Landa <landa.martin gmail.com>
  6. * added keywords element
  7. * added name element (fix for value element)
  8. 2007-04 by Daniel Calvelo <dca.gis gmail.com>
  9. * added guisection element
  10. * added name-description pair for value sets
  11. 2001-06-07 by Eric G. Miller <egm2 jps.net>
  12. * make <parameter-group> optional
  13. * move descriptions first, always optional
  14. * make <default> optional // Should it reference <value> ?
  15. 2001-07-09:
  16. * Make an explicit flag element
  17. * make keydesc and gispropmpt elements
  18. * move elements directly under "task"
  19. This program is free software under the GPL (>=v2)
  20. Read the file COPYING coming with GRASS for details.
  21. -->
  22. <!-- a grass-interface collect several tasks to
  23. customize a grass application.
  24. -->
  25. <!ELEMENT grass-interface (description? , task+)>
  26. <!ATTLIST grass-interface name CDATA #REQUIRED>
  27. <!-- a task describes the interface of a single
  28. GRASS command. It may consist of several
  29. groups of parameters. Grouping is only for
  30. semantic purposes in the (G)UI.
  31. The task may optionally have a description.
  32. The name of the task is the identifier
  33. for the GRASS command and is used
  34. to execute the task.
  35. -->
  36. <!ELEMENT task (description?, keywords?, parameter*, flag*, parameter-group*)>
  37. <!ATTLIST task name CDATA #REQUIRED>
  38. <!-- a parameter-group may be associated with a name,
  39. but the name is not necessary for running a
  40. GRASS command.
  41. The group consists of a number of parameters
  42. and may optionally have a description.
  43. -->
  44. <!ELEMENT parameter-group (description?, parameter*, flag*)>
  45. <!ATTLIST parameter-group name CDATA #IMPLIED>
  46. <!-- a parameter must have a name and a description.
  47. the name is the parameter identifier when calling
  48. the command.
  49. A default may be provided. values can be given
  50. as parameter options.
  51. Parameters can be optional and in that case can be
  52. ignored executing the task when not entered in the (G)UI.
  53. Any parameter has one of these (default is string):
  54. string : a string parameter.
  55. integer : a numeric integer parameter.
  56. float : a numeric float parameter.
  57. If multiple is "yes", then many values for the
  58. parameter may be given in a comma-seperated list
  59. -->
  60. <!ELEMENT parameter (description?, keydesc?, gisprompt?, default?, values?, guisection?)>
  61. <!ATTLIST parameter name CDATA #REQUIRED
  62. type (string | integer | float) "string"
  63. required (yes | no) "no"
  64. multiple (yes | no) "no">
  65. <!-- The "keydesc" defines a tuple for input, such as "x,y".
  66. The program expects a comma separated list with matching
  67. count of items (or multiples thereof, if multiple is true).
  68. -->
  69. <!ELEMENT keydesc (item+)>
  70. <!-- An "item" is a value for a tuple of keydesc.
  71. It must have an "order" attribute, to insure sort ordering
  72. -->
  73. <!ELEMENT item (#PCDATA)>
  74. <!ATTLIST item order CDATA #REQUIRED>
  75. <!-- The "gisprompt" is a three part description, used for map elements
  76. and files. It consists of a comma separated list of
  77. "age,element,prompt". "Age" is "new | old | any"; "element" is
  78. a grass map element such as "dig", and "prompt" is what to present
  79. to the user in a prompt, such as "vector"
  80. -->
  81. <!ELEMENT gisprompt EMPTY>
  82. <!ATTLIST gisprompt age (any | old | new | mapset) #REQUIRED
  83. element (cell | fcell | cellhd | cats | colr |
  84. colr2 | cell_misc | hist | paint |
  85. group | vector | windows | CDATA) #REQUIRED
  86. prompt CDATA #REQUIRED>
  87. <!-- A flag must have a name and should have a description.
  88. It's a toggle that is off by default
  89. -->
  90. <!ELEMENT flag (description?)>
  91. <!ATTLIST flag name CDATA #REQUIRED>
  92. <!-- a default of a parameter. Hopefully it does correspond
  93. with the parameter type. How to set up rules for that
  94. (same problem for <value>)?
  95. -->
  96. <!ELEMENT default (#PCDATA)>
  97. <!-- the GUI section where the parameter would appear
  98. -->
  99. <!ELEMENT guisection (#PCDATA)>
  100. <!-- contains a number of single values. Values may have name and description.
  101. -->
  102. <!ELEMENT values (value+)>
  103. <!-- a potential value for a parameter. Hopefully
  104. it does correpond to the parameter type.
  105. How to set up rules for that (same problem for
  106. <default>)?
  107. -->
  108. <!ELEMENT value (name, description?)>
  109. <!ELEMENT name (#PCDATA)>
  110. <!-- common elements -->
  111. <!-- text that describes a grass-interface, task,
  112. parameter-group or parameter.
  113. -->
  114. <!ELEMENT description (#PCDATA)>
  115. <!-- list of keywords that describes a task
  116. -->
  117. <!ELEMENT keywords (#PCDATA)>
  118. <!-- option inter-dependency rules
  119. -->
  120. <!ELEMENT rules (rule+)>
  121. <!-- an option inter-dependency rule
  122. -->
  123. <!ELEMENT rule (rule-flag*, rule-option*)>
  124. <!ATTLIST rule type (exclusive | required | requires | requires-all |
  125. excludes | collective) #REQUIRED>
  126. <!-- a flag name
  127. -->
  128. <!ELEMENT rule-flag EMPTY>
  129. <!ATTLIST rule-flag key CDATA #REQUIRED>
  130. <!-- an option name
  131. -->
  132. <!ELEMENT rule-option EMPTY>
  133. <!ATTLIST rule-option key CDATA #REQUIRED>