Luddites and LaTeX
The Luddite movement of the early 1800s offers lessons on company management. The increased use of modern textile machinery compelled some to form militant gangs opposed to their use, with the result of smashed equipment, beatings, and executions. The Luddites were wrong — there was, and still is, room for skilled craftsmen in today’s society. But given the environment they faced at the turn of the nineteenth century, it is easy to understand their fears. With all of their talent concentrated in a single skill (making textiles), their fears of being shoved aside were easy to understand.
It is never easy parting with that you feel comfortable or skilled doing. For many years (close to 15) I have been a staunch advocate of the typesetting software LaTeX, becoming quite proficient in programming in its environment to produce professional looking documents. LaTeX is an incredibly powerful typesetting utility that has its uses, especially in scientific and mathematical publication. Our first two state-wide contracts were garnered with proposals created in LaTeX, but it will not serve our needs at The Standards Company LLC much longer, except for special cases.
The software at The Standards Company is primarily based in XML, and that is the direction our company is pointed. The stylesheet language XSL offers many advantages over LaTeX, but none more important to my typesetting goals than its ability to post up raw data in a uniform, dynamic manner. So while LaTeX is what I am comfortable using, it is time to move on.
I am not altogether new to XML (my Director of Research, Ben Jones, lives and breathes it on an hourly basis), but typesetting XML documents using its style sheet companion XSLT is not something I am used to. But if that is what the company needs, then “very well.” To do otherwise is to apply for membership to the Luddites, an option our company does not offer.
Knowing LaTeX has helped me learn to typeset in XSLT. My experience with Adobe InDesign has helped too. Both incorporate the same structure — the use of box and inline structure to flow text into pre-defined regions of the page.
You may be wondering about our company’s position on Microsoft Word. Well, Word is great for letters and small documents. That’s about it. For a grant or RFP response, we would just as soon use a hammer and chisel.
In the future, I plan to post some of my own tutorials on XSLT as I learn it, especially the way this style/markup language relates to LaTeX and InDesign.
Gripe of the day
Example XML documents appear in every tutorial, but authors are often careless in their creation of example XML documents. One problem I see is to use sample XML code as text entries in the example. (See Listing 9.1 in Lovell, D. XSL: Formatting Objects, SAMS, 2003.)
Another mistake is to create XML example documents that are too long and complex. Not only does this make discerning elements from the document difficult, it takes a long time to type in the example text in one’s own files. I realize that some of you XSL authors like Shakespeare, but is there a real good reason to use a three-page XML example of a Shakespearean sonnet when a half-page example will do?
To me, the best example XML files are ones that have limited text, but just enough sophistication in the hierarchy to give flexibility to the discussion. For example:
<sales year=”1980″>
<car>
<ford plate= “2XMP”> Taurus </ford>
<chevy plate= “3YE”> Cavalier </chevy>
<dodge plate=”8EY”> Charger </dodge>
</car>
<truck>
<ford plate= “1YU”> Bronco </ford>
<chevy plate= “1TY”> Tahoe</chevy>
<chevy plate= “2ZX”> Tahoe</chevy>
</truck>
</sales>
This example XML file has all the sophistication one needs to show off the capabilities of XSL, and none of the elements can be confused with XML or XSL nomenclature. (Note: I had used “Silverado” earlier, but replaced it with “Tahoe” to save space. I also trimmed the plate numbers to three characters. The smaller the sample text, the better.) Note the repeating <chevy> element under the <truck> parent. Note also that the <car> and <truck> elements share the same child elements.