Blog: XSLT_book Module
Word2Web and XSLT_book Module Released
Better Integrating Drupal into Your Existing Editorial Workflow
Better Integrating Drupal into Your Existing Editorial Workflow
Serious content-producing organizations have evolved large-scale, specialized processes for their documents. Often they manage revisions and notes in Microsoft Word, then transfer content to PDF, and print with strict editorial guidelines. In contrast, traditional copy and paste web publishing interrupts the existing system. In the process of rethinking a current client’s web workflow, we took an interest in this problem and devised a new solution: two modules, word2web and xslt_book, which together combine the advantages of Word and the power of Drupal. Here is a screencast showing the two new modules.
The first challenge we encountered was the output of Word’s “Export to HTML...” function - which provides a loose approximation of valid HTML. Word’s output is fortunately valid XML, so we were able to clean proprietary tags from the markup using XSL transformations - XML stylesheets that selectively preserve certain elements and reorganize others. At this stage, we could enable word2web and, instead of copy and pasting into a field, users could upload a Word document to have clean HTML programmatically generated.
However, that was just the beginning. The client’s legacy site presented documents in a manner much like a Book in Drupal, and we initially considered migrating to that content type. However, the management of a book node is actually quite different than the management of this content - translations do not need to be managed by page, but instead revisions of the document should refer to the entire text. Thus we created the a display module for word2web: xslt_book. XSLT_Book uses XSL transformations again to present the simple HTML of word2web in a book-like format, with a nicely formatted table of contents and convenient paging navigation. In addition, xslt_book parses and reformats the footnotes preserved by word2web.
