Modify

Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#19282 closed enhancement (fixed)

[PATCH] Add documentation from wiki to Presets XSD

Reported by: hiddewie Owned by: team
Priority: minor Milestone: 20.06
Component: Core Version:
Keywords: schema xsd presets documentation Cc: stoecker

Description

The Presets XSD is the reference document for developing internal and external presets. There is good documentation in the wiki (https://josm.openstreetmap.de/wiki/TaggingPresets) but this sometimes has missing keys and may be outdated.

This patch adds the documentation from the wiki to the XSD. This would make the XSD leading. Wiki content may be generated from the document. In addition to this, using the XSD can show the relevant documentation straight in the IDE, without having to reference the wiki (screenshot).

In addition, having the documentation of XML tags and attributes in a different document than an XSD seems a maintanance burden because information lives in two places.

Some items were fixed that were mentioned in the wiki but not in the XSD:

  • name_context was missing as attributes
  • text_context was missing next to 1 text attribute
  • list_entry has no documentation for some attributes

Attachments (2)

Screenshot from 2020-05-23 18-37-23.png (60.5 KB ) - added by hiddewie 6 years ago.
Add_documentation_to_XSD_for_default_presets.patch (32.7 KB ) - added by hiddewie 6 years ago.

Download all attachments as: .zip

Change History (10)

in reply to:  description ; comment:1 by simon04, 6 years ago

Cc: stoecker added
Keywords: schema xsd presets documentation added

Replying to hiddewie:

This patch adds the documentation from the wiki to the XSD. This would make the XSD leading. Wiki content may be generated from the document.

@stoecker, can we use the XSD file to generate the Trac wiki documentation?

in reply to:  1 comment:2 by stoecker, 6 years ago

Replying to simon04:

@stoecker, can we use the XSD file to generate the Trac wiki documentation?

Well. That depends. I don't plan to write a XSD to wiki parser script. So

  • if there is an adaptable existing solution: Yes
  • if there is nothing: No

comment:3 by hiddewie, 6 years ago

I looked into some tooling and FlexDoc XSDDoc [1] seems the most flexible, but still produces totally ugly/unusable results for simple XSDs. Apparently there does not exist a simple tool that outputs element and attribute documentation for a given XSD. It would be possible to write this with an XSLT, but that would be pretty complex.

If not being able to generate the wiki docs from the XSD is a blocking issue for adding documentation to the XSD, this ticket may be closed. In that case I can make a patch containing only the small number of problems I found between the wiki and the XSD.

[1] https://www.flexdoc.xyz/flexdoc-xml/xsddoc/

comment:4 by stoecker, 6 years ago

Please add the necessary changes to the wiki. I'm not against applying this patch nevertheless, thought it will not solve the "documented elsewhere and twice" issue if we can't autogen the wiki (but that may change...)

comment:5 by simon04, 5 years ago

Resolution: fixed
Status: newclosed

In 16638/josm:

fix #19282 - Add documentation from wiki to tagging-preset.xsd (patch by hiddewie)

comment:6 by simon04, 5 years ago

In 16639/josm:

see #19282 - Use CDATA inside tagging-preset.xsd

comment:7 by simon04, 5 years ago

In 16640/josm:

see #19282 - Add TaggingPresetSchemeWikiGenerator to generate wiki content from tagging-preset.xsd

comment:8 by simon04, 5 years ago

Milestone: 20.06

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.