#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)
Change History (10)
by , 6 years ago
| Attachment: | Screenshot from 2020-05-23 18-37-23.png added |
|---|
by , 6 years ago
| Attachment: | Add_documentation_to_XSD_for_default_presets.patch added |
|---|
follow-up: 2 comment:1 by , 6 years ago
| Cc: | added |
|---|---|
| Keywords: | schema xsd presets documentation added |
comment:2 by , 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 , 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.
comment:4 by , 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:8 by , 5 years ago
| Milestone: | → 20.06 |
|---|



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