DocuBricks / docubricksViewer

1 stars 3 forks source link

machine-readable DTD #8

Open rwb27 opened 7 years ago

rwb27 commented 7 years ago

It would be good to have a formal specification for the XML format - the readme file doesn't define everything, and can't be validated by XML validation tools.

MakerTobey commented 6 years ago

Richard, you have written one, right? Can we add that to the meta repository and start maintaining it? It looks like there will be some XML extensions coming up soon with new collaborators.

rwb27 commented 6 years ago

I've not - while I have now reworked all the XML parsing code I didn't write a schema. That said, I probably could do without too much trouble...

MakerTobey commented 4 years ago

I wonder if this has already been solved by proving definitions here https://www.docubricks.com/software.jsp and also here: https://opensource.ieee.org/docubricks-maintainers/docubricks-standard A validation tool sounds very useful in particular to validate the format after document modification in other tools (e.g. as Markup in GitLab).

rwb27 commented 4 years ago

Those pages do give most of the information required, but it's not complete - the advantage of a formal datatype definition is that it will force you to specify, for example, which things are attributes and which are sub-tags (those pages don't specify it, and I tend to refer to your typescript parser when I'm looking for that information).

While it's tempting to go for the more readable-looking bullet points that you have, the (admittedly much less attractive) formal specifications are really useful to anyone else looking to work with the format. Of course, you probably want both - but if the friendly description is generated from the formal one, you can be sure that it's consistent and accurate.