DHTML in DITA Output
Self on Help
Thoughts from the OASIS DITA Help Subcommittee Chair
On a mailing list, I once read a comment to the effect that DITA was not suitable for Help, as it didn't provide support for popups. This comment rang a bell with me. When Microsoft released HTML Help (in 1995, I think), one of the first criticisms was that it didn't support rich text popups like good old WinHelp did. True, it did not, and its support for plain text popups was ungainly. Over time, the popup problem was solved by DHTML. When IE supported DHTML, so did the HTML Help viewer, and authoring tools could start to build in easy-to-use popup effects, along with other layering effects such as expansion links and dropdown links.
Bearing that experience in mind, I can't see why popups and other DHTML effects can't be provided in DITA-generated HTML or Help files. Looking at the principle of the separation of content from form, layering is a presentation decision, not a content decision. Therefore, the layering should be job of the processor, not the author.
To test this approach, I have implemented a dropdown feature in my own Web site, where setting the outputclass in the DITA source is all the author needs to do to "effect the effect". (Sorry about that - I couldn't resist. Sorry, also, if the spelling didn't translate into other Englishes - I know effect and affect mean different things in different Englishes.)
You can see this in action on the HyperWrite Web site. (I have tested this on Firefox and IE, on Windows.) Scroll about half way down the page and find the Note link. The link should toggle the display of a note block. The articles on the HyperWrite site are written in DITA (or DocBook), and stored on the server only in that format. When a link to an article is followed, an ASP.Net script dynamically transforms the DITA (or DocBook) to XHTML. The transformation (through XSLT) processes elements with the "expansion" outputclass to create the DHTML, and "canned" JavaScript routines complete the picture.
If you hunt around the articles, you'll also find a detailed explanation of how the site works.
interface controls
The use of DHTML is a great suggestion, Tony. Taking this a step further, does this mean that it's possible to create dynamic forms-like pages from DITA? I had thought of DITA content as being pre-processed, but server-based dynamic processing changes the game.
Have you had other feedback on this?
Bruce EsrigServer-based Dynamic Processing
Sorry for having missing your reply for so many months, Bruce! I am very embarrassed.
I'm quite keen on the idea of server-based processing of DITA content. My company's Web site dynamically converts DITA and DocBook to XHTML, and uses a ditamap to generated the menus, breadcrumbs, etc. The remaining challenge (though not insurmountable) is how to handle conrefs (including nested maps).
On the DITA Help Subcommittee, we've done a bit more work on applying DHTML to DITA HTML-based output, and have a demonstrator of a non-scroll region and link buttons working. It's looking promising!
Tony