We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this questionI am not sure if this makes sense so apologies before hand: is there a markup language specifically for creating document specifications? For example, if instead of giving people a template Word document for a given document they need to create, supply them with the specification in the markup language on what the document has to contain and how it should be structured. I am thinking this could be possible just by using XML but I wanted to know if there is something smarter that this:
<document>
<chapter number="1" title="Introduction">
<description>A short introduction about yourself</description>
</chapter>
...
</document>
Thank you
edit:
Thank you for the replies. I think the above example is best said with an example. In order to release开发者_如何学Python data to a third party in my organization, they need to fill out a security policy which contains some information on how they will make sure the data is kept safe on their end. In the majority of cases, people will download the Word template for it, fill it out and send it back. I want to create a formal specification of what that document should contain, in a markup language, so people can potentially build tools or other things around the creation of the document.
I realized that the example above was wrong, its a specification so should not contain any actual "contents" of the document.
What you've shown as a snippet is almost precisely the DocBook XML markup.
It works quite well. The problem is that it's XML and painful to edit. There are nice editors for this, however. I used XMLMind XML Editor.
However, you'd be much, much happier using ReStructured Text and the Python-based Docutils for this kind of thing.
RST is much, much easier to learn and edit than any other markup language.
It's somehow related: the new Office 2007 file format is XML based: Introducing the Office (2007) Open XML File Formats
I never came across a XML format like you described, but it's possible to build one; probably your main problem will be enforce enterprise usage.
DTD or XML Schema
Docbook if you want an XML solution. The good news is that there is a large community and many tools and examples. It's effectively a standard so that you can send such documents anywhere and expect people to be able to process. However it can be quite complicated.
It is one thing to create a format and to stipulate that, in order for a document to be valid, certain fields must be non-empty. It is another to verify that a particular document complies with that stipulation.
The first may be implemented as a word doc, or with some of the XML solutions described here. The second, though, is a matter of software. For a short form, perhaps an HTML form with client-side or server-side validation would be suitable. For a long one, perhaps file upload with server-side validation would work.
It sounds like the form of the required data structures is already defined in the word docs. How do you intend to enforce the submission of valid data?
精彩评论