Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 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 6 years ago.
pressts schema XSD

Download all attachments as: .zip

Change History (7)

Changed 6 years ago by DeeHants

Attachment: presets.xsd added

pressts schema XSD

comment:1 Changed 6 years ago by DeeHants

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 Changed 6 years ago by Don-vip

Resolution: worksforme
Status: newclosed

comment:3 in reply to:  2 ; Changed 6 years ago by 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).

comment:4 Changed 6 years ago by stoecker

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.

comment:5 in reply to:  3 Changed 6 years ago by stoecker

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 Changed 6 years ago by DeeHants

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.