Slashdot Mirror


Creating and Using XML-Based Internal Documents?

Richard Emberson asks: "Once again into the breech...or at least the ground floor in a new startup. This time around, I would like to have all of the Engineering documentation internally online: a unified, internal, CVS-ed, web-based, development organization document tree covering the engineering process, methodology, coding standards, nightly build/test reports, FAQs, new hire information and help pages and the documentation for each project. Recently I've written documentation (on Linux of course) using the Apache XML-stylebook tags, stylesheets, and Ant-base publishing - and I like it. So my questions are: Has anyone done this and, if so, how were the links between documents managed?" Does your workplace use XML in its internal documentation? If so, how well does your system work, and what advice would you pass on to anyone else attempting something similar?

"If you start out with only one project (product), how do you structure it so that when new projects come into existence they can easily be integrated? Are there documentation templates out there upon which I can base the various development documents (like requirements, product development plan, design, coding walk-thru standards, etc.) and not have any of this swell too be so large that no one will be able to produce, maintain or read it?"

15 of 176 comments (clear)

  1. InfoImaging and Dig35 meta data uses XML by purduephotog · · Score: 3, Informative

    Don't know if you'd consider it engineering texts, but XML is used in moving metadata from pictures around. There's an open source and binaries downloadable.... might help your implementation.

    Good luck- it's quite impressive once you get the trees set up correctly :)

  2. Doc Book by jjr · · Score: 5, Informative

    Why not use DocBook it is XML based extendable what more could you ask?
    Have Fun

    1. Re:Doc Book by Anonymous Coward · · Score: 3, Informative

      Another vote for DocBook. We use it and it works great. You can process DocBook SGML (it also comes in an XML flavor, but we haven't used it) into pdf, rtf, and html. Books can come with multiple chapters so that many folks can work from a cvs repository at once. Then, you build the docs every night the same way you build the code. It takes a smart person a few hours to set up the build process, but it's no big deal. O'Reilly has a book on it, check Amazon.

      DocBook is excellent, no question about it.

  3. Zope by DOsinga · · Score: 5, Informative

    Have you considered zope? It is perfect for storing a document tree, it has strong support for XML, including an extension for DocBook and supposedly it integrates with Apache. Gives you also lots of options to format the
    XML as Html.

  4. Stylebook is dead by Lt · · Score: 3, Informative

    I use stylebook for internal documents at planetu.com, but stylebook seems to be dead. Docbook is a much better choice. I just have not got around to converting to it.

    The really nice thing about using XML is that I can automate some of the documents. Such as the list of valid form fields for a HTML/jsp page.

    For the nightly builds, change logs and javadocs, I use Alexandria.

  5. Linking between documents by kampi · · Score: 3, Informative

    In your case I'd probably choose docbook, but if you're just looking for a way to automatically setup the links between several XML documents you might take a look at w3make (which I wrote) or a similar project called XWeb which was written by Peter Becker.

    --
    -- a blessed +42 regexp of confusion (weapon in hand) You hit. The format string crumbles and turns to dust
  6. Our company is using XML for all documentation. by MemRaven · · Score: 5, Informative
    I asked our docs infrastructure person to pipe up, I'll see if she does before this gets to like 400 comments and nobody sees.


    We standardized all our early documentation on XML, and it's been working great. Admittedly we're using Perforce, not CVS, but we're doing something very similar to what you want to do.


    All our documentation is in XML format, in a DTD that we defined. We then have XSLT transformation scripts that convert that documentation to HTML format, and scripts that automatically update our development intranet whenever changes get checked in, along with scripts that invoke javadoc and doxygen on all the code to convert that to HTML format. We're in the process of being able to convert the same documents to PDF format to be able to publish those same documents, in the same formatting, to pretty-formatted documents for printing.


    This, aside from the simplicity of not having to worry about formatting documentation when you write it, is pretty cool. It's easier for me (as an engineer) to write a very sparse, structured XML document that will end up looking very good on screen, than to learn enough HTML to make my documents look good. And it's easier for us to enforce a standard look and feel across all documentation this way, because only the XSL transforms have to change if we change our formatting.


    But the real advantage is coming out with more advanced uses. For example, when we have configuration files, we have a special DTD that we define the documentation for the configuration files in, and then any documents that describe the configuration files are automatically converted both to the HTML documentation, AND to an example configuration file for users. We can also mark some things as only visible internally, so that the same document can have data that's visible to end-users, and data that's visible to employees (so if we have advanced configuration options that we don't want customers mucking with because they're for debugging the system, we can document them in the same place, and just hide them from customers but let our support and professional services people in on the secret).


    The best part is that because our XML DTD is very structured, someone like me (an engineer), will actually use it because it ends up being easier for me than writing in plain text, whereas I wouldn't do it in HTML (or if I did, it would just look like crap). It also makes it much easier to do integrations across branches of code: because we know the DTD for our XML documents very well, it's more likely that integrations will go smoothly, which helps keeping multiple branches of code and docs in sync automatically. If you go with a binary format, you're not going to be able to do that, and every time you make a change, you're going to have to manually change the documentation for each and every branch. With ASCII or HTML, everybody's going to produce documents that look a little different, so you're not going to be able to have as easy a time in integrating between branches.


    Our docs infrastructure person can pipe up in terms of the particular technology that we're using, but it's turned out to be one of the best infrastructure decisions that we (actually, she) made, and it's saved uncountable hours and actually made it more likely that people will write documentation themselves, because they don't have to pull out some crazy windows tool: just edit the document in emacs, and it'll still look pretty for the customers.

  7. Introducing XML documentation in the company by thbzcrt · · Score: 3, Informative

    Unless you are the CTO or the only developer in your company, you may not have complete control over the documentation format. Other people may, and probably will prefer to write documentation in Word than in XML. And I won't condemn them because Word is a good editor for documentations in plain English.

    A way to introduce XML-based documentation in a company is to prove what it can do (and not just speak about it). In a previous company, I expressed the desire to have a documentation generated from the source code, but nobody seemed really interested. So I did it myself, and when they saw it, they loved it.

    The idea was to parse our source files (which were in various languages, more or less easy to parse) and generate an XML documentation for the APIs. In a second step, other programs read the XML documentation and transformed it in RTF (Word) and HTML, using SAX and XSLT (I tried both and preferred SAX).

    The HTML version was installed on the Intranet and the developers used it as a reference documentation in their everyday work. They knew they could trust it more than any other documentation, because it was regenerated every night. They also liked it because, unlike Javadoc, the source code parser worked very hard to gather information from the code without forcing the programmer to use constraining comment conventions.

    The Word version was delivered to the clients as an API documentation.

    Other documentations were written directly in Word. The system worked very well, and ensured a good-quality and up-to-date API documentation without too much work.

    I also used the intermediary XML documentation for other purpose, including some code generation, which proved the versatility of XML.

  8. Try Conglomerate by Colin+Smith · · Score: 4, Informative

    More worthy, full document management system than the efforts being put into word processing.

    Conglomerate

    --
    Deleted
  9. XML Document Architectures by under_score · · Score: 5, Informative
    Hi. I have a little experience with this. I'm not going to bore you with the story, rather just get to a simple description of possible architectures for what you want and why you might want them. Finally, I'll conclude by saying that what you are doing is extremely ambitious: don't falter when it gets hard and overwhelming.
    1. Plain XML, without schemas
      XML is a markup langauge that is supposed to be human readable. Thus anyone can whip up an XML document that describes some data (e.g. documentation on software). It helps if you have standards to make the XML consistent.
    2. Plain XML, with schema (or DTD)
      Creating schemas for all you different types of documentation is probably the first big pain in the butt you will deal with, but it is pretty essential to get a project like you describe to work. It helps by setting common standards which all participants in your org can use to understand the docs they are looking at. Now you also get some tool support for creating and validating your XML documents.
    3. Database -> XML
      Store all your documentation data in a database and use common db tools to extract it and format in XML. Why bother? Tool support! Lots of software development project tools support using a db as a repository for the various work products (documentation and code and stuff). This also allows you to have somewhat easier methods for serving your content to interested parties with appropriate security constraints.
    4. Repository -> XML -(XSLT)-> HTML
      Here we add the ability to transform the human-readable-but-cumbersome syntax of XML into html for viewing on a browser. The big effort for this sort of architecture is that you have to create the XSLT for all your different document types and you need some way of linking-to/searching your documents from the html into the repository. Some application and web servers help with this. I'm most familiar with the Java space, and Tomcat with various xml libraries can be made to do this.
    5. Repository -> XML -(XSLT)-> XML -(XSLT)-> HTML
      This is the most flexible architecture in which pure data XML is transformed into an intermediate form which represents an abstract presentation of the XML and which is then transformed into HTML (or WML or PDF or whatever). The first stage of transformation you need one XSLT style sheet for each document type to convert it into the presentation XML. Then for the second stage you need one stylesheet for each display format. The big advantage here is that if you need to publish to a new document format, you don't need to re-write _all_ of your first stage transformations, you only need to add one new second stage transformation.
    There are of course variations. Check out IS Architectures - Organizing the Web Server for more details when one of your outputs is HTML.
  10. Why XML? by dgroskind · · Score: 3, Informative

    A good place to start is Open Source XML Database Toolkit by Liam Quin.

    The key point is that the best approach depends upon how the data will be accessed, used and updated. There does not appear to be an off-the-shelf, one-size-fits-all solution, even if you go to a commercial platform.

    The advantage of XML is that you can start with a simple approach and migrate to a more complex approach without having to do an expensive data conversion.

    The disadvantage is that XML can be quite expensive to set up on legacy documents and expensive to maintain as well. For documents that change frequently, have multiple uses, or require precise retrieval strategies, XML is the way to go. It's particularly useful when version control must be tracked at the paragraph level.

    If version control takes place at the level of the whole document, retieval is done by keyword, and documents are displayed in one form only, XML may not add anything but trouble.

  11. Forget CVS; start a Wiki! by Sunlighter · · Score: 3, Informative

    The Wiki Wiki Web is a set of editable, cross-referenced web pages. Anybody can view them and anybody can edit them, and they are searchable. Wikis are pretty useful for internal documentation projects. It should be possible to extend the concept to add the security that is typically required and to add support for XML. Of course, all that means I am practically suggesting you write your own custom Wiki, which may take too long for you. But you could probably start with an existing Wiki and get good results. I have set up UseModWiki (which is a CGI script written in Perl) and gotten good results.

    Hope this helps!

    --
    Sunlit World Scheme. Weird and different.
  12. we use XML for our knowledge base by valmont · · Score: 3, Informative

    I work at an ISP ... (not AOL, not MSN) We have a whole department who's in charge of writing up procedural documentation, walkthroughs, how-to's, FAQ's, to solve just about any problem you could ever encounter on almost any platform and operating systems under the sun on your way to getting connected to the internet.

    As soon as XML standards and derived technologies and languages (XSLT, DOM, and more) started to be strongly established nearly 2 years ago, we moved whatever existing documentation we had into XML, conforming to internally developed DTD's and specs, after a couple guys and I built a handy HTTP-based authoring tool that leverages technologies built-in Internet Explorer 5.0 which I've previously described right here, allowing writers to not have to know anything about XML, and simply click their way thru easy interactive forms, in a fairly compelling user interface ...

    With all of our information stored in XML, we can easily present it to various audiences, may it be our members who can search it by keywords to help themselves in our online support area or our technical support reps who can browse directory trees to specific XML documents and have access to more detailed information about hardware and platform configurations, document revision information and more.

    The bottom line is this system works really well. And we have the amazing peace of mind of having GREAT information in a format that can never become completely obsolete, and that is always a couple XSLT stylesheets away from fitting just about *any* need.

    Whether you make up your own DTD's or follow existing standard DTD's like DocBook mentioned in other posts, as long as you put some thought into structuring your XML data at the beginning, you can only win in the long run: XML documents can easily be processed into other XML DTDs/formats to represent the information in a way that better fits another application, and/or transformed into other documents made of a markup language meant for presentation like HTML or WAP.

    yea. XML is nifty. :)

  13. Re:Use a wiki by Khalid · · Score: 3, Informative

    Yes I confirm this ! at work we use twiki (twiki.org) one of the best wikis I kow of, really a very nice collaboration tool. It can be used as knowledge management repository too, very easy to use and to start getting people using it.

  14. Different problems by coyote-san · · Score: 3, Informative

    You're dealing with different problems here.

    DocBook, and any decent document XML DTD, gives you the ability to tag your text with some description of what it means. It might be "chapter" or "list," or it might be domain specific like "files," "bugs" and "see also" (for man pages). The presentation details are left to the processing software to handle.

    MS-Word, in contrast, is nothing but a paint tool for words. You can certainly give your styles names that have some domain meaning to you, but it's still ultimately nothing but a set of style instructions.

    For a single document, this isn't a big issue. But if you have a lot of documents and you want to reuse content, it's impossible with the MS-Word approach. With DocBook, in contrast, it's easy to set up your documents so that the same file can be reused in multiple places, but only selected content will be reused.

    IMHO, if your technical writers can't make the shift to meaningful tags, you're better off without them. (The writers, not the tags.) If they can't handle this level of structure, their writing is undoubtably muddled and confused no matter how pretty it looks.

    --
    For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken