Opened 12 years ago

Last modified 12 years ago

#9066 closed enhancement

presets: including other preset extracts — at Version 3

Reported by: A_Pirard Owned by: team
Priority: normal Milestone:
Component: External preset Version: latest
Keywords: include presets Cc: A_Pirard

Description (last modified by A_Pirard)

One may want to assemble fast accessed, specialized preset menus like "Most common tags for street survey" without duplicating parts of defaultpresets.xml and having to synchronize these parts with JOSM updates.
<group ... <include name=URL/group-name.../[item-name]> ... </group> would greatly help.
A list may be supported at the last level: group1,...,groupN or item1,...,itemN. Also !itemX, usefully.
Ending / may be a double check for including groups rather than items.
Thousands of people TYIA !!!

update:

This is certainly not a duplicate of #8958 as such.

In #8958, a preset writer X, say of defaultpresets.xml, notices that he is writing things multiple times and he first makes a library of which he can reuse the elements down to the deepest key, a combo in the example.

In #9066, a plain user Y wants to ease his or anybody's life by bundling together for fast access the items or groups, no deeper, that are most used for a particular activity, say street survey, e.g. not the waterways, paths or motorways, but certainly all kinds of streets, Z crossings, traffic calming etc... He certainly does not want to ask writer X to establish a library before being able to do that.

But if you want #9066 to go down to copy the deepest key level and override values too, then writer X will notice that he can use an extended
URL/group-name.../[item-namekey-name] to address the elements from any element and hence that a library is not really needed.
Note that if removing the library hurts, you can call a dummy <group name="library"... with the property to accept any tree of keys and addressed with the extended URL or a simplified form thereof. If you really want to create a new data type called <library> then it probably ought to have a name and the URL specification has to be extended beyond groups and items.

In short, the two enhancements work differently to do two different things, but they can be merged to do both using a single method.

Ask me to copy this text as an comment of #9066 if everybody prefers a merge.

Change History (3)

comment:1 by A_Pirard, 12 years ago

Description: modified (diff)

comment:2 by Don-vip, 12 years ago

Resolution: duplicate
Status: newclosed

Closed as duplicate of #8958.

comment:3 by A_Pirard, 12 years ago

Description: modified (diff)
Resolution: duplicate
Status: closedreopened
Note: See TracTickets for help on using tickets.