There are products that do this, namely Xopus (which does it in a web page) - it's far from free (even though it started as an open-source project). Microsoft also has InfoPath (which seems to be exactly what I'm looking for). It was announced as discontinued in 2014. I'd like to make my solution open source and Googling pointed me several times to OO because of its XML filters.
XML import/export seems feasible with OO XML filters. However, I know that word processors like MSWord don't prevent or enforce semantics (the way paragraph styles can be used within a document). For example, users can insert an ingredient in the middle of the preparation steps, or make a recipe without ingredients, etc. In XML, these data rules are often specified in a schema (XSD). Xopus and InfoPath (mentioned above) work from an XSD file, but I'm not asking for a solution in OO that supports arbitrary XSD's (it's a really hard problem). The format of my data is fairly simple, but there are some rules about how the data are nested and structured and I'd like the editor to enforce them.
Here are some specific questions:
- I read the XML Filters tutorial, but will OO writer enforce the rules?
- I read some about XForms in OO, which might be the answer about rules. However, If I use them, it's not clear to me if:
- there can be an arbitrary numbers of things (e.g. ingredients, steps)
- there can be an arbitrary numbers of recipes (I got the impression a form would be limited to a single entry)
- data inside the fields can be rich text that translates to CDATA HTML, e.g., bold, italics, and/or use of images inside ingredients or steps.