Changes between Version 57 and Version 58 of TaggingPresets


Ignore:
Timestamp:
2014-10-29T11:29:12+01:00 (9 years ago)
Author:
stoecker
Comment:

Copy first set of information from XML

Legend:

Unmodified
Added
Removed
Modified
  • TaggingPresets

    v57 v58  
    3939== Develop a new preset – XML Format description ==
    4040
    41 The tagging preset description is in a very simple XML format. 
    42 
    43 See the comment section in **[source:trunk/data/defaultpresets.xml defaultpresets.xml]** for the **valid format description**.
     41The tagging preset description is in a very simple XML format.
     42
     43See the **[source:trunk/data/defaultpresets.xml defaultpresets.xml]** for an example covering all possibilities.
    4444
    4545The full XSD schema is available at the namespace URI (http://josm.openstreetmap.de/tagging-preset-1.0) as well as [source:trunk/data/tagging-preset.xsd the source repository].
     
    6767   Used to group items in sub menus. ''name'' is required, ''icon'' is optional attribute.
    6868 '''<item>'''::
    69    Every item is one annotation set to select from. ''name'' is required, ''icon'' is optional attribute.
     69   Every item is one annotation set to select from. ''name'' is required, ''type'' is recommended, ''icon'' is optional attribute.
    7070 '''<separator/>'''::
    7171   Insert a line separator into the menu.
     
    7676   Used to group some optional elements of an item. Possibly equivalent to <label text="Optional Attributes:"/>
    7777 '''<space />'''::
    78    Add some space (ie a newline) in the preset display. Possibly equivalent to <label text=" "/>
     78   Add some space (ie a newline) in the preset display.
    7979 '''<link>'''::
    8080   Specify a web link for this feature or to anything else of use. The ''href'' attribute is required.
     
    104104   When specified, only objects of the given type will be changed at all by this tagging preset. Can be "node", "relation", "way", "closedway" or any comma separated combination of them.
    105105 '''icon="iconname"'''::
    106    A name of an icon that is within any classpath in the subdirectory of /images/symbols. You can load plugin-jar's to provide those images as well. The image will be used as icon to display in the selection list and when adding the preset to the toolbar. The icon should be quadratic in size.
     106   A name or link to an icon. The image will be used as icon to display in the selection list and when adding the preset to the toolbar. The icon should be quadratic in size. See [[Styles#Iconhandling]] how icons can be specified.
    107107 '''key="some_key"'''::
    108108   This specifies the property key that will be modified by the item.
     
    146146=== Format description from XML document (needs to be joined with above texts) ===
    147147
     148{{{
    148149item:
    149150  name: the text to display
     
    157158                     (defaults to "false" for backward-compatibility on external presets)
    158159
    159 group: a group of items (same syntax as "item")
    160 
    161 link: link to the relating map features website
    162   href: the URL
    163 
    164160preset_link: a link to an other preset
    165161  preset_name: the exact name of the preset to link to
     
    170166  icon_size: maximal size of icon (optional). If no value is given, default is 16px
    171167
    172 space: empty line
    173 
    174168optional: optional tags, short for "space" plus "label" plus "space"
    175169  text: the text to display (defaults to "Optional Attributes:")
    176 
    177 separator: separator line in menus
    178170
    179171item_separator: horizontal separator line between items (in window)
     
    299291 - keyvalue!: positive if key and value matches, negative otherwise
    300292Note that for a match, at least one positive and no negative is required.
     293}}}
    301294
    302295=== Icon handling ===