Python, LXML, and setting xml:lang

Having trouble figuring out how to script the @xml:lang attribute?

For a DITA document that contains a single language, the highest level element (i.e. map, concept, task, etc.) that contains content should set the @xml:lang attribute to the language that applies to the document.

The question: How do I set the @xml:lang attribute using lxml? Everyone seems confused on the forums. Continue reading

Recursive DITA parsing using Perl and XML Twig, Part I

If you’re doing any text parsing and manipulation, it’s hard to ignore the processing power of Perl—especially considering that it comes pre-installed on the basic OS X platform.   There are several XML parsing modules out there and plenty of sites comparing the features and usability of each one.

Personally, I like Michael Rodriguez’s (mirod) Twig module.   It’s available on CPAN here. Continue reading

Reporting on your DITA repository with PowerShell

As a long-time Unix bigot, it pains me to say but I have to be honest: I really like PowerShell, Microsoft’s new-ish scripting language. In fact, it has an advantage over Unix shell scripting languages in that it is fundamentally based on objects rather than on strings. Now what else do I use daily that is object-based? XML of the DITA kind, of course.

While there are a number of good articles on using PowerShell with XML, I thought I’d take you through a use case specifically with DITA. Continue reading

FrameMaker is a real DITA editor…a very poor one

Last month, a pair of blog posts dueled over using FrameMaker for authoring XML.

Since the bullets were flying, I thought I would let off some shots of my own. I can’t speak to other XML use cases or schemas, but I do have a comment about using FrameMaker for DITA. Starting in November of 2011, I had to use FrameMaker 10 as a DITA editor for about six weeks until I had time to reconfigure the publishing process for another tool (and pretty up PDF output with mypdf). I’ve had a good deal of experience with writing and producing DITA content with XMetaL, and I agree with the criteria that Mr. Aldous sets out. So I can say that, yes, FrameMaker is a real XML editor.

It’s a really really lousy one.

Continue reading

Automating useful tasks within a CMIS repository

I started a project a while back to curb some of the less-efficient tasks for my Alfresco-based CMS.  My main target: eliminate the painfully slow file check-in process.  My goal: create a per-user bulk check-in method.

If you’re curious about how far you can get with some fairly basic scripting gusto, a good place to start is with the Apache Chemistry project.  Continue reading

Improving readability of DOT build log

I ran across a post on the Yahoo DITA Users’ group today about improving the readability of the toolkit’s error log. It is surprisingly easy to do – in fact, I’m not sure why this isn’t the default behavior. At any rate, if you run the toolkit from the command line via ant, you can specify that the log be created in XML instead of plain text output to the command line window. Then, you can style is with XSL. I’ve created a stylesheet that makes the log much easier for a novice to read.

Continue reading

Mobile DITA Content with jQuery

Hello ditaverse, I’ve started a new sourceforge project – creating a toolkit plugin to produce mobile- and tablet-friendly xHTML from DITA content. The plugin leverages the jQuery Mobile framework to create some pretty slick-looking pages. As it is currently set up, it takes a single map, with chunk set to-content, and produces a single HTML document with the appropriate jQuery Mobile markup to turn each topic into a mobile “page.”

Continue reading

New Links Added

I added a few new Cheap England football shirts links to the sidebar:

The Single Sorceress: a blog by cheap football tops my good friend, Paula Toth. She has years of experience working with Cheap Barcelona football shirts structured data, DITA and otherwise, as well as with CMS implementations.

DITA LiveDTD by Sagehill: a fully cheap football kits hyperlinked set of DITA 1.2 DTDs. If you are customizing or specializing, this resource is invaluable.

DITA Customization and Specialization Tutorials: a set of how-to’s for, you guessed it, customizing and specializing DITA, written by cheap football shirts Eliot Kimber.