Lists Home |
Date Index |
From: "Jeni Tennison" <firstname.lastname@example.org>
> Are there any other good uses for PIs? Does anyone have examples of
> *inappropriate* uses?
The most typical use of PIs in publishing is to add soft and hard breaks
for a particular production run. For example, in 3B2 you can add something
which says "the end of the line being currently set should be the break of the
current column" (note this is a little different from the "soft return" which
may mean "break here rather than in the immediate vicinity")
To remove these, process the text with a regex like
or the wildcard (in some search and replace systems)
Unless you have a pretty good typesetting system (i.e. smarter than TeX)
and an amenable page design or lucky data, documents often need to be
tweaked in the break/keep department to get professional quality. Knuth,
for example, is quite frank about this, and it is no secret. People doing
page updates may choose to use PIs to force the start or end of a page
so that it fits in. (Whether to do this using the typesetting application's
native GUI (if it has one) or in the markup is a local workflow issue.)
At some time in the future, I expect more systems will implement Unicode's
various break characters, and the need to use PIs for that will decrease.
If we had a validation infrastructure that allowed us to ignore or remove
elements or tags in certain namespaces, then we could use elements instead of
PIs and still validate. However, for using the data we would still need some
way to flag to an application that the element was only significant to some
other application: I cannot merrily go ahead and add elements in a new namespace
willynilly throughout a document against its schema and expect transformers or
consuming programmes not to barf.
So we could replace PIs with elements, but only at the cost of breaking everything,
all agreeing on work differently, and reinventing them.