JOSM: Is it possible to retain keys/values when exporting a selection?

I am checking Public Rights of Way in my local area of Oxfordshire and adding or editing keys and values of ways. I have selected these ways in JOSM and exported them to a .gpx file first then converted that file using DNR GPS .exe to an ESRI .shp file in order to check for completeness against a master Public Rights of Way dataset. I lose the ways’ attributes upon export to the .gpx file, it seems. Is there any means by which I might retain such information?

The GPX format is not very rich, it does not have the possibility to store arbitrairy key-value pairs on waypoints. You will need a small program that converts the key-value pairs into a key that is understood in GPX.

An example of a waypoint in a GPX file is

NOK-Woning, rijhuis Markt 8 39328 Woning, rijhuis - Markt 8

So all the key-value pairs will have to be encoded in either the name or desc(ription) tag. I don’t know a program that does this for you, but that does not mean there is one out there.

p.s. The above is from a GPX-file that I generate based on a wikipedia page listing heritage buildings in Belgium, such as https://nl.wikipedia.org/wiki/Lijst_van_onroerend_erfgoed_in_Kruibeke

Maybe geoJSON is an alternative?

see https://en.wikipedia.org/wiki/GeoJSON

You can produce that format via http://wiki.openstreetmap.org/wiki/Overpass_turbo → Export

stephan75
That is a lot of food for thought. I was introduced to Overpass turbo through Robert Whittaker’s website that offers queries for various aspects of Public Rights of Way, which led to my original question, indirectly. It is a much bigger step for me to assemble my own query. Nevertheless, it seems to be the direction in which I am being pointed.
I thank you for your constructive reply.

stephan75
I am delighted to report complete success in answer to my question, using Overpass turbo and GeoJSON. I obtained a query result in Overpass turbo and exported it to GeoJSON. I needed to convert that file to ESRI .shp. A search led me to the ESRI Community here https://geonet.esri.com/thread/105193 and a suggestion to use mapshaper. It is a simple step to convert to .shp. This allows me to open the file in MapInfo, mapping software I have used for twenty years. I am presented with seven fields: _id, Fid, Designatio, Foot, Highway, Prow_ref and Ref_Chilte. In other words, all the details I require, and more.
I am indebted to you for your suggestion.