User:RailML Coord Documentation/Autodoku/Skriptdokumentation

From railML 2 Wiki
Jump to navigation Jump to search
🗒️ This page is mirrored from page RailML3_Wiki:Autodoku/Skriptdokumentation in The railML® 3 wiki.

[DRAFT] Documentation XSD2MediaWiki Converter
 

Introduction

The XSD2MediaWiki Converter is an command line script written in python. It's purpose is to read the railML schema sources (XSD) and generate wiki documentation for each element found within the schema and all referenced subschemas.

Sources

The sources can be found in the railML development system (non-public project): https://development.railml.org/tools/xsd2mediawiki

Anatomy

The script will first collect all elements from the schema. It will then check with a configured MediaWiki installation (mainly the wiki for railML 3 under wiki3.railml.org) if

  • a main element documentation page does already exist
    • if it does exist: the script will do nothing with the main element page
    • if it does not exist: the script will create a new main element page
  • a robot element documentation page does exist
    • if it does exist: the script will update (replace) the existing robot element page
    • if it does not exist: the script will create a new robot element page

If an element does not exist in the currently processed railML schema, but did exist before, the script will not delete anything. Removed elements will just be ignored.