As I recently discovered, somewhere along the road to P5, we lost the ability to indicate the writing direction of a document. This used to be part of the WSD in P4 and we still can have the (default) direction on individual characters via their Unicode properties in P5, but there seems to be no way to indicate this with markup on other levels. One could conceive this as a job for the @rend but than we are out in the open wilderness that reigns there.
Now what to do? I am inclined to propose an attribute that could either be part of model.global by default or be selected independently (or maybe part of the gaiji module?, but in reality, this is quite a separate question).
HTML 4.01, btw does define this as follows:
dir (ltr|rtl) #IMPLIED -- default directionality --
On the other hand, we should also account for indicating how the sequence of lines proceed on the page, which is separate from the text direction indicated by @dir, but could use the same set of possible attribute values,
ltr = left to right
rtl = right to left
ttb = top to bottom
btt = bottom to top (dont know of a sample, but just for completeness)
Maybe one could combine these values, so that no additional attribute is needed beside @dir,
<p dir="ltr.ttb">This paragraph is written from left to right and the lines proceed from top to bottom, as is normal for modern western writing</p>.
One last problem is the Boustrophedon. From the Unicode glossary (http://unicode.org/glossary/):
Boustrophedon.A pattern of writing seen in some ancient manuscripts and inscriptions, where alternate lines of text are laid out in opposite directions, and where right-to-left lines generally use glyphs mirrored from their left-to-right forms. Literally, “as the ox turns,” referring to the plowing of a field.
How do we handle this?
Needless to say that I would rather see this in P5, since it would be a bit embarassing to come out of the woods with so little of the homework done.