Hello everybody,
I happen to be a chief architect of the DocFlex/XML XSDDoc tool (see "http://www.filigris.com/products/docflex_xml/xsddoc/") mentioned here by Mads Hansen.
Well, when I read what everybody says here, I'm always thinking the following thoughts -- Computers probably existed yet in Stone Age! Indeed, you can bring a few stones and use them to help yourself with some calculations. That you can call a "computer". You may be even happy and proud of that device!
My point is this. You want to generate an XML schema documentation. But what do you mean under the words "XML schema documentation"? After all, the ultimate XML schema "documentation" is its XML source. I believe, there is no much use of any documentation that shows little more than you can see in the XML schema source by yourself.
In my view, a true XML schema documentation should allow the user to quickly find any necessary meaningful information about the XML schema (more precisely, the XML schema project), if only that information could be automatically obtained or deduced from it.
You cannot achieve that goal just by programming a few XSLT scripts!
XSL is a programming language that was grown from CSS. CSS is used to format HTML documents so as to hold in a single place most of formatting settings shared by several HTML files, thereby reducing their sizes as well as allowing a (rather weak) possibility to customize the overall look & feel. The idea of XSL was to repeat the same trick for generic XML files. But XML was not viewable directly by the web browsers. Therefore, something was needed to somehow transform XML on the fly and make an HTML from it. So, the CSS was extended with some processing constructs that mandatory must have been declarative only, non-procedural ones. Otherwise, it would threaten to become a yet another universal programming language losing its easy-to-use interpreted-on-the-fly features. Later indeed XSL started to be used for increasingly more complex tasks of processing of XML files. Hence, XSL was extended with even more data processing constructs. Yet, that evolution didn't change the light-weight essence of XSL. In a sense, XSL language is too powerful for too big and complex tasks. It is not a database engine, after all!
We invented and implemented our own technology alternative to XSLT, which in fact is not limited to XML. Rather the goal was to make possible processing any imaginable data sources in the way as if they are virtual XML files. XML itself is obviously covered by this. The processing is based on some "templates", which play a role similar to XSLT scripts. Like XSLT scripts, the templates are interpreted by a special processor. But this is not based on XSLT in any way (if only some ideas were borrowed). More details you can read here: "http://www.filigris.com/products/docflex/"
Our XML schema documentation generator called "DocFlex/XML XSDDoc" is based on this technology. It is implemented in the form of a template set that currently consists of 63 templates.
That everything does generate XML schema documentation! See some examples here: "http://www.filigris.com/products/docflex_xml/xsddoc/examples/"
In fact, here you can see how big actually that task is. For comparison, we have developed with the same technology a replacement for the standard Javadoc, which is an automatic documentation generator for Java programs. (Our tool is called DocFlex/Javadoc, see here: "http://www.filigris.com/products/docflex_javadoc/"). You might think that the developing of the original Javadoc was a piece of work. Yet, it took from us to design only a template set made of just 12 template to support almost all what the standard Javadoc does. Our XML schema documentation generator, which is based on the same technology, is more than 5 times bigger that this.
Now, try to implement the same with XSLT!