OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: DOCBOOK: Element for literal "passthrough"?

Is there an appropriate element already existing in DocBook to indicate a character which should be treated as a literal character by downstream processors?

In essence, I need to indicate that a particular character in a programlisting should not be replaced by a character reference, even though it would normally be so handled.  The prototypical example is "<"; if I use &lt; it is normally replaced in output by a different character entity reference of the form &#nn; (where nn is a number indicating which character).

I know how to prevent this behavior in the downstream processor (thanks to some help from the DSSSList several months ago) via markup of the general form  <literalchar data='&#nn;'>. An example of use would be
while x <literalchar data='&#60;'> 5 do
  fo the bar

which will show up in the transformed output as
while x < 5 do
  fo the bar

rather than
while x &#60; 5 do
  fo the bar

which is what I get from the standard definition of &lt;

By extending the content model of programlisting to include literalchar, I can use that solution directly, and it works. Since I'm already building an extension to DocBook, this is an adequate solution.

However, I would prefer not to unnecessarily add to the DTD, to simplify the process of adapting existing tools.  I did not find an existing element that seemed appropriate, though, although I suppose I could abuse literal itself.

The project is, BTW, a literate programming extension to DocBook, and this is part of getting the "tangle" (code output) branch to work.  So far, I have been pleasantly surprised to discover that I can make this work with very minor changes to the standard DTD; other than however I deal with this literal character issue, I have added three attributes to  programlisting, and reused xreflabel.

Mark B. Wroth

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC