XSD to HTML documentation script
 
 
Go to file
David Koňařík 8245d5777c Add missing slash 2023-11-28 12:03:16 +01:00
.editorconfig First version 2023-08-06 21:12:04 +02:00
LICENSE First version 2023-08-06 21:12:04 +02:00
README.md First version 2023-08-06 21:12:04 +02:00
main.html.j2 Add missing slash 2023-11-28 12:03:16 +01:00
xsd_by_example.py Add support for substitution groups on elements 2023-08-07 10:36:49 +02:00

README.md

XSD by example

xsd_by_example.py takes a XML Schema Definition file and prints out an HTML document describing the schema by providing an annotated "example". It shows what a document following that schema looks like, while giving the user the information necessary to imagine what other documents must look like.

It is an alternative to graphical schema generators that seem so prevalent in XML-land, but never seemed intuitive or space-efficient to me.

Usage:

python3 xsd_by_example.py input.xsd > output.html

Disclaimer

This software was made over a weekend by someone who has read maybe 0.1% of the XSD spec. It only handles part of the spec and relies on its user to notice when it hits an unsupported part. It might work perfectly, or it might crash and burn. It doesn't really understand XML namespaces and wishes they were just simple prefixes.

Then again, it produces helpful outputs for NeTEx, and I really hope your schema isn't even more complex.