﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
8958	Adding „library” section to presets. (idea)	kendzi	team	"I count repeated lines in defaultpresets.xml and there are a lot of multiple repeated values. Also there are a lot of similar values but write in slight different way. Like one of character is upper case. When some of this item will change this implicate multiple changes in preset file and it is easy for mistake. 

Most often repeat values are:
     
{{{
     65 <combo key=""opening_hours"" text=""Opening Hours"" values=""24/7,Mo-Fr 08:30-20:00,Tu-Su 08:00-15:00;Sa 08:00-12:00"" />
     38 <combo key=""layer"" text=""Layer"" values=""5,4,3,2,1,0,-1,-2,-3,-4,-5"" length=""3"" />
     37 <text key=""website"" text=""Website"" />
     31 <text key=""wikipedia"" text=""Wikipedia"" />
     28 <combo key=""surface"" text=""Surface"" values=""paved,unpaved,asphalt,concrete,metal,wood,paving_stones,cobblestone,gravel,pebblestone,compacted,grass_paver,grass,sand,ground"" />
     28 <combo key=""incline"" text=""Incline"" values=""10%,-10%,10°,-10°,up,down"" />
}}}


But there is much more.

So maybe it will be good idea to add section library for items. It could look this:


{{{
<preset>
	<group>
		<item>
			<item_element_ref ref=”opening_hours_ref”/>
		</item>
		<item>
			<!-- this example take combo from library but override key attribute -->
			<item_element_ref ref=”opening_hours_ref” key=”new_opening_hours_key”/>
		</item>
	</group>
	<library>
		<combo ref=”opening_hours_ref” key=""opening_hours"" text=""Opening Hours"" values=""24/7,Mo-Fr 08:30-20:00,Tu-Su 08:00-15:00;Sa 08:00-12:00"" />
	</library>
</preset>
}}}


So if some of values will change it will be only in one place. Preset file will be much simpler. This allow to protect from misspells too. "	enhancement	closed	normal		Core		duplicate	presets library	
