Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#9230 closed enhancement (worksforme)

XSD schema for presets xml

Reported by: DeeHants Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: preset Cc:

Description

Is there any chance of an official XSD schema for the presets XML?
I've created one that fits the current defaultpresets.xml (with a few exceptions noted in #9229) which was commented from the header of defaultpresets.xml

This will make it easier for anyone else to create and validate their presets before throwing them at JOSM.

Attachments (1)

presets.xsd (28.1 KB ) - added by DeeHants 12 years ago.
pressts schema XSD

Download all attachments as: .zip

Change History (7)

by DeeHants, 12 years ago

Attachment: presets.xsd added

pressts schema XSD

comment:1 by DeeHants, 12 years ago

Note that due to the localisation method of names and URLs, each new locale code needs to be added to the XSD.
(See de.name and the xx.href attributes)

comment:2 by Don-vip, 12 years ago

Resolution: worksforme
Status: newclosed

in reply to:  2 ; comment:3 by skyper, 12 years ago

Replying to Don-vip:

Here it is: source:/trunk/data/tagging-preset.xsd

Strange, throught tagging-preset-tester-plugin is using it, but I did not get a warning/error about the "length" typo (#9229).

comment:4 by stoecker, 12 years ago

Note that all the xmlns from JOSM files aren't only looking like URL's, they are URL's: http://josm.openstreetmap.de/tagging-preset-1.0

If you have fixes for the file, feel free to make a patch.

Note that due to the localisation method of names and URLs, each new locale code needs to be added to the XSD.
(See de.name and the xx.href attributes)

That's why we use <anyAttribute processContents="skip" /> even if it is ugly. We can't restrict the languages, because otherwise we'd prevent loading of the files.

in reply to:  3 comment:5 by stoecker, 12 years ago

Replying to skyper:

Replying to Don-vip:

Here it is: source:/trunk/data/tagging-preset.xsd

Strange, throught tagging-preset-tester-plugin is using it, but I did not get a warning/error about the "length" typo (#9229).

See above: <anyAttribute processContents="skip" /> prevents the warning.

comment:6 by DeeHants, 12 years ago

Ahha, I now see where that is (implicitly) linked to on the TaggingPresets page.
I've added an explicit line about it with links to the namespace URI and trunk.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.