Changeset 19261 in josm for trunk/resources/data


Ignore:
Timestamp:
2024-11-25T23:08:52+01:00 (2 weeks ago)
Author:
taylor.smock
Message:

See #24014: Add multiline and normalize attributes to preset xsd

normalize="false" will prevent all whitespace normalization while
normalize="true" + multiline="true" will strip start and end whitespace and
inner whitespace that is not newlines.

The primary reason for this change is osmwiki:Key:inscription which can have
newlines in order to match the inscription.

This does not modify UI elements to support multiline editing.

Location:
trunk/resources/data
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/resources/data/defaultpresets.xml

    r19257 r19261  
    75337533            </combo>
    75347534            <optional>
    7535                 <text key="inscription" text="Inscription" />
     7535                <text key="inscription" text="Inscription" multiline="true" />
    75367536                <text key="artist_name" text="Artist Name" />
    75377537                <combo key="material" text="Material" values="concrete,granite,metal,plastic,steel,stone,wood" />
     
    75477547            <reference ref="religious_catholic_christian" />
    75487548            <text key="start_date" text="Start date" />
    7549             <text key="inscription" text="Inscription" />
     7549            <text key="inscription" text="Inscription" multiline="true" />
    75507550        </item> <!-- Wayside Cross -->
    75517551        <item name="Wayside Shrine" icon="presets/religion/wayside_shrine.svg" type="node,closedway" preset_name_label="true">
     
    75587558            <combo key="building" text="Building" values="wayside_shrine,yes" values_context="building" />
    75597559            <text key="start_date" text="Start date" />
    7560             <text key="inscription" text="Inscription" />
     7560            <text key="inscription" text="Inscription" multiline="true" />
    75617561        </item> <!-- Wayside Shrine -->
    75627562        <item name="Boundary Stone" icon="presets/landmark/boundary_stone.svg" type="node,closedway" preset_name_label="true">
     
    75667566            <optional>
    75677567                <text key="name" text="Name" />
    7568                 <text key="inscription" text="Inscription" />
     7568                <text key="inscription" text="Inscription" multiline="true" />
    75697569            </optional>
    75707570            <preset_link preset_name="Boundary Marker" text="Similar but different tags:" />
     
    75767576            <optional>
    75777577                <text key="name" text="Name" />
    7578                 <text key="inscription" text="Inscription" />
     7578                <text key="inscription" text="Inscription" multiline="true" />
    75797579            </optional>
    75807580        </item> <!-- Milestone -->
     
    89658965            <optional>
    89668966                <reference ref="name_ref" />
    8967                 <text key="inscription" text="Inscription" />
     8967                <text key="inscription" text="Inscription" multiline="true" />
    89688968                <combo key="material" text="Material" values="concrete,metal,plastic,steel,stone,wood" />
    89698969            </optional>
  • trunk/resources/data/tagging-preset.xsd

    r18966 r19261  
    649649            </annotation>
    650650        </attribute>
     651        <attribute name="multiline" type="boolean">
     652            <annotation>
     653                <documentation>
     654                    The text is expected to be multiline, and newlines must not be normalized (default is false)
     655                </documentation>
     656            </annotation>
     657        </attribute>
     658        <attribute name="normalize" type="boolean">
     659            <annotation>
     660                <documentation>
     661                    This performs normalization of the value by stripping extraneous spaces and consolidating whitespace (default is true for JOSM)
     662                </documentation>
     663            </annotation>
     664        </attribute>
    651665    </attributeGroup>
    652666
Note: See TracChangeset for help on using the changeset viewer.